Transactions & ACID, Explained
What a database transaction actually is, the four ACID guarantees in plain language, and what really goes wrong when transactions overlap - so you can make multiple changes all-or-nothing without losing sleep.
Download EPUB- What a Transaction Is A transaction is a bundle of database changes that either all happen or none do; you mark its edges with BEGIN, seal it with COMMIT, and throw the whole thing away with ROLLBACK.
- ACID, Explained ACID is four promises a database makes about transactions: Atomicity (all-or-nothing), Consistency (the rules always hold), Isolation (concurrent transactions don't corrupt each other), and Durability (once committed, it survives a crash).
- Isolation & Concurrency in Real Life When transactions overlap you get dirty reads, non-repeatable reads, and phantoms; isolation levels are the dial that trades safety for speed; and deadlocks happen when two transactions wait on each other - apps handle them by retrying.