CRAPHT

How Databases Work

You should be able to explain how a relational database stores and retrieves data, and build a small storage engine from scratch.

Prerequisites

Comfort with one programming language and basic data structures.

Path

  1. Read1-2 hours

    Architecture of a Database System

    The classic survey paper by Hellerstein, Stonebraker, and Hamilton.

    Open resource →
  2. Study3-4 hours

    B-Trees and LSM-Trees

    Understand the two dominant on-disk indexing structures and their trade-offs.

    Check understandingLSM-tree fundamentalsnot taken yet
  3. Build1-2 weeks

    Build a persistent key-value store

    A bounded first Build: implement a log-structured store with an in-memory index.

  4. Checkpoint2-3 hours

    Explain your storage engine to someone else

    Write a short Note comparing your design to an LSM-tree.