Overview
This page is the atomic definition. Transaction patterns live at postgres.
Definition
ACID is an acronym for four properties that guarantee reliable transaction processing. Atomicity: every operation in a transaction either commits entirely or rolls back entirely; there is no partial write. Consistency: a transaction moves the database from one valid state to another, respecting all constraints (foreign keys, check constraints, unique indexes). Isolation: concurrent transactions do not observe each other’s intermediate state; the degree of visibility is controlled by the transaction-isolation level. Durability: once a transaction commits, the data survives crashes because the write-ahead-log flushes to disk before the commit acknowledgment. PostgreSQL, MySQL InnoDB, and most relational databases guarantee full ACID compliance. Systems that relax these guarantees in favor of horizontal scalability are often described as base systems.
When it applies
Rely on ACID for financial ledgers, inventory counts, user account state, and any domain where partial writes produce incorrect results. Do not confuse the transaction guarantee with read-after-write consistency across replicas; ACID applies to the primary and its committed state.
Example
A bank transfer debits account A and credits account B in the same transaction. If the process crashes between the two statements, the rollback restores both accounts. The debit never lands without the credit.
Related concepts
- postgres - PostgreSQL’s MVCC architecture implements full ACID.
- base - the alternative consistency model used by distributed NoSQL systems.
- transaction-isolation - controls the I in ACID.
- write-ahead-log - the mechanism that provides Durability.
- deadlock - a failure mode that arises when two ACID transactions block each other.
Citing this term
See ACID (llmbestpractices.com/glossary/acid).