Databases
What a database does with your query: indexes, joins, transactions, locks, and the log that keeps data safe.
Indexes and B-Trees
A million rows found in three hops. How a B-tree index turns a full scan into a short walk from root to leaf.
Not started.Intermediate11 minThe N+1 Query Problem
A loop that loads one author per post runs 101 queries. Fetching the authors together runs 2.
Not started.Beginner7 minSQL Joins
Two small tables and six joins. Which rows survive inner, left, right, full, cross and self joins.
Not started.Beginner10 minTransaction Isolation Levels
Four levels, and the anomaly each one still allows: dirty reads, non-repeatable reads, phantoms.
Not started.Advanced12 minDeadlocks
Two transfers lock the same two accounts in opposite order and wait forever. Locking in one order fixes it.
Not started.Intermediate8 minConnection Pools
One slow query holds every connection and requests pile up outside, while the database itself sits idle.
Not started.Intermediate8 minNULL and Three-Valued Logic
NULL = NULL is neither true nor false in SQL. Why the answer is unknown, and what IS NULL is for.
Not started.Beginner6 minPagination: OFFSET or Keyset
OFFSET 1,000,000 reads a million rows before returning ten. Paging after the last id reads only the ten.
Not started.Intermediate7 minThe Write Path and the Write-Ahead Log
Five stops before a write is done: parse, lock, append to the log, flush to disk, acknowledge.
Not started.Advanced10 minSQL or NoSQL
A short set of questions about your data that leads to an answer. Most paths end at the boring choice.
Not started.Beginner8 minTransactions and ACID
Money leaves one account and the power fails before it reaches the other. A transaction makes the two steps happen together or not at all.
Not started.Beginner9 minNormalization
Store each fact once. A table that repeats a customer's address on every order will sooner or later hold two different addresses.
Not started.Beginner9 min