Home›Design›Application designs
Designs · what goes where, and why

Application designs

What kind of application should go in which database, and why?

You will learn: how to place each kind of application data in the right store, with fourteen design docs for common applications and a short picker to start from.

When a team asks me which database to use, the answer is rarely one database. It is a placement: this data here, that data there, and the reason for each. These pages are written as design docs, one per kind of application. Each starts from the workload, because the workload decides the store, not the other way round.

Start here

Where should this data go?

Answer four questions about one kind of data. The picker suggests a store and the design docs to read next. It is a starting point for a design review, not a verdict.

1. What is the main job of this data?
2. What does a lost or doubled write cost?
3. Peak writes per second?
4. How does it grow?
How I place data

Five rules I apply before naming a product

  1. One source of truth per kind of dataEvery other store holding it (a cache, a search index, a warehouse) is a copy that can be rebuilt from the source.
  2. Put rules where they cannot be skippedUniqueness, money that must balance, seats that must not be sold twice: in a database constraint, not only in application code.
  3. Separate the hot path from the scansReports, exports and searches never run on the primary that serves checkouts or logins.
  4. Decide retention on day oneData that grows forever needs time partitions and a plan for old data before the first row is written.
  5. Add a store only when the workload asks for itEvery extra system needs backups, monitoring, upgrades and someone on call. One relational database carries most applications a long way.
Fourteen design docs

Pick the one closest to your application

Record transactions

Serve content to many readers

Take in a stream

Keep fast state

Answer questions over history

Run AI agents

For how each family of database behaves, see Database families.

Tools for your own design

Write it, size it, place it, check it, change it

Part 3 of 4 · Design · 24 pagesAll pages

Which database does my application need? What kind of application data goes in which database, and why, as design docs, plus the anti-patterns and the decisions behind them.