This series of test-driven small coding puzzles lets you code a database from scratch (no dependencies).

There are 45 puzzles, most puzzles are fewer than 50 lines of code, covering ALL major aspects of databases, including KV storage engines, LSM-Tree indexes, SQL, concurrent transactions, ACID, etc.

An accompanying book with detailed explanations and background info is available to aid your journey, allow you to dive deeper, or help you learn the subject without committing to the full project.

My goal is to transform advanced, complex topics into an accessible form so beginner or intermediate can advance to the next level. You can buy the book to fund my efforts.

This is the 1st Trial of Code project (2025). I plan to release more next year. Subscribe to get updates.

Table of contents