ACID Properties
ACID is the set of four guarantees — Atomicity, Consistency, Isolation, and Durability — that define what it means for a database system to process transactions reliably.
ACID is the set of four guarantees — Atomicity, Consistency, Isolation, and Durability — that define what it means for a database system to process transactions reliably.
This diagram maps each ACID property to the mechanism the database uses to enforce it. Atomicity means that all operations within a transaction either all succeed or all fail. The database enforces this through its COMMIT/ROLLBACK mechanism and the undo log: if any statement fails or the process crashes mid-transaction, the engine uses the undo log to reverse every change from that transaction as if it never ran.
Consistency means a transaction can only bring the database from one valid state to another, never leaving it in a state that violates defined constraints, foreign keys, or triggers. This is enforced partly by the database engine (constraint checking on write) and partly by the application's business logic.
Isolation controls how concurrent transactions see each other's in-progress changes. The SQL standard defines four isolation levels — Read Uncommitted, Read Committed, Repeatable Read, and Serializable — each offering progressively stronger guarantees at the cost of more locking or more version overhead. Most databases default to Read Committed. The MVCC Workflow diagram shows how Postgres implements isolation without taking read locks.
Durability guarantees that once a transaction is committed, its changes survive crashes and restarts. This is achieved by writing to the Write-Ahead Log before the commit returns, then fsyncing to disk. The committed state can always be reconstructed by replaying the WAL. The Transaction Lifecycle diagram shows exactly when the WAL fsync occurs relative to the COMMIT acknowledgment. ACID guarantees are central to relational databases; NoSQL systems often relax them in favor of availability, as captured in the CAP Theorem Model.