System Design
4. Database FundamentalsAnimated
ACID Properties
Atomicity, Consistency, Isolation, Durability.
The idea
Atomic: all or nothing. Consistent: rules hold. Isolated: concurrent work does not interfere. Durable: committed data survives crashes.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
Phase 1: the coordinator asks everyone if they can commit.
- step:
- 1/7
- from:
- Coordinator
- to:
- Participant A
1/7
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Atomicity via undo logs
- 2Consistency via constraints
- 3Isolation via locks or MVCC
- 4Durability via write-ahead logs
Where it is used
Safe financial and business data.
Watch out for
Strong guarantees cost performance at scale.