
The Backend Engineering Show with Hussein Nasser All About Database ACID
16 snips
Oct 24, 2020 A lively deep dive into database transactions and the four ACID properties, from atomicity and consistency to isolation levels, phantom reads, and durability. Along the way, questions tackle power failures, Postgres logs, database locks, distributed systems, and when strong consistency is worth the tradeoff.
AI Snips
Chapters
Transcript
Episode notes
Jim Gray Origin Story For ACID
- Jim Gray invented the ACID concept and disappeared from his boat, becoming a notable figure in database history.
- Hussein Nasser recounts Gray's story while introducing ACID to show the origin and human side of the idea.
Always Use Transactions For MultiStep State Changes
- Use transactions to group related SQL statements so they either all succeed or all fail.
- For operations like money transfer, wrap the debit and credit queries in one transaction to avoid losing funds if a later step fails.
Use Postgres For Transactional Schema Changes
- Prefer Postgres when you need transactional DDL because Postgres allows DDL inside transactions and rollbacks.
- Hussein contrasts this with MySQL where CREATE/ALTER commits immediately and cannot be rolled back.
