Bitpath

Lesson 2 · Unit 03

Isolation levels

What one transaction may see of another

12 exercisesabout 3 min

What you practise

  • Dirty reads, non-repeatable reads, phantoms
  • Read committed, repeatable read, serializable
  • Snapshots
  • What Postgres does by default

Try a question from this lesson

Pick one

Ana's balance is 100. T1 changes it, then changes its mind. What is the only safe value for T2's SELECT to return?

T1                  T2
BEGIN
UPDATE: balance = 0
                    SELECT balance
ROLLBACK

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Isolation is a dial

Transactions run at the same time. Isolation decides how much they see of each other.

The SQL standard names four levels, loosest to strictest: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE.

Stricter levels rule out more surprises, and cost more waiting or more retries. You pick per transaction.

10 more exercises in the app

  • 4× multiple choice
  • 2× type the answer
  • 1× match the pairs
  • 1× true or false
  • 1× fill the blanks
  • 1× order the lines

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy