Choosing a database, practicality over purity
• 2 min read
Picking a database is one of the most consequential choices for the next few years of a product. Choose for current access patterns and operational maturity, not academic purity.
Quick taxonomy
- Relational (RDBMS): PostgreSQL, MySQL, strong consistency, rich queries, ACID guarantees.
- Key-value: Redis, DynamoDB, lightning-fast lookups for caching and sessions.
- Document stores: MongoDB, Couchbase, flexible schemas for evolving data.
- Column-family: Cassandra, Scylla, write-scalable stores for time-series and massive writes.
- Graph DBs: Neo4j, optimized for relationship traversals.
- NewSQL: CockroachDB, Yugabyte, aim for SQL semantics with horizontal scalability.
How to choose
- Start with the shape of your data and query patterns: joins and transactions => RDBMS; large, simple writes => column-family; relationship queries => graph.
- Consider consistency needs: strong consistency favors RDBMS or NewSQL; eventual consistency is acceptable for many distributed use cases.
- Evaluate operational costs: backups, restores, replication, monitoring, and runbook maturity.
- Think about growth: does the product need read replicas, sharding, or cross-region replication later?
Operational rules
- Start with PostgreSQL for most transactional workloads; it’s mature, well-supported, and versatile.
- Use Redis for caches and ephemeral state, but never as the primary durable store without persistence strategies.
- Design for polyglot persistence as your app grows—pick the right tool for each job rather than forcing one DB to do everything.
Patterns & examples
- OLTP: Postgres with logical replication and read replicas.
- High-write ingestion: Cassandra/Scylla with careful compaction and TTLs.
- Event sourcing: append-only store (Kafka or a write-optimized DB) plus materialized views for reads.
Recommendations
- Prefer operational maturity and a clear scaling path over novelty.
- Make sure your choice has strong backup and restore capabilities and a documented recovery plan.
Continue reading
Next article
Database replication, how to copy reliably and why it matters
Related Content
Nov 2, 2025
Database sharding, splitting data without losing your mind
A practical look at sharding strategies, design trade-offs, rebalancing, and operational tips for partitioning large datasets.
Read article
Nov 2, 2025
Horizontal scaling, building systems that grow outwards
Practical guidance for scaling out by adding nodes, autoscaling flow, orchestration tips, and common pitfalls to avoid.
Read article
Nov 2, 2025
Stateful vs Stateless, design choices that shape scalability
Compare stateful and stateless architectures, trade-offs for scaling, operational patterns, and practical techniques for managing state.
Read article