Databases: How each kind works, and when to use it
A tour of the database families (relational, key-value, document, wide-column, graph, search, time-series, columnar, vector and distributed SQL): how each stores data, what it is good and bad at, and the nuances of the main engines.
0 of 12 modules complete · 0 in progress · 12 to come
Locked. These lessons are not open to the public yet.
-
01
Foundations
What every database has to solve, whatever its type.
0 / 10- 1.1What a database is, and what it promisesSoon
- 1.2Data models and access patternsSoon
- 1.3Storage engines: B-trees and LSM treesSoon
- 1.4Indexes and how queries use themSoon
- 1.5Transactions and ACIDSoon
- 1.6Isolation levels and anomaliesSoon
- 1.7Replication and failoverSoon
- 1.8Partitioning and shardingSoon
- 1.9Consistency, CAP and PACELCSoon
- 1.10Durability: WAL, backups and recoverySoon
-
02
Relational databases
Tables, joins and transactions: the default for good reasons.
0 / 6- 2.1The relational model, SQL and normalizationSoon
- 2.2Query planning and reading EXPLAINSoon
- 2.3PostgreSQLSoon
- 2.4MySQL and InnoDBSoon
- 2.5SQLiteSoon
- 2.6SQL Server and OracleSoon
-
03
Key-value stores
One key, one value, very fast.
0 / 6- 3.1The key-value modelSoon
- 3.2RedisSoon
- 3.3MemcachedSoon
- 3.4DynamoDBSoon
- 3.5etcd and coordination storesSoon
- 3.6RocksDB and embedded enginesSoon
-
04
Document databases
Self-contained records with flexible shape.
0 / 4- 4.1The document model and when to embedSoon
- 4.2MongoDBSoon
- 4.3CouchDB and CouchbaseSoon
- 4.4FirestoreSoon
-
05
Wide-column stores
Write-heavy, partitioned by design.
0 / 4- 5.1The wide-column modelSoon
- 5.2CassandraSoon
- 5.3ScyllaDBSoon
- 5.4Bigtable and HBaseSoon
-
06
Graph databases
When the relationships are the data.
0 / 3- 6.1Property graphs, RDF and traversalSoon
- 6.2Neo4jSoon
- 6.3Graphs in SQL, and Amazon NeptuneSoon
-
07
Search engines
Finding text fast, and ranking it.
0 / 3- 7.1Inverted indexes and relevanceSoon
- 7.2Elasticsearch and OpenSearchSoon
- 7.3Solr and LuceneSoon
-
08
Time-series databases
Data that arrives in time order and is read in ranges.
0 / 4- 8.1Time-series workloads: retention, rollups and cardinalitySoon
- 8.2InfluxDBSoon
- 8.3TimescaleDBSoon
- 8.4PrometheusSoon
-
09
Columnar and analytics
Scanning billions of rows to answer one question.
0 / 4- 9.1Columnar storage, OLTP vs OLAPSoon
- 9.2ClickHouseSoon
- 9.3BigQuery and SnowflakeSoon
- 9.4Druid and PinotSoon
-
10
Vector databases
Nearest-neighbour search over embeddings.
0 / 3- 10.1Embeddings and approximate nearest neighboursSoon
- 10.2pgvectorSoon
- 10.3Pinecone, Milvus and QdrantSoon
-
11
Distributed SQL
SQL and transactions, spread across machines.
0 / 4- 11.1Why distributed SQL existsSoon
- 11.2SpannerSoon
- 11.3CockroachDBSoon
- 11.4TiDB and YugabyteDBSoon
-
12
Choosing and operating
Picking the right one, then living with it.
0 / 5- 12.1Choosing a databaseSoon
- 12.2Polyglot persistence and keeping stores in syncSoon
- 12.3Schema migrations without downtimeSoon
- 12.4Backups, restores and disaster recoverySoon
- 12.5Monitoring and slow-query tuningSoon