SQL vs NoSQL: how to choose a database for your project
The SQL vs NoSQL question is less about which is "better" and more about the shape of your data and how you query it.
Relational (SQL) databases like PostgreSQL, MySQL and SQLite store data in tables with a fixed schema. Their strengths:
- Joins across related data (customers, orders, products)
- Strong consistency and transactions
- A mature, standard query language
NoSQL is an umbrella term for several different models:
- Document stores (e.g. MongoDB): flexible JSON-like records, good when each item is read as a whole
- Key-value stores (e.g. Redis): extremely fast lookups by key, often used for caching and sessions
- Wide-column stores (e.g. Cassandra): built for huge write volumes spread across many machines
- Graph databases (e.g. Neo4j): relationships are first-class, useful for social graphs or recommendations
A practical rule many teams follow: start relational unless you have a specific reason not to. Modern relational databases handle JSON columns, full-text search and large datasets well, so the old "NoSQL scales, SQL doesn't" framing is mostly outdated. NoSQL shines when your access pattern is simple and predictable at very large scale, or when the data genuinely doesn't fit tables.
Has a NoSQL choice ever forced you to rebuild joins in application code? And what's the strongest case you've seen for picking a document store from day one?
Comments · 4
I'm a beginner and I keep hearing "just use Postgres". Is that actually decent advice for a first project, or does it depend?
It's decent advice for most first projects. PostgreSQL is reliable and widely documented, and you'll learn skills that carry over. SQLite is even simpler for tiny apps.
Start with the boring relational choice. Most startups don't have the scale that needs anything exotic, and being able to run flexible queries later is worth a lot.
Postgres handles JSON too, so you often get document flexibility without leaving SQL. Pick NoSQL for a specific reason, not by default.