Research Library · Idea
Database transactions
A database transaction is a group of actions that moves a system from one consistent state to another and either takes effect completely or not at all. Jim Gray's report "The Transaction Concept: Virtues and Limitations" (Tandem Computers TR 81.3, June 1981; Seventh International Conference on Very Large Data Bases, September 1981) defines it as a transformation of state with the properties of atomicity (all or nothing), durability (effects survive failures) and consistency (a correct transformation).1
Gray separates actions into unprotected ones (not undone or redone, such as temporary files), protected ones (database operations, which must be undoable and redoable) and real ones (not undoable, such as dispensing cash). A transaction commits or aborts; an aborted transaction's protected and real effects are never visible to others. After commit, effects change only through compensating transactions, and he compares this to double-entry bookkeeping. To hide uncommitted updates and keep reads stable, he describes locking: read locks are compatible with each other, update locks are not, and deadlocks are found by timeout or by a cycle in the waits-for graph and resolved by aborting a victim. Recovery uses undo and redo records in stable storage, and a commit across several nodes uses two-phase commit, in which a participant that says it is prepared gives up the right to abort alone.1
The acronym ACID, atomicity, consistency, isolation, durability, comes from Haerder and Reuter's 1983 survey, which names isolation as the property that events within a transaction are hidden from concurrent transactions.2 Gray's abstract does not name isolation as a property. Brewer notes that the C in CAP is single-copy consistency, not ACID consistency, and that serialisability requires communication and so fails across partitions.3
Transactions remain the standard unit of correctness in relational databases. Systems built for availability across failures, such as Dynamo, deliberately offer weaker guarantees, single-key updates and no isolation.
Source · The Transaction Concept: Virtues and Limitations (opens in a new tab) · Jim Gray, Tandem Computers Technical Report 81.3, June 1981
References
- The Transaction Concept: Virtues and Limitations (opens in a new tab) · Tandem Computers TR 81.3 · June 1, 1981 ↩ ↩
- Principles of Transaction-Oriented Database Recovery (opens in a new tab) · ACM Computing Surveys 15(4) · December 1, 1983 ↩
- CAP Twelve Years Later: How the Rules Have Changed (opens in a new tab) · Eric Brewer, IEEE Computer; InfoQ reprint · May 30, 2012 ↩
- Dynamo: Amazon's Highly Available Key-value Store (opens in a new tab) · SOSP 2007 · October 14, 2007
Research articles
- Where the data lives, and what it gives away: a reader in data engineering from the relational model to differential privacy · Data science & statistics
See what connects to it on the map of ideas →

SecSIG