What is ACID
ACID is a set of four properties that guarantee database transactions are reliable: Atomicity, Consistency, Isolation, and Durability. A database that provides all four is called ACID-compliant. PostgreSQL, MySQL (InnoDB), and SQLite are ACID-compliant. Many NoSQL databases trade one or more ACID properties for performance or scalability.
How it works
Atomicity — a transaction is all or nothing. If any operation in the transaction fails, every operation is rolled back. The write-ahead log makes this possible: uncommitted changes are discarded on crash recovery.
Consistency — a transaction moves the database from one valid state to another. Constraints (foreign keys, unique indexes, check constraints) are enforced at commit time. If a constraint is violated, the transaction is rejected.
Isolation — concurrent transactions do not interfere with each other. The database provides isolation levels (read committed, repeatable read, serializable) that control what one transaction can see of another's uncommitted changes. MVCC is the mechanism most databases use to implement isolation without heavy locking.
Durability — once a transaction is committed, the data survives crashes and power failures. The WAL ensures this: the commit record is fsynced to disk before the database acknowledges the commit. Even if the process crashes immediately after, the WAL replay restores the committed data.
These properties work together. Atomicity without durability means your all-or-nothing guarantee disappears on power loss. Isolation without consistency means concurrent transactions can violate constraints. All four are needed for transactions you can trust.
Why it matters
ACID is the foundation of every system that requires correct data — banking, e-commerce, inventory, bookkeeping. When you choose a database, ACID compliance tells you whether the database handles failure correctly or pushes that burden to your application code.
See How Transactions Work for the implementation details behind each ACID property.