Fundamentalschapter 5 of 6 · 4 lessons
ACID Properties
The guarantees that make relational databases trustworthy for transactions.
You move 200 pounds from savings into your current account. The database subtracts 200 from one row. Then the machine loses power.
The money is gone. Not delayed, gone: taken off one account, never added to the other, and nothing in either row records that a transfer was halfway through.
ACID is four promises a database makes so that afternoon never happens. Each one exists because that exact disaster happened to somebody first, and half the history of the databases that dropped them is the story of those disasters coming back.
Lessons
4 in this chapter- AtomicityEvery statement in the transaction commits, or none of them do.3 min
- ConsistencyTransactions move the database from one valid state to another, never through an invalid one.2 min
- IsolationConcurrent transactions should behave as if they ran one at a time.3 min
- DurabilityOnce the database says committed, a crash cannot take it back.2 min