What ACID Stands For
A transaction is a group of reads and writes treated as one unit. ACID describes the guarantees that unit provides.
- Atomicity: all of the changes apply, or none of them do. A failure halfway through is rolled back.
- Consistency: the transaction moves the database from one valid state to another, respecting all declared rules and constraints.
- Isolation: concurrent transactions do not see each other's half finished work.
- Durability: once a transaction commits, its effects survive crashes and power loss.
Why It Matters
Without atomicity, a money transfer could debit one account but never credit the other. Without durability, a confirmed order could vanish in a crash. ACID lets the application reason about correctness as if it ran alone, then trust the database to make that true under failure and concurrency.
Who Provides Each Letter
- Atomicity and durability come from logging and recovery mechanisms.
- Isolation comes from concurrency control such as locks or versions.
- Consistency is partly the database enforcing constraints and partly the application writing correct transactions.
Key idea
ACID bundles atomicity, consistency, isolation, and durability so a transaction either fully succeeds and lasts, or leaves no trace.