0
Challenge · 84CS Fundamentals

Isolation levels

DBMSused in ~80% of apps

The I in ACID has a dial on it. Four settings, three named problems, and a table that every candidate is expected to be able to draw. It is one of the few interview topics where drawing the table really is the answer.

Core idea. Perfect isolation is expensive, so databases let you buy less of it. Each level allows a specific set of anomalies, and each anomaly is a concrete two-transaction story you can tell in three lines.
Playground, this isn't a screenshot
layers, and what commit and rollback do to them
committed
(empty)
one committed layer at the bottom, and nothing pending
step 1 of 9

A commit merges down one level, not to the bottom, because the layer below can still roll back.

↑ play a little first, then dig in