Why there are so many types of databases
Published on 2026-09-12 by frfrand
Why there are so many types of databases: what each family optimizes and what it pays (relational, document, key-value, columnar, graphs) and when each one wins.

Short answer: There are so many types of databases because each family optimizes something different and pays for it elsewhere: relational databases, integrity and complex queries; document databases, shape flexibility; key-value databases, speed; columnar databases, massive aggregations; graph databases, multi-hop relationships; and time-series and search databases, their specific cases. For most projects, the sensible thing is to start with a relational one and add another only when a measured limit is reached.
Twenty years ago the answer was a single one: relational database. Today there are dozens of options and the choice generates entire discussions.
The reason is not fashion. It is that each database family optimizes something different, and pays for it elsewhere. Knowing the trade-off of each one turns the discussion into a decision.
Relational
Data in tables with explicit relationships. Postgres, MySQL, SQLite.
They optimize: integrity and complex queries. You can ask "all customers who bought more than three times last month and did not return" in a single query, and trust the result.
They pay: the schema is rigid. Changing it requires a planned migration.
Document
They store complete objects, like JSON. MongoDB, CouchDB.
They optimize: shape flexibility. Each record can have different fields, and there is no migration to add one.
They pay for it: relationships become your problem. Without real joins, you end up making several queries and joining in the application, or duplicating data and keeping it synchronized manually.
An honest note: many people chose documents for flexibility and ended up implementing manually what a relational database already did. And today Postgres stores indexable JSON, which erased much of that advantage.
Key-value
One key, one value, extremely direct access. Redis, Memcached.
They optimize: speed. Reads and writes in microseconds, because they live in memory.
They pay for it: there are no queries. You can only search by the exact key. And if it's memory only, a restart wipes everything (Redis can persist, but that's not its strong suit).
It's almost always used alongside another database, not instead of it: cache, sessions, queues, counters, rate limits.
Columnar
They store by column instead of by row. ClickHouse, BigQuery.
They optimize: aggregations over millions of rows. "Average sales by region over the last three years" over a billion records, in seconds, because they only read the columns they need.
They pay for it: they are bad for transactional work. Fetching a full row or updating a record is expensive.
Graph
Nodes and relationships as first-class citizens. Neo4j.
They optimize: questions about relationships across multiple hops. "Friends of friends who worked at the same company" is natural here and horrible in SQL.
They pay: everything else. They are specialized.
Time series and search
Time series (InfluxDB, TimescaleDB): time-ordered measurements, compressed, with automatic deletion of old data. Metrics and sensors.
Search (Elasticsearch, OpenSearch): text with relevance, typo tolerance, language analysis. A SQL LIKE doesn't come close.
The honest default
For most projects: start with a relational database. It handles many more data formats than its reputation suggests, and solves integrity and complex queries that are later very expensive to reimplement.
Add a second one only when a measured limit appears. And keep in mind the real cost: two databases are two backups, two restores to test, and a consistency problem between both that is now yours.
The most common and healthiest pattern is: a relational database that holds the truth, and Redis ahead for what is read a lot.


How to choose the database for a real project?
For a catalog with orders, customers, and related payments, PostgreSQL is usually a good starting point. For session caching or repeated query results, Redis can complement that database; it is not a direct replacement. A document engine may make sense if the data and queries favor that model.
In ArduMaker you can manage PostgreSQL, MySQL, and Redis within a VPS environment. Before choosing, write the main queries, estimate the amount of data, decide on the backup scheme, and check how you would migrate to another provider. Team familiarity and maintenance are as important as the engine's features.
Frequently asked questions
SQL or NoSQL for a new project? In most cases, SQL: a relational database like PostgreSQL covers structured data, relationships, and, with JSONB, also flexible parts. NoSQL makes sense when the access pattern truly requires it.
Does Redis replace my database? No. It is used alongside: caching, sessions, queues, and counters. The source of truth remains in the main database.
When is a columnar database convenient? When the main task is analyzing many rows (reports, metrics, data warehouse) and not updating individual records.
How many databases should a project have? As few as possible. Each extra database is another backup, another restore to test, and another consistency issue.
Related: PostgreSQL explained · Redis and its uses.