\begin{frame} \frametitle{Isolation Levels via Locking} Basic idea: use variations of strict 2 PL. \begin{goal}{SQL-92 Isolation Levels} \begin{itemize} \item \emph{\sql{read uncommitted}} (also \sql{dirty read} or \sql{browse})\\[.5ex] \emph{Only write locks are acquired.} Any row read may be concurrently changed by other transactions. \smallskip\pause \item \emph{\sql{read committed}} (also \sql{cursor stability})\\[.5ex] \emph{Read locks} are held for as long as the application cursor sits on a particular, \emph{current row}. Write locks as usual. % (according to Strict 2 PL). Rows may be changed between repeated reads. \smallskip\pause \item \emph{\sql{repeatable read}}\\[.5ex] Strict 2 PL locking. Nevertheless, a transaction may read \emph{phantom rows} if it executes an aggregation query twice. \smallskip\pause \item \emph{\sql{serializable}}\\[.5ex] Strict 2 PL + multi-granularity locking. \emph{No phantom rows}. \end{itemize} \end{goal} \end{frame}