0
Challenge · 83CS Fundamentals

ACID and transactions

DBMSused in ~92% of apps

Four letters that every candidate can expand and far fewer can explain. The interviewer is not checking whether you know that A stands for atomicity. They are checking whether you can say what goes wrong without it.

Core idea. A transaction is a group of changes that either all happen or none do. ACID names the four promises a database makes about that group: it is all or nothing, it leaves the rules satisfied, it is not disturbed by others running at the same time, and once confirmed it survives a crash.
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