Fundamentals · Hard · Free
Name SQL isolation levels and the anomalies they prevent.
FresherFundamentalsDatabase Fundamentals
Isolation levels
For Name SQL isolation levels and the anomalies they prevent., interviewers listen for a crisp definition, how the pieces interact in a real system, and one trade-off or failure mode you have seen or would guard against.
| Level | Prevents |
|---|---|
| READ UNCOMMITTED | Dirty reads (weak) |
| READ COMMITTED | Dirty reads |
| REPEATABLE READ | Non-repeatable read |
| SERIALIZABLE | Phantom reads (strongest) |
Postgres default READ COMMITTED; MySQL InnoDB REPEATABLE READ—know your engine.