Six species later, the pattern behind the whole field guide should be visible: every database is a bet about your access patterns. Relational bets you'll ask unforeseen questions; key-value bets you always know the name; document bets you read whole aggregates; wide-column bets you'll write torrentially along planned paths; graph bets your questions traverse; the specialists each bet on one structural property. Choosing well means knowing which bet your workload lets you win. First, the whole zoo on one page:
| species | unit of data | made cheap | made expensive / impossible | reach for it when… |
|---|---|---|---|---|
| relational | row (fact) | ad-hoc queries, joins, constraints, transactions | huge write streams; objects reassembled per read; scale-out (classically) | in doubt. Unknown future queries, invariants that must hold: the default for systems of record |
| key-value | opaque blob by key | GET/PUT by name at extreme speed & scale | any query by value or relationship | you always know the key: sessions, carts, flags, cache, counters |
| document | self-contained tree | read/write whole aggregate; per-doc atomicity; evolving fields | cross-document consistency; queries across the grain of the tree | aggregate-shaped data, one-doc-at-a-time access, fast-moving schema |
| wide-column | partitioned, sorted rows | massive sustained writes; range reads inside a partition | ad-hoc queries (declined!); multi-partition transactions; joins | write-heavy at scale with a known, finite query list: events, telemetry, feeds |
| graph | nodes + edges | variable-depth traversal; path queries; relationship properties | bulk scans/aggregation; sharding; being the only store | the core queries walk connections at depth ≥2: access analysis, fraud, recommendations |
| time-series | timestamped points | ordered ingest, 10–20× compression, range/rollup queries, retention | updates to old data; entity-centric queries | metrics, sensors, ticks: anything shaped like (time, value) |
| search | analyzed document | full-text lookup + relevance ranking | being a source of truth (relaxed durability/consistency) | humans type words into a box; always as a CDC-fed secondary |
| vector | embedding point | nearest-neighbor by meaning | exact matches, filters at scale (improving), source-of-truth duty | semantic similarity: search-by-meaning, recommendations, RAG |
1. What shape are the queries?: not the data; the data can be reshaped. By-name → KV. Aggregate-at-a-time → document. Ad-hoc/analytical → relational. Path-at-depth → graph. Time-ranged → TS. By-words / by-meaning → search / vector. 2. What's the read:write ratio and volume?: write-torrential with known queries → wide-column (LSM); read-heavy with rich queries → relational (B-tree) + a KV cache. 3. What must be true at every instant?: strong invariants (money, stock, uniqueness) → ACID at the core; tolerance for staleness buys you every relaxation in this guide. 4. What don't you know yet?: early products don't know their queries; that uncertainty is itself an argument for the model that doesn't require knowing (Lesson 1), until measurement says otherwise. Now pressure-test yourself:
Eight real workloads. Pick the primary engine for each: the feedback argues back. (Several have defensible seconds; the reasoning is the product.)
Real systems end up combining species: the e-commerce cliché is PostgreSQL as system of record, Redis caching sessions and hot pages, Elasticsearch powering the search box, a vector index for recommendations, ClickHouse or a warehouse for analytics: each fed from the core by CDC (replication course, lesson 5), so there's exactly one writable truth and N disposable, rebuildable projections of it. That architecture is right: eventually. The bill is real: every added engine is another thing to operate, secure, monitor, upgrade, and reason about during incidents, another consistency lag to explain, another skill on the hiring page. So the discipline that separates senior from clever: add a species only when a measured workload demands it, keep one system of record, and let everything else be a projection you could delete and rebuild. Boring first; specialized under duress; never two sources of truth.