ACID
Atomic, Consistent, Isolated, Durable: the guarantees a database transaction gives.
Definition
Atomic: all of a transaction's changes happen or none do. Consistent: constraints hold before and after it. Isolated: concurrent transactions don't see each other's half-finished work (how strictly depends on the isolation level). Durable: once COMMIT returns, the change survives a crash, thanks to the write-ahead log.
In practice
A transfer debits one account and credits another; if the app crashes in between, neither change is kept.
Learn it in context
Lessons that use this term.
Related terms
- Write-ahead logA log where the database records every change before applying it, so committed data survives crashes.
- Optimistic lockingDetecting that someone else changed a record since you read it, and failing your update instead of overwriting theirs.
- CAP theoremWhen the network between copies of data fails, a system must either refuse some requests (consistency) or answer with possibly stale data (availability).