Database Internals
Implement what's inside Postgres, Redis, RocksDB, and friends — KV store, LSM tree, columnar storage, query engine, time-series, graph, search.
Course sequence
- 01
Build Your Own Search Engine
Not startedBuild a full-text search engine from scratch. You'll tokenize documents, build inverted indexes with positions, support boolean and phrase queries, rank with TF-IDF and BM25, add field boosts, compress posting lists with VByte+delta encoding, and even add spell correction. By the end you'll deeply understand how Lucene, Elasticsearch, Tantivy, and Meilisearch actually work.
intermediate13 lessons~3h - 02
Build Your Own Key-Value Store
Not startedBuild a production-grade key-value store from scratch. You'll start with an in-memory hash map, add ordered iteration and TTL, persist with write-ahead logging, build sorted SSTables, implement the LSM tree read path with compaction and Bloom filters, and add ACID transactions with MVCC snapshot isolation. By the end you'll deeply understand LevelDB, RocksDB, Cassandra, etcd, and FoundationDB.
advanced15 lessons~4h - 03
Build an LSM Tree
Not startedBuild a Log-Structured Merge tree like LevelDB/RocksDB: memtables, SSTables, leveled compaction, k-way merge, bloom filters, write-ahead logging, crash recovery, and the engine behind Cassandra, RocksDB, ScyllaDB, and modern time-series databases.
advanced23 lessons~6h - 04
Build a Time-Series Database
Not startedBuild a time-series database like Prometheus/InfluxDB: ingest streams of (timestamp, value, labels), Gorilla compression for 10x storage savings, time-partitioned blocks, downsampling pipelines, PromQL-style queries, histograms with t-digest percentiles, and HA via federation/Thanos. The metrics infrastructure of every modern observability stack.
advanced10 lessons~3h - 05
Build a Column Store
Not startedBuild a columnar OLAP engine like ClickHouse/Parquet: row vs column layout, RLE/dictionary/bit-packing encodings, vectorized execution, predicate pushdown, hash + sort-merge joins, and the storage layer behind Snowflake, BigQuery, and modern data warehouses.
advanced10 lessons~3h - 06
Build a Graph Database
Not startedBuild a graph database like Neo4j/Memgraph: nodes + edges + properties storage, index-free adjacency for O(1) traversal, label/property indexes, Cypher-style query language, BFS/Dijkstra/PageRank algorithms, RDF triples and SPARQL alternative model, and the engine behind Twitter's social graph, fraud detection, and knowledge graphs.
advanced10 lessons~3h - 07
Build a Database from Scratch
Not startedBuild a fully functional relational database engine from the ground up. You'll implement a SQL parser, B-tree index, page-based storage, write-ahead log, ACID transactions, and a query planner — the same architecture used by SQLite, PostgreSQL, and MySQL. By the end, you'll understand exactly how every database you've ever used works internally.
advanced34 lessons~9h
Create a free account to track your progress across this path.