Book Exercise Lanes
This module's exercise system is book-driven. Use these local chunks for targeted volume after you have already learned the concept from the guide.
How To Use This Page
- Finish the relevant concept page first.
- Solve at least one problem of your own from memory.
- Only then open the matching exercise lane.
- Keep a mistake log with tags such as
misnamed anomaly,wrong PG isolation mapping,2PC in-doubt recovery wrong,saga compensation missing idempotency,linearizability violation missed,CAP overclaim,PACELC mislabel.
Lane 1: ACID and Recovery
Use this lane when the issue is property separation, WAL mechanics, or recovery reasoning.
- DDIA: The meaning of ACID (part 1)
- DDIA: The meaning of ACID (part 2)
- DDIA: Single-object and multi-object operations (part 1)
- Database System Concepts: Transaction concept
- Database System Concepts: Transaction atomicity and durability
- Database System Concepts: Recovery and atomicity (part 1)
- Database System Concepts: Recovery algorithm (part 1)
- Database System Concepts: ARIES (part 1)
- Database Internals: Log semantics
- Database Internals: ARIES
- Database Internals: Recovery
- Database System Concepts: Exercises (chapter 17)
- Database System Concepts: Exercises (chapter 19)
Target outcomes:
- 1 ACID property map: for each of four common DB features, label A, C, I, or D and justify.
- 3 worked ARIES recovery traces from a mock log (at least one with a checkpoint inside an active transaction).
- 1 written failure-mode analysis: "given write cache W, fsync policy F, and replication R, what breaks?"
Lane 2: Anomalies and Isolation Levels
Use this lane when you can state what an anomaly is but cannot recognize it mid-schedule.
- DDIA: Weak isolation levels
- DDIA: Read committed
- DDIA: Snapshot Isolation and Repeatable Read (part 1)
- DDIA: Snapshot Isolation and Repeatable Read (part 2)
- DDIA: Preventing lost updates
- DDIA: Write skew and phantoms (part 1)
- DDIA: Write skew and phantoms (part 2)
- Database Internals: Read and write anomalies
- Database System Concepts: Transaction isolation
- Database System Concepts: Transaction isolation levels
- Database System Concepts: Implementation of isolation levels
- Database System Concepts: Exercises (chapter 18)
Target outcomes:
- 6 interleaved-schedule drawings, one per anomaly, each labeled with the weakest PostgreSQL level that prevents it.
- 5 write-skew variants beyond on-call doctors (fresh scenarios).
- 3 PostgreSQL experiment logs (dirty-read, lost-update, write-skew) with fix shown.
- 1 written engine-to-level mapping: for five real engines, which isolation name maps to what actual semantics.
Lane 3: Concurrency Control Implementations
Use this lane when you want to distinguish 2PL, SI, and SSI implementations or reason about contention.
- DDIA: Two-phase locking (part 1)
- DDIA: Two-phase locking (part 2)
- DDIA: Actual serial execution (part 1)
- DDIA: Serializable Snapshot Isolation (part 1)
- DDIA: Serializable Snapshot Isolation (part 2)
- Database Internals: Lock-based concurrency control (part 1)
- Database Internals: Optimistic concurrency control
- Database System Concepts: Lock-based protocols (part 1)
- Database System Concepts: Deadlock handling (part 1)
- Database System Concepts: Multiversion schemes
- Database System Concepts: Snapshot isolation (part 1)
- Database System Concepts: Validation-based protocols
Target outcomes:
- 3 2PL schedules drawn with lock acquisition/release annotations, including one deadlock.
- 3 MVCC version chain diagrams for an update-heavy hot row, including a long reader scenario.
- 1 rw-antidependency graph for a write-skew pattern, with cycle flagged.
- 1 written choice memo: for a given workload sketch, recommend 2PL, SI, or SSI and justify.
Lane 4: Distributed Transactions and Sagas
Use this lane when concept pages are clear but you cannot compose a coordinated workflow from scratch.
- DDIA: Distributed transactions and consensus
- DDIA: Atomic commit and two-phase commit (part 1)
- DDIA: Atomic commit and two-phase commit (part 2)
- DDIA: Distributed transactions in practice (part 1)
- DDIA: Distributed transactions in practice (part 2)
- Database Internals: Two-phase commit
- Database Internals: Cohort failures in 2PC
- Database Internals: Coordinator failures in 3PC
- Database Internals: Distributed transactions with Spanner
- Database Internals: Coordination avoidance
- Distributed Systems: Atomic commit protocols (part 1)
- Distributed Systems: Atomic commit protocols (part 2)
- Distributed Systems: Concurrency control in distributed transactions
- Database System Concepts: Commit protocols (part 1)
- Database System Concepts: Exercises (chapter 23)
Target outcomes:
- 1 2PC state machine drawn by hand for both roles with fsync points marked.
- 2 2PC failure traces explained at each step with the recovery action.
- 1 full saga design (forward + compensation tables + runbook) for a non-trivial workflow.
- 1 side-by-side comparison of "2PC vs saga" for the same workflow.
Lane 5: Consistency Models
Use this lane when anomaly vocabulary is solid but distributed consistency still feels slippery.
- DDIA: Consistency guarantees
- DDIA: Linearizability
- DDIA: What makes a system linearizable (part 1)
- DDIA: Implementing linearizable systems
- DDIA: The cost of linearizability
- DDIA: Ordering and causality (part 1)
- DDIA: Ordering and causality (part 2)
- Database Internals: Linearizability
- Database Internals: Sequential consistency
- Database Internals: Causal consistency
- Database Internals: Session models
- Database Internals: Tunable consistency
Target outcomes:
- 3 linearizability-by-hand analyses of histories with wall-clock annotations.
- 1 causal-vs-eventual anomaly description from a real-feeling application.
- 1 vendor-claim translation: pick one storage product docs page and produce an honest consistency contract.
- 1 PACELC label sheet for at least eight systems with justifications.
Self-Curated Problem Set
Build a custom set with these minimums:
- 6 interleaved schedules (one per anomaly) drawn by hand.
- 3 PostgreSQL reproductions + fixes with terminal transcripts.
- 2 2PC failure traces with written recovery.
- 2 saga designs (one with a non-trivial compensation failure mode).
- 3 linearizability-by-hand analyses on fresh histories.
Completion Checklist
- Completed at least one lane in full.
- Logged at least 12 real mistakes and corrections (isolation-level mapping, anomaly misnaming, 2PC state confusion, causal vs linearizable conflation).
- Reproduced lost update and write skew on a real PostgreSQL instance.
- Drew 2PC state machine for coordinator and participant from memory.
- Designed at least one saga end-to-end with compensation and runbook.
- Analyzed at least three linearizability histories by hand.