← Back to list

Picking the Right Database: The Calm, Clear Engineer’s Guide to Making the Right Choice

Choosing a database is often framed like a heated rivalry — MongoDB vs Postgres, DynamoDB vs MySQL, Redis vs literally everything. But…

Abhishek Yadav · 2025-11-15 08:42 · 0 claps · 2.5 min read
#system-design-concepts #relational-databases #non-relational-database
Open on Medium ↗

Picking the Right Database: The Calm, Clear Engineer’s Guide to Making the Right Choice

Choosing a database is often framed like a heated rivalry — MongoDB vs Postgres, DynamoDB vs MySQL, Redis vs literally everything. But here’s the truth:

Picking a database is not a fight. It’s a design decision. Each database exists because it solves one class of problems exceedingly well.

The goal is never to find the best database. The goal is to pick the right database for your workload.

Why Some Databases Scale and Others Don’t

Relational databases (like Postgres or MySQL) give you a powerful set of tools:

  • Strong relations
  • Joins
  • Constraints
  • ACID guarantees

These are incredible — but they come at a cost.

Relational databases are hard to scale horizontally because all these guarantees depend on shared state. Once you try to split the data across multiple servers, the relational model begins to resist.

However, if you’re willing to soften certain guarantees, relational databases can scale:

  • Skip foreign key checks
  • Avoid cross-shard transactions
  • Use manual sharding

This is exactly how large companies scale Postgres or MySQL to billions of rows.

On the flip side, non-relational databases like DynamoDB or MongoDB are designed from day one to be shard-friendly. Their philosophy is simple:

Scaling horizontally should be the default, not the exception.

How to Pick the Right Database

Every database comes with its own guarantees. Your job is to pick the one whose guarantees match your system’s needs.

Before choosing, always clarify:

  • What data you’re storing
  • How much data will exist
  • How it will be accessed
  • Query patterns
  • Any special needs (TTL, streams, geospatial queries, etc.)

If the Data Fits on a Single Node

Life is simple — choose based on features.

Choose Postgres/MySQL if you need:

  • Strong consistency
  • Structured relationships
  • Complex queries or aggregations
  • Transactional guarantees

Choose Redis if you need:

  • Ultra-low-latency key-value access
  • Advanced data structures (sets, lists, sorted sets, streams)
  • Real-time features (caching, queues, leaderboards)

If the Data Does Not Fit on a Single Node

Now the decision revolves around sharding and scaling.

Choose Postgres/MySQL (with manual sharding) if:

  • You have strong SQL expertise
  • You’re comfortable with routing logic
  • You want relational features but can handle scaling yourself

Choose DynamoDB / MongoDB if:

  • Your access patterns are key-value or document-based
  • You want automatic horizontal scaling
  • You don’t need strong relational constraints

Choose Neo4j / Neptune if:

  • Your data is a highly connected graph
  • You need graph algorithms
  • Relationships are the core of your queries

Choose MongoDB if:

  • You want flexibility
  • You’re unsure of the future shape of your data
  • You want easy horizontal scaling without strict schemas

Final Thoughts

There is no universal “best database.” Only the best database for your specific workload.

Pick based on:

  • Consistency requirements
  • Query complexity
  • Access patterns
  • Scaling needs
  • Your team’s expertise

Engineering isn’t about choosing trends — it’s about choosing correctly.

Your database should serve your system, not limit it.

TL;DR

  • There is no best database — only the database that fits your workload.
  • Relational databases struggle to scale horizontally because of joins, constraints, and ACID guarantees, but can scale with manual sharding and fewer constraints.
  • NoSQL databases are built to be shard-friendly, making horizontal scaling easier by default.
  • If your data fits on a single node, choose based on features (Postgres/MySQL for consistency & complex queries, Redis for ultra-fast key-value or advanced structures).
  • If your data does not fit on a single node, choose based on sharding + access patterns (MongoDB/DynamoDB for simple access, Graph DBs for connected data, sharded Postgres for relational needs).
  • Always evaluate:
  • Consistency needs
  • Query complexity
  • Access patterns
  • Scalability requirements
  • Team expertise
  • Your database should serve your system — not limit it.

메타데이터
post_id
7ef97f0ea5e3
slug
picking-the-right-database-the-calm-clear-engineers-guide-to-making-the-right-choice-7ef97f0ea5e3
url
https://medium.com/@abhisheky97/picking-the-right-database-the-calm-clear-engineers-guide-to-making-the-right-choice-7ef97f0ea5e3
canonical_url
https://medium.com/@abhisheky97/picking-the-right-database-the-calm-clear-engineers-guide-to-making-the-right-choice-7ef97f0ea5e3
author_url
https://medium.com/@abhisheky97
status
ok
fetched_at
2026-08-01 01:40:30