Добавил select'ы для проверки в транзакиях

This commit is contained in:
2024-11-12 14:06:54 +03:00
parent a7c3e762b2
commit bd1520fd02
5 changed files with 52 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@@ -711,14 +711,14 @@ $$;
$t_1$ & $t_1$ &
\specialcell{ \specialcell{
Изменение имени судьи с \texttt{id\_judge = 201}\\ \\ Изменение имени судьи с \texttt{id\_judge = 201}\\ \\
% \texttt{select id\_judge, name from judge}\\ \texttt{select id\_judge, name from judge}\\
% \texttt{where id\_judge = 201;}\\ \texttt{where id\_judge = 201;}\\
\texttt{update judge set name = 'Софа'}\\ \texttt{update judge set name = 'Софа'}\\
\texttt{where id\_judge = 201;}\\ \texttt{where id\_judge = 201;}\\
% \texttt{select id\_judge, name from judge}\\ \texttt{select id\_judge, name from judge}\\
% \texttt{where id\_judge = 201;}\\ \texttt{where id\_judge = 201;}\\
} }
\includegraphics[width=1\linewidth]{img/transaction1_2.png} \includegraphics[width=1\linewidth]{img/transaction1_1.png}
& &
\\ \\
\hline \hline
@@ -753,7 +753,7 @@ $$;
В таблице~\ref{tbl:unrepeatable_read} представлены транзакции, на примере которых демонстрируется наличие артефакта <<Неповторяемое чтение>>. В таблице~\ref{tbl:unrepeatable_read} представлены транзакции, на примере которых демонстрируется наличие артефакта <<Неповторяемое чтение>>.
\newpage % \newpage
\begin{table}[h!] \begin{table}[h!]
\centering \centering
% \addtocounter{table}{-1} % \addtocounter{table}{-1}
@@ -794,15 +794,35 @@ $$;
& &
\specialcell{ \specialcell{
Изменение имени судьи с \texttt{id\_judge = 201} \\ Изменение имени судьи с \texttt{id\_judge = 201} \\
и фиксация транзакции\\ \\ и фиксация транзакции\\
\texttt{select id\_judge, name from judge}\\
\texttt{where id\_judge = 201;}\\
\texttt{update judge set name = 'Софа'}\\ \texttt{update judge set name = 'Софа'}\\
\texttt{where id\_judge = 201;}\\ \texttt{where id\_judge = 201;}\\
\texttt{select id\_judge, name from judge}\\
\texttt{where id\_judge = 201;}\\
\texttt{commit;}\\ \texttt{commit;}\\
} }
\includegraphics[width=1\linewidth]{img/transaction2_2.png} \includegraphics[width=0.9\linewidth]{img/transaction2_2.png}
\\ \\
\hline \hline
\end{tabularx}
\end{table}
\newpage
\begin{table}[h!]
\centering
\addtocounter{table}{-1}
\caption{Транзакции для демонстрации наличия артефакта <<Неповторяемое чтение>> (продолжение).}
\label{tbl:unrepeatable_read}
\footnotesize
\begin{tabularx}{\textwidth}{|c|X|X|}
\hline
t & Транзакция 1 & Транзакция 2 \\
\hline
$t_3$ & $t_3$ &
\specialcell{ \specialcell{
Получение имени судьи с \texttt{id\_judge = 201}\\ Получение имени судьи с \texttt{id\_judge = 201}\\
@@ -821,7 +841,7 @@ $$;
В таблице~\ref{tbl:fantom} представлены транзакции, на примере которых демонстрируется наличие артефакта <<Фантомы>>. В таблице~\ref{tbl:fantom} представлены транзакции, на примере которых демонстрируется наличие артефакта <<Фантомы>>.
\newpage % \newpage
\begin{table}[h!] \begin{table}[h!]
\centering \centering
% \addtocounter{table}{-1} % \addtocounter{table}{-1}
@@ -858,14 +878,34 @@ $$;
\\ \\
\hline \hline
\end{tabularx}
\end{table}
\newpage
\begin{table}[h!]
\centering
\addtocounter{table}{-1}
\caption{Транзакции для демонстрации наличия артефакта <<Фантомы>> (продолжение).}
\label{tbl:fantom}
\footnotesize
\begin{tabularx}{\textwidth}{|c|X|X|}
\hline
t & Транзакция 1 & Транзакция 2 \\
\hline
$t_2$ & $t_2$ &
& &
\specialcell{ \specialcell{
Добавление нового судьи и фиксация \\ транзакции\\ \\ Добавление нового судьи и фиксация \\ транзакции\\ \\
\texttt{select id\_judge, name from judge}\\
\texttt{where id\_judge >= 250;}\\
\texttt{insert into judge (name, surname,}\\ \texttt{insert into judge (name, surname,}\\
\texttt{patronymic, category)}\\ \texttt{patronymic, category)}\\
\texttt{values ('анна', 'иванова', 'петровна',}\\ \texttt{values ('вика', 'иванова', 'петровна',}\\
\texttt{'высшая');}\\ \texttt{'высшая');}\\
\texttt{select id\_judge, name from judge}\\
\texttt{where id\_judge >= 250;}\\
\texttt{commit;}\\ \texttt{commit;}\\
} }
\includegraphics[width=1\linewidth]{img/transaction3_2.png} \includegraphics[width=1\linewidth]{img/transaction3_2.png}
@@ -886,6 +926,7 @@ $$;
\end{tabularx} \end{tabularx}
\end{table} \end{table}
\newpage
\section*{Заключение} \section*{Заключение}
\addcontentsline{toc}{section}{Заключение} \addcontentsline{toc}{section}{Заключение}
В ходе освоения данного курса было выполнено пять лабораторных работ: В ходе освоения данного курса было выполнено пять лабораторных работ: