199/212
\begin{frame}
  \frametitle{Multiversion Concurrency Control: Snapshot Isolation}

  
  \begin{goal}{Multiversion Concurrency Control}
    \emph{Multiple versions of the data are stored.} 
    The isolation level determines what version a transaction sees.
  \end{goal}
  \pause
  
  \begin{goal}{Common Isolation Level: \emph{Snapshot Isolation}}
    Each transaction sees a consistent snapshot of the database
    that corresponds to the state at the moment it started.
  \end{goal}
  \pause

  \emph{Read-only} transactions never need to be blocked!
  \begin{itemize}
    \item might see \emph{outdated}, but \emph{consistent} version of the data
    \item as if the entire query happened at the moment it started
  \end{itemize}
  \pause
  
  \begin{block}{}
    With snapshot isolation:
    \begin{itemize}
      \item Read-only transactions do not have to lock anything!
    \smallskip
      \item Transactions \emph{conflict if they write the same object}:
        \begin{itemize}
          \item Pessimistic concurrency control: only writes are locked
          \item Optimistic concurrency control: only write-sets interesting
        \end{itemize}
    \end{itemize}
  \end{block}
\end{frame}