FREE LESSON · Databases & data systems · 3 OF 4
Database Transactions: Isolation, Locks and MVCC
Transactions control interleavings — Isolation, locking, MVCC, and invariants
A transaction groups state changes under a defined concurrency contract.
Atomicity makes its writes take effect together or not at all. Isolation constrains what concurrent transactions can observe. Locks prevent conflicting access by waiting; multiversion concurrency control lets readers use snapshots while writers create versions. Neither automatically protects a business invariant unless operations and isolation are designed for it.
The question is not “does it use transactions?” but “which histories does this transaction design permit?”
Snapshots trade blocking for version management
A reader can see the committed database as of a logical point while a writer creates a newer version. This avoids many read–write conflicts, but old versions must remain while any relevant snapshot can need them. Long transactions can therefore retain storage and delay cleanup.
Concurrency mechanisms move costs; they do not abolish coordination.