01Overview

In the 1970s System R introduced transactions and two-phase locking. In 1981 Jim Gray laid out atomicity, consistency, isolation and durability; in 1983 Härder and Reuter coined the acronym ACID. Isolation levels — read uncommitted, read committed, repeatable read, serialisable — define exactly what concurrent transactions may see of each other.

Implementing transactions needs logs, locks and a recovery protocol. Write-ahead logging (WAL) makes crash replay possible; MVCC stops reads from blocking writes. Distributed transactions add the complexity of two-phase commit and consensus. Today ACID is no longer an enterprise luxury but a baseline promise of nearly every database.

02History

  1. 1976

    Transactions in System R

    Two-phase locking and recovery.

  2. 1981

    Gray's transaction paper

    ACID made systematic.

  3. 1983

    The term ACID

    Coined by Härder and Reuter.

  4. 1990

    MVCC spreads

    Reads stop blocking writes.

  5. 2012

    Spanner

    Globally distributed, strongly consistent transactions.

03Core concepts

Atomicity

All operations take effect, or none do.

Isolation level

The visibility contract between concurrent transactions.

WAL

Write the log before the data, so a crash can be recovered.

04Hands-on

Do it once — it beats reading it ten times

Open two database sessions, reproduce a lost update under read committed, then fix it with the right isolation level

05Self-check

Say it in your own words first, then open the answer. Whatever you cannot explain is what to review next.

Can you explain "Atomicity"?

All operations take effect, or none do.

Can you explain "Isolation level"?

The visibility contract between concurrent transactions.

Can you explain "WAL"?

Write the log before the data, so a crash can be recovered.

What problem did it solve, and why was there nothing better at the time?

Go back to the history section: how was this done before, and what did it cost?

If you had to build it today, how would you break it down?

Use the hands-on task above: write a plan of at most three steps before you start.

06Key people

J

Jim Gray

1944 – 2007

A pioneer of transaction processing and database systems.

M

Michael Stonebraker

1943 –

A driving force behind Postgres and column stores.

07Further reading

  • Transaction Processing: Concepts and TechniquesGray & Reuter · 1992
  • Database System ConceptsSilberschatz et al. · 1997