Visual course · Systems fundamentals

How databases work.

A database looks like a black box you send queries to — but inside is some of the most elegant engineering in software. This course opens it up: how indexes make lookups instant, how transactions and the write-ahead log survive a crash, how isolation keeps concurrent writes honest, how caching absorbs read load, and how vector databases search by meaning. Five short episodes, each embedded with the deeper reference.

5 episodes ~70 min Visual / first-principles Free · no sign-up
Your progress0 / 5 complete

What you'll understand

By the end you'll know what actually happens when you run a query and why databases make the trade-offs they do: why the right index is the difference between microseconds and minutes, how ACID survives a power cut, why isolation levels exist and what each one lets slip, when a cache helps and how it bites back, and how the vector databases behind modern AI differ from the relational ones. It's the systems-interview core and the daily reality of any data-backed product.

IndexesB-treesTransactionsACIDWrite-ahead logIsolation levelsCachingInvalidationVector searchEmbeddings
The curriculum

Five episodes, in order

01
Episode 1 · Indexes

Finding 1 Row in a Billion, Instantly

Without an index, a query reads every single row; with one, it jumps straight to the answer. See how a B-tree turns finding one row in a billion from a slow scan into a handful of hops — and why every index you add speeds reads but taxes writes.

What you'll learn
  • Full scan vs index lookup
  • How a B-tree stays shallow and fast
  • The read-speed / write-cost trade
02
Episode 2 · Transactions

The $100 That Must Never Vanish

A transfer debits one account and credits another — and a crash in between must never leave the money half-moved. Transactions give you all-or-nothing guarantees, and the write-ahead log is the trick that makes them survive a power cut.

What you'll learn
  • ACID in plain terms
  • Atomicity + rollback
  • The write-ahead log (WAL)
03
Episode 3 · Isolation

One Ticket, Sold Twice

Two people buy the last ticket at the same instant — who actually gets it? Isolation levels decide how concurrent transactions see each other's work, trading strictness for throughput to prevent lost updates, dirty reads and the double-sell.

What you'll learn
  • The anomalies (dirty/non-repeatable/phantom)
  • Isolation levels + what each allows
  • Optimistic vs pessimistic concurrency
04
Episode 4 · Caching

The Trick That Saves Your Database

Reads pile up until the database buckles under load. A cache keeps hot data in memory in front of it, absorbing most of the traffic so the database barely notices — as long as you handle invalidation and don't let the whole herd stampede the origin at once.

What you'll learn
  • Cache-aside + read-through patterns
  • Invalidation + TTLs
  • The thundering-herd problem
05
Episode 5 · Vector Databases · Finale

Searching by Meaning, Not Match

The finale jumps to the modern frontier: classic databases match exact values, but AI needs to search by meaning. Vector databases store embeddings and find nearest neighbors in high-dimensional space — the retrieval engine behind RAG and every "search that understands you" feature.

What you'll learn
  • Exact match vs nearest-neighbor search
  • Embeddings + similarity
  • Approximate search (HNSW) at scale

Opened the black box? Now design one.

Everything you just saw becomes a design decision at scale. The interactive system-design walkthroughs build the key-value stores, caches and search engines these ideas power — step by step.