droid
Interactive Database Internals Curriculum

Don't Just Query.
Build the Engine.

A deep technical journey where you construct a full relational SQL storage engine from zero. Master lexical parsing, B-tree disk structures, buffer pools, WAL recovery, and query planners.

Implement in:
CC++RustZig
The Workflow

How the Curriculum Works

A battle-tested methodology inspired by industrial software systems.

01

Understand the Architecture

Each stage breaks down complex systems into clear conceptual diagrams and straightforward checklists.

02

Write the Systems Code

Write true bare-metal algorithms in C, C++, Rust, or Zig. You allocate memory, handle binary file offsets, and build data representations directly.

03

Pass Automated Contracts

Run our comprehensive integration test harness against your binary to verify byte-exact storage output and SQL correctness.

System Internals

What You Will Implement

Every layer of a production database, constructed piece by piece.

Custom Lexer & Parser

Write a character scanner and recursive descent AST builder from scratch without Yacc/Bison.

B-Tree Page Allocation

Master 4KB binary disk pages, byte serialization, cell offsets, and B-Tree node splits.

WAL & Crash Durability

Implement write-ahead logging and recovery algorithms to survive abrupt power losses.

Volcano Query Executor

Build a pull-based iterative relational operator pipeline for SeqScan, IndexScan, and Joins.

MVCC & Transactions

Handle multi-version concurrency control, transaction isolation, lock managers, and deadlocks.

Contract-Driven Tests

Validate your custom binary against comprehensive, language-agnostic integration test suites.

Roadmap & Progress

The Complete Curriculum

6 progressive stages from simple command loop to full concurrent DBMS.

Part 116 OF 16 STAGES READY
CORE ENGINE

The Core Engine

One fixed table, users(id, name, email), from a keystroke to bytes on disk and back.

16 stagesExplore →
Part 28 OF 8 STAGES READY
FLEXIBLE STORAGE

Flexible Storage

From one hard-coded table with 60-byte rows to any table the user creates, with variable-length rows.

8 stagesExplore →
Part 38 OF 8 STAGES READY
MEMORY & SPACE

Memory and Space

How the buffer pool decides what stays in memory, and how the file gets space back.

8 stagesExplore →
Part 45 OF 5 STAGES READY
TRANSACTIONS & WAL

Transactions and Recovery

BEGIN, COMMIT, ROLLBACK, then a write-ahead log that survives a crash. One connection, no isolation levels.

5 stagesExplore →
Part 511 OF 11 STAGES READY
QUERYING

Querying

Expressions, NULLs, IN and BETWEEN, projection, sorting in memory and on disk, LIMIT, aggregates, GROUP BY, DISTINCT, ALTER TABLE.

11 stagesExplore →
Part 611 OF 11 STAGES READY
INDEXES & OPTIMIZER

Indexes and the Optimizer

Secondary indexes, UNIQUE, composite and covering indexes, ANALYZE, a deterministic cost model, EXPLAIN ANALYZE, rewrite rules, Top-N.

11 stagesExplore →
Part 713 OF 13 STAGES READY
JOINS & RELATIONS

Joins and Relations

Name resolution, nested loop, index, hash and merge joins, LEFT JOIN, cost-based algorithm choice and join order, foreign keys, subqueries.

13 stagesExplore →
Part 811 OF 11 STAGES READY
CONCURRENCY

Sessions and Concurrency

A session multiplexer, row-level undo, a lock manager, deadlock detection, row versions with read views, isolation levels, purge.

11 stagesExplore →
Part 911 OF 11 STAGES READY
SERVER TRACK

The Server Track

Optional track after the eight core parts: the PostgreSQL wire protocol, prepared statements and a connection pooler. Runs from a downloadable kit on the learner's machine; not graded by the platform.

11 stagesExplore →
Save Your Progress

Create a Free Account

Record completed stages, track test executions, and save your workspace across machines.