DSA Factory
Free Transactions and concurrency lessonsTransactions and concurrency · Stage 0 · All or nothing · Step 2

The write-ahead log

See how a sequential log of changes lets the database undo unfinished work and redo committed work after a crash. About 14 minutes.

Quick check

When a transaction commits, what must the database make sure has reached disk before reporting success?

  1. AThe transaction's log records, including its commit record
  2. BEvery data page the transaction modified
  3. CNothing: commit is just a flag in memory
Show the answer

The transaction's log records, including its commit record. With the log on disk, recovery can redo the changes even if the data pages were never written.

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