Paper · Transactions & Recovery

A Critique of ANSI SQL Isolation Levels

H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, P. O'Neil · SIGMOD · 1995

What isolation levels really guarantee, and the anomalies the standard missed.

Summary

The ANSI SQL standard defines isolation levels by the phenomena they forbid: dirty reads, non-repeatable reads and phantoms. The authors show that these definitions are ambiguous and incomplete, and that they do not match how real locking systems behave.

They reformulate the phenomena more precisely and add anomalies the standard missed, including lost updates, dirty writes and read skew. They also characterise snapshot isolation, which multiversion systems commonly provide, and show that it is not serialisable because it permits write skew, an anomaly the ANSI definitions cannot express.

The paper is essential for anyone implementing concurrency control or relying on it. Many systems still label snapshot isolation as serialisable or repeatable read, and understanding the gap explains a whole class of subtle application bugs.

Key ideas

  • The ANSI phenomena definitions are ambiguous and miss real anomalies.
  • New phenomena: dirty writes, lost updates, read skew and write skew.
  • Snapshot isolation defined and shown to be weaker than serialisability.
  • Isolation levels characterised by the locking behaviour that implements them.

More Transactions & Recovery papers