55/212
\begin{frame}
  \frametitle{Checking Conflict-Serializability}
  
  \begin{goal}{}
    Given a schedule we can create a \emph{precedence graph}:
    \begin{itemize}
      \item The graph has a node for each transaction.
      \item There is an edge from $T_1$ to $T_2$ if there is a conflicting
        action between $T_1$ and $T_2$ in which $T_1$ occurs first.
    \end{itemize}
  \end{goal}
  
  \begin{exampleblock}{}
    {\def\scheduleWidth{1cm}
    \begin{tcenter}
      \begin{tikzpicture}[node distance=15mm]
        \schedule{}{2}{1wV|2rV|1wV}
        \mpause[1]{ 
          \node (t1) at (6.5cm,-\scheduleHeight) {$T_1$}; 
          \node (t2) [right of=t1] {$T_2$}; 
        }
        \mpause{
          \draw [very thick,->] (t1) to[bend left=30] (t2);
          \draw [very thick,->] (t2) to[bend left=30] (t1);
        }
        \begin{scope}[yshift=-1.5cm]
        \schedule{}{2}{1rV|2rV|1wV}
        \mpause{ 
          \node (t1) at (6.5cm,-\scheduleHeight) {$T_1$}; 
          \node (t2) [right of=t1] {$T_2$}; 
        }
        \mpause{
          \draw [very thick,<-] (t1) -- (t2);
        }
        \end{scope}
        \begin{scope}[yshift=-3cm]
        \schedule{}{3}{2rV|1wY|3wV|2rY|2wZ}
        \mpause{ 
          \node (t1) at (6.5cm,-\scheduleHeight) {$T_1$}; 
          \node (t3) [below right of=t1] {$T_3$}; 
          \node (t2) [above right of=t3] {$T_2$}; 
        }
        \mpause{
          \draw [very thick,->] (t1) -- (t2);
          \draw [very thick,->] (t2) -- (t3);
        }
        \end{scope}
      \end{tikzpicture}
    \end{tcenter}
    }
  \end{exampleblock}
\end{frame}