Skip to main content

Series

Nothing is magic

Databases feel like magic until you build one. In this series, we take the scariest-sounding pieces of database internals — write-ahead logs, MVCC, crash recovery, B-trees — and build each one from scratch in ~100 lines of TypeScript. No hand-waving: every post ends by pointing the toy implementation at real Postgres and showing that the internals match, column for column. If you can read code, you can understand how databases actually work. Nothing is magic.

Posts in this series