← DBMS & SQL learning pathDBMS & SQL · Module 9 of 10
Transactions and ACID
Group changes into transactions that are all-or-nothing and safe.
📖 Key ideas
- A transaction is a set of operations treated as one unit.
- COMMIT saves changes; ROLLBACK undoes them.
- ACID: Atomicity, Consistency, Isolation, Durability.
- Bank transfer: debit and credit must both happen or neither.
- Locks and isolation levels stop concurrent transactions corrupting data.
💡 Real-life example: An ATM withdrawal: money leaves your account and comes out of the machine together, or neither happens.
COMMITMakes changes permanent
ROLLBACKUndoes uncommitted changes
AtomicityAll or nothing
DurabilityCommitted data survives crashes