Skip to content

Which Database? Explained

Answer a few questions about the shape of your data, how strict the schema must be, how you mainly query, and your scale and consistency needs to choose between a relational (Postgres), document, key-value, wide-column, vector, or search database.

A database is optimized for a particular shape of data and a particular way of asking for it. The first fork is the shape: related rows in tables, nested documents, opaque values by key, high-dimensional vectors, or raw text. The second is the contract: how strict the schema is and how consistent the reads must be. Match the database to the shape and the contract, not to fashion. The questions below turn that match into a recommendation, ranked against the alternatives.

Decision guide · 6 options

The options

Relational / SQL (Postgres, MySQL)

Structured tables with rows, columns, joins, and ACID transactions.

The default for most products: related entities, strict schema, complex queries with joins, and strong consistency. Postgres alone covers the majority of use cases.

Document (MongoDB, Firestore, DynamoDB)

Nested JSON-like documents you fetch as a whole.

Data whose shape varies or evolves fast, where you load an entire aggregate by id and rarely join across collections.

Key-value (Redis, Memcached, DynamoDB)

Opaque values fetched by a single key in under a millisecond.

Caches, sessions, rate limiters, and leaderboards where speed matters more than durability and you never query inside the value.

Wide-column (Cassandra, ScyllaDB, Bigtable)

Partitioned rows built for massive write throughput.

Time-series, event logs, and telemetry at huge scale where you write far more than you read and eventual consistency is acceptable.

Vector (pgvector, Pinecone, Milvus)

High-dimensional embeddings queried by similarity.

Semantic search, recommendations, and retrieval-augmented generation, where nearest-neighbor over embeddings is the core operation.

Search (Elasticsearch, Meilisearch, Typesense)

Inverted index for fast full-text search and ranking.

Search boxes, faceted filters, and typo-tolerant ranking across millions of text documents that a LIKE query cannot serve.

Which one fits you?

Answer a few questions to get a recommendation.

Question 1 of 4

What is the primary thing you store?