
If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

read the transcript!
what’s acid?
notes from Martin Kleppman’s amazing “Designing Data-Intensive Applications” book.
ACID is about safety guarantees for database transactions.
Atomicity
NOT about concurrent writes, that’s “isolation”
application: do these 5 writes
atomic DB: omg there was an error in the middle, rolling them all back!
Consistency
super overloaded term. This sense of “consistency” is actually an application property not a DB property.
not linearizability
not as in “eventual consistency”
About preserving application invariants like “every sale gets an invoice”
Isolation
app 1: I’m selling a watch
app 2: I’m selling the same watch
Isolation is about preventing rare conditions like this.
Some isolation levels:
- serializability
- snapshot isolation
- read committed
Durability
Durable DB: I committed your writes
app: phew my data won’t get lost even if the DB crashes/there’s a hardware failure
Perfect durability doesn’t exist.
Can involve:
- write-ahead log (usually)
- replication