Tech & AI

How to Choose a Database (Without Overthinking It)

How to Choose a Database (Without Overthinking It)

Relational, document, key-value, search or analytical? A practical way to pick the right one for the job, and when to stop at one.

Database choice attracts more debate than almost any other technical decision, and most of that debate is irrelevant to the project in front of you. Start with the shape of your data and your queries, and the list narrows quickly.

The first question: what are your queries?

Not what your data looks like โ€” how you will ask for it.

  • Do you look things up by one identifier and just fetch them?
  • Do you filter and combine records by several conditions?
  • Do you need full-text search with ranking?
  • Do you need aggregates across enormous volumes for reporting?

Each of those points at a different family of tools. Getting this wrong is far more expensive than picking a slightly slower engine.

Choose the database for the questions you will ask, not for the diagram you drew.

The main families

FamilyBest atTypical choice
RelationalStructured data, joins, transactions, evolving queriesPostgreSQL or MySQL
DocumentFlexible nested records fetched as a wholeMongoDB
Key-valueExtremely fast lookup by a single keyRedis
SearchRanked full-text search and faceted filteringElasticsearch, OpenSearch
AnalyticalAggregating large volumes for reportingClickHouse, BigQuery
GraphDeep relationship traversalNeo4j

Why the relational default is so strong

For most applications, a relational database is the correct answer, and the reasons are practical rather than fashionable:

  • Transactions. Multi-step changes either all happen or none do. This prevents whole classes of corruption.
  • Constraints. The database itself enforces uniqueness and valid references.
  • Joins. You can answer questions you did not anticipate when you designed the schema.
  • Maturity. Decades of tooling, backups, monitoring and people who know it.

The common beginner mistake is reaching for an exotic store because it sounds modern, then rebuilding joins, transactions and constraints by hand โ€” badly.

When to go beyond it

Reach for something else when you have a specific, measurable reason:

  • Reads are too slow and you re-read the same record constantly. A cache in front of the database usually solves this, before changing the database itself.
  • Your records are genuinely document-shaped and always read as a whole, with no cross-record reporting.
  • Search quality is the product. Ranked relevance, synonyms and faceting are a different problem from storage.
  • Reporting queries stall the application. Move analytics to a separate analytical store fed by a pipeline.

The habits that matter more than the engine

  • Benchmark with your real queries, not with synthetic numbers from a blog post.
  • One database is easier to operate than four. Operational complexity is a tax paid forever.
  • Indexes are usually the missing piece. A slow query is more often a missing index than a wrong engine.
  • Plan backups from day one. An unbacked-up database is a future outage.
  • Measure before switching. Migration is expensive; a query plan often is not.

The bottom line

List the queries you will actually run. If they are structured and relational, start there and stay there. Add specialised stores only when a specific, measured problem demands one.

Related articles

Practical Prompt Engineering for AI Tools

Practical Prompt Engineering for AI Tools

Better prompts are less about magic words and more about clear thinking. Here are the habits that reliably get more useful answers from AI tools.

๐Ÿ“ Tech & AI ๐Ÿ—“ September 30, 2026 โฑ 8 min read
Using AI in Your Daily Work Without Losing Your Edge

Using AI in Your Daily Work Without Losing Your Edge

AI assistants can save real hours each week โ€” if you use them for the right tasks. A practical guide to weaving them into everyday work.

๐Ÿ“ Tech & AI ๐Ÿ—“ October 1, 2026 โฑ 8 min read
Cybersecurity Basics: Protecting Your Accounts and Devices

Cybersecurity Basics: Protecting Your Accounts and Devices

Most breaches do not start with brilliant hackers. They start with a reused password, an ignored update, or a link that should not have been clicked. Here is how to close those gaps.

๐Ÿ“ Tech & AI ๐Ÿ—“ October 2, 2026 โฑ 8 min read

Suggested summaries

Tech & AI Homo Deus book cover

Homo Deus

Yuval Noah Harari ยท 2016
โ˜…โ˜…โ˜…โ˜…โฏจ 4.5

Harari looks past famine, plague and war to ask what humanity will chase next: immortality, engineered happiness and god-like power over life itself.

Tech & AI
Tech & AI Life 3.0 book cover

Life 3.0

Max Tegmark ยท 2017
โ˜…โ˜…โ˜…โ˜…โฏจ 4.5

Max Tegmark maps the choices ahead for artificial intelligence โ€” utopia, catastrophe or something in between โ€” and why values matter as much as code.

Tech & AI
Tech & AI The Pragmatic Programmer book cover

The Pragmatic Programmer

Andrew Hunt ยท 1999
โ˜…โ˜…โ˜…โ˜…โ˜… 5

Hunt and Thomas distil decades of hard-won craft into practical habits: stay curious, keep code honest, automate the boring parts, and own your work.

Tech & AI