A transaction groups several operations so they succeed or fail as one unit — essential when correctness matters (think a bank transfer).
Transactions & ACID
How databases guarantee reliable, consistent changes.
Tap or hover a part to learn more.
All or nothing.
Every operation in the transaction succeeds (COMMIT) or none do (ROLLBACK). A bank transfer never debits one account without crediting the other.
Check your understanding
1. What does atomicity guarantee?
2. Which property ensures committed data survives a crash?
Keep learning
ACID
- Atomicity — all steps happen, or none do (COMMIT or ROLLBACK).
- Consistency — the database moves from one valid state to another, respecting constraints.
- Isolation — concurrent transactions don't corrupt each other's view of the data.
- Durability — once committed, changes survive a crash.
A transfer that debits one account must credit the other — a transaction ensures you never lose money to a half-finished operation. This is why relational databases are trusted for critical data, and a key contrast with many NoSQL systems.
