← DBMS & SQL learning path
DBMS & SQL · Module 9 of 10

Transactions and ACID

Group changes into transactions that are all-or-nothing and safe.

📖 Key ideas

  1. A transaction is a set of operations treated as one unit.
  2. COMMIT saves changes; ROLLBACK undoes them.
  3. ACID: Atomicity, Consistency, Isolation, Durability.
  4. Bank transfer: debit and credit must both happen or neither.
  5. 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