DSA Factory
Free Transactions and concurrency lessonsTransactions and concurrency · Stage 1 · Many users at once · Step 2

Isolation levels and anomalies

Meet the four classic anomalies, and the isolation levels that trade correctness against concurrency. About 15 minutes.

Quick check

A report reads the same row twice in one transaction and gets different values. Which anomaly is this, and which level prevents it?

  1. AA non-repeatable read; repeatable read (and above) prevents it
  2. BA dirty read; read committed prevents it
  3. CA phantom; only serializable prevents it
Show the answer

A non-repeatable read; repeatable read (and above) prevents it. Another transaction updated and committed the row between the two reads.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve