Databases in depth
Open the database and watch a query run.
Sessions
Go in order. Each session is one idea you can drag, step and break.
01Relational basics
1 live · 4 comingTables, keys and SQL.
Interactive
Coming soonTables, keys and relations
Primary keys, foreign keys and why data is split into tables.
Interactive
Coming soonHow joins work
Inner, left and full joins, row by row.
Interactive
Coming soonGROUP BY and aggregation
Collapse rows into groups and summarize them.
Interactive
LiveWindow functions
Running totals and rankings without collapsing rows.
Open session →
Interactive
Coming soonNormal forms
Remove duplicate data step by step, and when to stop.
02How a query runs
1 live · 4 comingFrom SQL text to rows.
Interactive
Coming soonParse, plan, execute
What the database does with your SQL string.
Interactive
Coming soonReading EXPLAIN
Scans, joins, costs and the row estimates that drive them.
Interactive
LiveNested loop, hash and merge joins
Three ways to join tables, and when each wins.
Open session →
Interactive
Coming soonStatistics and bad plans
Why the planner guesses wrong, and how to fix it.
Interactive
Coming soonQuery tuning in practice
Rewrite, index or restructure: a slow query, fixed step by step.
03Storage and indexes
3 live · 3 comingHow data sits on disk and how it's found.
Interactive
Coming soonPages, rows and the heap
The 8 KB pages a table is really made of.
Interactive
LiveB-tree indexes
How an index finds one row among millions.
Open session →
Interactive
LiveComposite and covering indexes
Column order, and answering a query from the index alone.
Open session →
Interactive
Coming soonHash, GIN and GiST indexes
Indexes for equality, arrays, full text and geometry.
Interactive
LiveLSM trees
Fast writes with memtables, SSTables and compaction.
Open session →
Interactive
Coming soonRow vs columnar storage
Why analytics databases store columns together.
04Transactions and concurrency
2 live · 4 comingMany users, one consistent database.
Interactive
Coming soonACID in practice
What each letter actually guarantees.
Interactive
LiveThe lost update
Two deposits at once and one disappears: four ways to stop it.
Open session →
Interactive
LiveMVCC
Readers don't block writers: row versions and snapshots.
Open session →
Interactive
Coming soonRow locks and lock waits
Who waits for whom, and SELECT FOR UPDATE.
Interactive
Coming soonDeadlocks
Two transactions waiting on each other, and how the database breaks the tie.
Interactive
Coming soonOptimistic vs pessimistic locking
Lock first, or check for conflicts at the end.
05Durability and recovery
1 live · 3 comingNot losing committed data.
Interactive
LiveThe write-ahead log
Write the change to the log first, then to the table.
Open session →
Interactive
Coming soonCheckpoints and crash recovery
Replay the log after a crash.
Interactive
Coming soonBackups and point-in-time recovery
Restore the database to 10:42 this morning.
Interactive
Coming soonVacuum and bloat
Cleaning up dead row versions in Postgres.
06Scaling a database
3 live · 1 comingWhen one database isn't enough.
Already live in other tracks: Replication and stale reads, Sharding: choosing the shard key
Interactive
LiveConnection pooling
Why 1,000 app servers can't each open 100 connections.
Open session →
Interactive
LiveRead replicas and lag
Spread reads, and handle data that's a few seconds old.
Open session →
Interactive
LiveTable partitioning
Split one huge table by date or key.
Open session →
Interactive
Coming soonCaching in front of the database
Redis as a cache, and keeping it in sync.
07Beyond relational
0 live · 6 comingOther ways to store data.
Interactive
Coming soonKey-value stores: inside Redis
Data structures, persistence and single-threaded speed.
Interactive
Coming soonDocument databases
Store whole objects, query by fields, and model relations.
Interactive
Coming soonWide-column stores
Cassandra-style tables built for huge write volumes.
Interactive
Coming soonGraph databases
Query relationships directly: friends of friends.
Interactive
Coming soonInverted indexes for search
How full-text search finds words fast.
Interactive
Coming soonVector indexes: HNSW
Approximate nearest-neighbour search through a layered graph.
08Databases in practice
0 live · 4 comingLiving with a database in production.
Interactive
Coming soonSchema migrations
Change tables safely while the app is running.
Interactive
Coming soonFinding slow queries
Slow query logs, pg_stat_statements and where to look first.
Interactive
Coming soonORMs and N+1 queries
What your ORM sends to the database.
Interactive
Coming soonDatabase security
Roles, row-level security and keeping credentials safe.
In production
Tools you can use
36 technologies across 11 live sessions. Same names in any language — pick a session to see how the idea maps to the real world.
Services, platforms, protocols and standards — not one stack.
Every modern SQL database supports window functions.
Every SQL planner chooses between these three.
B-trees are the default index in almost every relational database.
- PostgreSQL indexesSoftware
CREATE INDEX makes a B-tree unless you ask for another type.
Documentation ↗ - MySQL InnoDBSoftware
Tables are stored as B+ trees ordered by the primary key.
Official site ↗ - SQLiteSoftware
Every table and index is a B-tree in one file.
Official site ↗ - EXPLAINStandard
Shows whether a query used an index scan or a sequential scan.
Documentation ↗
Column order in an index decides which queries it helps.
Most write-heavy databases are built on LSM trees.
The same bug appears in any database; the fixes are standard SQL.
Postgres, MySQL InnoDB and Oracle all use multi-version concurrency control.
Every durable database writes a log before data pages.
Poolers sit between apps and Postgres in most production setups.
- PgBouncerSoftware
Lightweight Postgres connection pooler.
Official site ↗ - Amazon RDS ProxyService
Managed pooling for RDS and Aurora.
Official site ↗ - SupavisorSoftware
Supabase's pooler; limits come with the compute size.
Documentation ↗ - Neon poolingService
PgBouncer in transaction mode, up to 10,000 clients.
Documentation ↗ - HikariCPSoftware
The standard JVM connection pool.
GitHub ↗
Managed databases make replicas one click; lag is still yours.
Large time-series tables are almost always partitioned.
Roadmap
Coming soonA step-by-step path through the track, with sessions and practice at each stage.
- Stage 1
Relational basics and SQL
- Stage 2
How a query runs
- Stage 3
Storage, indexes and transactions
- Stage 4
Durability and scaling
- Stage 5
Beyond relational
Projects
Coming soonBuild something real to lock in the skill.
- Model an e-commerce schema
- Make a slow query fast
- Build a ledger that never loses money