When Should You Use a NoSQL Database?


Choosing between SQL and NoSQL is one of the most important decisions you'll make when designing a database-backed application. Over the years, I've come across two solid rules of thumb, including this simplified take:

Use NoSQL if:

  • You're a startup experimenting and have a fast-evolving schema.
  • You've grown so large that you need to shard your DB across multiple instances, and doing joins across those shards has become painful so you de-normalize your data. Normalization is the backbone of SQL. If you're going to heavily de-normalize, using a SQL database might just be unnecessary suffering.

So, how true is this advice? Let’s dig deeper into the nuances.

1. Startups and Fast-Evolving Schemas

This is one of the most compelling use cases for NoSQL.

If you’re iterating quickly, adjusting your data model every other sprint, and trying to avoid writing migration scripts for every schema change, NoSQL databases (like MongoDB or Firebase) offer the flexibility you need. You can just add or remove fields from your documents without much ceremony.

That said, some modern SQL databases like PostgreSQL support flexible data types like JSONB, and tools like Prisma or Alembic can help automate migrations. So if you're planning to eventually enforce structure, SQL might still be worth considering early on.

TL;DR: NoSQL wins for agility. SQL can catch up but needs more effort.

2. Scaling and Sharding Woes

SQL databases are built around joins and normalization. But when your data grows so large that you need to shard across multiple servers, those joins become painful or outright infeasible. At this point, many teams de-normalize their data to make it easier to query.

If you’re doing that, then yes, continuing to use a relational database may feel like swimming upstream. You're paying the cost of relational complexity without the benefits.

NoSQL databases like Cassandra or DynamoDB are designed with horizontal scaling in mind. They expect you to de-normalize and optimize for your access patterns up front. That trade-off can make your system much more maintainable at scale.

However, there are also distributed SQL databases like CockroachDB and YugabyteDB that preserve SQL features while scaling horizontally. They’re worth exploring if you still want strong consistency and relational features at scale.

TL;DR: NoSQL is a natural fit when scaling out and de-normalizing. But distributed SQL is closing that gap.

But Is De-normalizing in SQL Always Bad?

Not necessarily.

In some cases (such as in analytics or caching layers) de-normalized tables in SQL are totally valid and useful. But if your whole schema is de-normalized, you're probably not using the strengths of a relational system. In that case, SQL may become more of a burden than a help.

NoSQL databases, especially document stores, embrace de-normalization as a core principle. They're optimized for it, and your life might be a lot easier using tools that work with your data model, not against it.

Summary: SQL vs NoSQL Cheat Sheet

Situation SQL NoSQL
Rapid schema changes ❌ Painful ✅ Easy
Joins & relationships ✅ Built-in ❌ Avoided
Massive scale (sharding) ⚠️ Complex ✅ Designed for it
De-normalized data 🤕 Awkward ✅ Natural
Strong consistency & ACID ✅ Reliable ⚠️ Depends on DB

Final Thoughts

The original advice stands strong as a general rule of thumb:

  • Use NoSQL when you're moving fast or scaling wide.
  • Use SQL when your data is highly relational and consistency matters.

But remember, the best choice depends on your specific use case. Don’t just follow trends. Rather, understand your needs, your data, and your team’s strengths.