Database Engineering
What database, data model, index, query strategy and consistency model should I use — and why? Two layers: the practical layer teaches how to use databases correctly; the internals layer underneath derives why they behave that way — against a real SQL engine running in your browser.
Your path through Database Engineering
Start with these 5 lessons
Then follow the stages in order
Each stage builds on the ones before it. Labs and simulators sit right after the lessons they exercise. Open a stage to see its lessons. Full roadmap with goals →
Foundations0 of 1 lessons done
SQL0 of 5 lessons done
Data Modeling0 of 4 lessons done
Query Execution & Optimization0 of 3 lessons done
Caching, Redis & NoSQL0 of 6 lessons done
- Redis: Data Structures, Not a CacheIntermediate≈ 5 min
- Caching PatternsIntermediate≈ 5 min
- Cache Invalidation, Stampedes and Hot KeysIntermediate≈ 5 min
- SQL vs NoSQL: Choosing a Data ModelIntermediate≈ 5 min
- Document Databases: Embed or ReferenceIntermediate≈ 5 min
- Wide-Column, Graph, Search and Time-SeriesIntermediate≈ 5 min
Vector Databases0 of 1 lessons done
Scaling & Distributed Databases0 of 4 lessons done
Internals · Storage & Pages0 of 4 lessons done
Internals · Buffer Pool, WAL & Recovery0 of 6 lessons done
Internals · Transactions & MVCC0 of 7 lessons done
- A Transaction, Inside the EngineAdvanced≈ 15 min
- Concurrency Control: Schedules and SerializabilityAdvanced≈ 15 min
- The Lock ManagerAdvanced≈ 15 min
- Deadlock Detection: The Waits-For GraphAdvanced≈ 15 min
- MVCC Internals: Version Chains and SnapshotsAdvanced≈ 15 min
- UPDATE, DELETE and Dead TuplesAdvanced≈ 20 min
- Isolation Levels: The Mechanism Behind EachAdvanced≈ 20 min
Internals · Query Engine0 of 6 lessons done
Internals · LSM Trees0 of 6 lessons done
- LSM Trees: Why Some Engines Favour WritesAdvanced≈ 15 min
- SSTables: The Immutable Sorted FileAdvanced≈ 15 min
- Bloom Filters: Skipping Files That Cannot Contain the KeyAdvanced≈ 15 min
- Compaction: The Merge That Pays for Cheap WritesAdvanced≈ 15 min
- Write, Read and Space AmplificationAdvanced≈ 15 min
- Storage Engine Comparison: B+ Tree vs LSM TreeAdvanced≈ 15 min
Internals · Distributed & Performance0 of 5 lessons done
- Replication Internals: WAL Shipping, LSNs, Lag and FailoverAdvanced≈ 20 min
- Partitioning Internals: Key → Partition Function → NodeAdvanced≈ 20 min
- Distributed Fundamentals: Partial Failure, Quorums, Consensus, RecoveryAdvanced≈ 20 min
- Performance Internals: Why the Slow Node Is SlowAdvanced≈ 15 min
- The Database Internals PlaygroundAdvanced≈ 15 min
The judgment we teach
Mirror of the DSA and Agentic chains: the skill is choosing how to store and reach the data, not memorising syntax.
- Data→
- Access Pattern→
- Data Model→
- Schema→
- Index→
- Query→
- Transaction→
- Consistency→
- Scale
Start here
Two layers
Practical lessons answer how do I build with databases; internals lessons answer why do databases behave this way. They link to each other constantly — a learner can start at “why is this query slow?” and descend to storage reads.
Every lesson here ends with “See how this works internally →”.
Problem → naive solution → why it breaks → mechanism → trade-offs → real database. Includes Build AtlasDB and a crash button. →
Modules
Connected to the other domains
The same structures and systems, seen from the database side.