Database Engineering Roadmap

One order, from what a database is to distributed consistency, with the internals descent at the end. Start at Foundations; every stage names what it needs first and what you should be able to do before moving on. Progress is stored locally in your browser.

Where to start

0 / 78 lessons masteredNot started 78Learning 0Practicing 0Mastered 0
  1. 1

    Foundations

    Start here
    0/1

    What a database is for — durability, concurrency and access paths — and what the engine does with a query between the text you send and the rows you get back. One lesson, What a Database Actually Is, that gives every later stage its vocabulary: pages, indexes, transactions, the log.

    Before moving on: Explain why an application keeps its data in a database rather than in files, and name the three problems the engine solves for you.

  2. 2

    SQL

    0/5

    Reading data. The logical evaluation order of a SELECT, the three-valued logic of NULL, filtering and aggregation, every kind of join, then subqueries, CTEs and window functions. Everything after this stage is expressed in queries, so the queries have to come first.

    Before moving on: Write a query with a join, a GROUP BY with a HAVING filter and a window function from memory, and predict which rows a LEFT JOIN keeps when the match is NULL.

    Needs first:Foundations
  3. 3

    Data Modeling

    0/4

    Turning requirements into tables. Start from the access patterns, then entities, relationships and keys, then remove update anomalies with normalization — and learn when to put duplication back on purpose. Comes after SQL because a schema is only good for the queries it has to answer.

    Before moving on: Take a short requirements brief, draw the tables with primary and foreign keys, normalize to 3NF, and say which access pattern would justify denormalizing.

    Needs first:SQL
  4. 4

    Indexes

    0/4

    Why a query is slow, how a B-tree fixes it, composite indexes and the leftmost-prefix rule, the other index types, and the decision to add one at all. Needs SQL to know what an index has to serve and Modeling to know which columns a query filters on.

    Before moving on: Given a WHERE and an ORDER BY, write the composite index that serves both, and say what that index costs on every write.

    Needs first:SQLData Modeling
  5. 5

    Query Execution & Optimization

    0/3

    Parser, planner and executor, then how to read EXPLAIN ANALYZE and find the node that is actually slow. Comes right after Indexes because the plan is where you see whether the index you added was used.

    Before moving on: Read an EXPLAIN ANALYZE plan, point at the bottleneck node, and say whether an index, a rewrite or fresh statistics is the fix.

    Needs first:Indexes
  6. 6

    Transactions & Concurrency

    0/5

    ACID as four separate guarantees, then what goes wrong when transactions overlap: lost updates, dirty and non-repeatable reads, phantoms, write skew. Isolation levels as the menu of fixes, MVCC as the mechanism most engines use, and locks and deadlocks when MVCC is not enough.

    Before moving on: Name the anomaly a given interleaving produces, choose the weakest isolation level that prevents it, and explain why a deadlock happened from the order two transactions took their locks.

    Needs first:SQL
  7. 7

    PostgreSQL

    0/3

    The concrete implementation of everything so far: types and tables, JSONB and full-text search, extensions, partitioning, VACUUM and connection management. Sits after Execution and Transactions because its operations only make sense once you know what plans and MVCC are.

    Before moving on: Pick the right PostgreSQL type for a column, query a JSONB document with an index behind it, and explain what VACUUM cleans up and why it must run.

  8. 8

    Caching, Redis & NoSQL

    0/6

    Redis as data structures rather than "a cache", the caching patterns and their hazards (stale reads, stampedes, invalidation), then the non-relational models — document, wide-column, graph — and the access patterns that make one of them the right choice. Needs Modeling to compare against and Transactions to know what consistency you give up.

    Before moving on: Choose between cache-aside and write-through for a given read/write mix, and justify a document or wide-column model over tables from the access patterns alone.

  9. 9

    Vector Databases

    0/1

    Embeddings, similarity measures, approximate nearest-neighbour indexes such as HNSW, metadata filtering and hybrid search — the storage layer under retrieval-augmented generation. An ANN index is still an index, so this comes after Indexes and after choosing a data model.

    Before moving on: Explain why exact nearest-neighbour search does not scale, what HNSW trades for speed, and when a pgvector column beats a separate vector store.

  10. 10

    Scaling & Distributed Databases

    0/4

    The scaling ladder in order — pooling, read replicas, caching, partitioning, sharding — then replication, and distributed consistency without the slogans: quorums, consensus, what a partition really costs. Last of the practical stages because every rung assumes the ones before it.

    Before moving on: Say which rung of the scaling ladder a given symptom calls for, explain replication lag to a teammate, and state what a quorum read does and does not guarantee.

  11. 11

    Internals · Storage & Pages

    0/4

    The start of the Build-AtlasDB journey (V0–V3). Bytes, records, page files, slotted pages: how a table physically exists on disk and why the page is the unit of everything the engine does. Only Foundations is needed; this is where the internals layer begins.

    Before moving on: Lay out a row of mixed-width columns as bytes, explain what a slotted page buys over fixed slots, and say why a read costs whole pages rather than rows.

    Needs first:Foundations
  12. 12

    Internals · B+ Trees

    0/5

    Derive the index from the sequential scan, then build the page-oriented B+ tree, watch splits and merges, and see why fanout beats Big-O on disk. Hash indexes close the stage (V4–V5). Needs the practical Indexes stage for what an index must answer and Storage for what a page is.

    Before moving on: Explain why a B+ tree of a billion keys is three or four pages deep, and why a hash index cannot serve a range query.

  13. 13

    Internals · Buffer Pool, WAL & Recovery

    0/6

    The buffer pool and its replacement policies, one read and one write followed end to end, then the write-ahead log, checkpoints and the restart sequence after a crash (V6–V7). Needs Storage for the pages being cached and Transactions for what COMMIT promises.

    Before moving on: Trace a write from UPDATE to durable on disk, and explain why the log record must reach disk before the dirty page does.

  14. 14

    Internals · Transactions & MVCC

    0/7

    Transactions as mechanisms: lock tables, waits-for graphs and deadlock detection, version chains, snapshots, dead tuples, and the same workload run under three isolation levels (V8–V9). Builds on the practical Transactions stage and on the WAL, which is what makes a version durable.

    Before moving on: Walk an UPDATE through MVCC — which version is written, which snapshot sees it, when it becomes dead — and find the cycle in a waits-for graph.

  15. 15

    Internals · Query Engine

    0/6

    Parser, AST, planner, cost model and join algorithms, then one SQL statement followed from text to result through the real in-browser engine (V10). Needs the practical Execution stage for reading plans and B+ Trees for the access paths the planner chooses between.

    Before moving on: Explain why the planner picks a hash join over a nested loop for a given pair of table sizes, and what a wrong row estimate does to that choice.

  16. 16

    Internals · LSM Trees

    0/6

    The write-optimised alternative to the B+ tree: memtables, SSTables, bloom filters, compaction and the three amplifications, closing with an honest B+ tree vs LSM comparison. Needs B+ Trees to compare against and the WAL, which an LSM engine reuses for its memtable.

    Before moving on: Explain why an LSM write is cheap and a read is not, what compaction is paying for, and choose B+ tree or LSM from a workload description.

  17. 17

    Internals · PostgreSQL & InnoDB

    0/3

    The general mechanisms as two real engines implement them: heap tuples, xmin/xmax, shared buffers and VACUUM in PostgreSQL versus clustered primary keys, redo and undo logs in InnoDB, and why their physical layouts change query cost. Needs the practical PostgreSQL stage and MVCC internals.

    Before moving on: Explain why a secondary-index lookup costs two tree walks in InnoDB and one heap fetch in PostgreSQL, and what each engine does with an old row version.

  18. 18

    Internals · Distributed & Performance

    0/5

    How changes actually propagate — the replication stream, partition functions, quorums, a failure simulator you can break — then "why is it slow" one layer down: page reads, buffer misses, scan choice, index maintenance, WAL and compaction, with the central playground to turn the knobs (V11). Needs the practical Distributed stage plus the buffer pool, WAL and LSM mechanisms the knobs control.

    Before moving on: Predict what a replica sees after a leader failover, and attribute a slow query to page reads, buffer misses, index maintenance, WAL or compaction using the playground.