Databases explained

How data is stored so it can be asked questions: rows that meet in a join, and why transactions and analytics want different engines.

17 conceptsBeginner to Intermediate

Every databases concept

DatabasesBeginner

SQL joins

Inner, left, right and full: which rows survive when two tables meet.
OPEN LESSON
DatabasesIntermediate

OLTP vs OLAP

Why the database that takes orders is not the one that analyses them.
OPEN LESSON
DatabasesBeginner

Database normalization (1NF to 3NF)

One repetitive table split into three, one normal form at a time.
OPEN LESSON
DatabasesBeginner

Hash indexes

One hash, one bucket, one row: fast exact lookups that cannot do ranges.
OPEN LESSON
DatabasesIntermediate

Composite indexes

An index on two columns, and why the order of those columns decides what it can do.
OPEN LESSON
DatabasesIntermediate

Transaction isolation levels

Four levels that decide what one transaction may see of another’s work.
OPEN LESSON
DatabasesIntermediate

Dirty reads, phantom reads and anomalies

Four ways two overlapping transactions can show each other wrong data.
OPEN LESSON
DatabasesBeginner

NoSQL databases

Four ways to store data without tables, and what each one trades away.
OPEN LESSON
DatabasesBeginner

SQL vs NoSQL

The same order stored both ways, and what each choice costs and buys.
OPEN LESSON
DatabasesIntermediate

Database replication

Copies of a database kept in step, and what happens when one falls behind.
OPEN LESSON
DatabasesIntermediate

Connection pooling

Why apps keep database connections open and share them between requests.
OPEN LESSON
DatabasesIntermediate

Inverted indexes

How search finds every document containing a word without reading them.
OPEN LESSON
DatabasesIntermediate

Columnar storage (Parquet)

Why storing a table column by column lets a query read less and skip more.
OPEN LESSON
DatabasesIntermediate

Change data capture

How other systems follow a database by reading its log of changes.
OPEN LESSON
DatabasesIntermediate

MapReduce

Count words across many machines with map, shuffle and reduce.
OPEN LESSON
DatabasesBeginner

Data pipelines and orchestration

A nightly report as a graph of tasks: scheduled, retried and backfilled.
OPEN LESSON
DatabasesIntermediate

Backups and point-in-time recovery

Rewind a database to the minute before a mistake, using backups and its log.
OPEN LESSON