SQL vs NoSQL: Here's what I understood
Recently, I’ve been exploring system design, and one recurring question caught my attention: Should we use SQL or NoSQL for our project?
As someone starting a new project, I know this decision can often lead to confusion. Some developers advocate for SQL because of powerful features like JOINs, while others push for NoSQL, praising its scalability. But as a beginner—or even as someone responsible for choosing a tech stack—how do you make the right choice without falling into the trap of poor performance or scalability issues?
To clear this confusion—for myself, for you, for your product manager, and for your client—I decided to break it down. My goal is to help you become confident and informed enough to choose what fits your needs best.
So, what exactly am I trying to figure out?
SQL vs. NoSQL – what’s the difference?
When should you choose one over the other?
Are JOINs really missing in NoSQL?
Is SQL too restrictive, and should we avoid it because of that?
What does “schemaless” mean, and how does it affect data modeling?
What are the different types of NoSQL databases, and when should you use each?
So, let’s begin by understanding the difference between SQL and NoSQL.

Traditional SQL databases like MySQL and PostgreSQL do not support sharding out of the box, but modern tools like Vitess and Citus enable horizontal scaling. For more advanced use-cases, distributed SQL databases like CockroachDB and Google Spanner offer built-in sharding along with full SQL support.
When Should You Choose One Over the Other?
Well, the journey of SQL vs NoSQL often starts with this very question. So let’s take a step back, breathe a little, and try to calm both sides down by explaining when each is a good fit.
SQL has been around for a long time—it’s battle-tested, well-documented, and has a huge community. Back in the day, building even a small app was a much harder task compared to today. You had to think through everything: architecture, system flow, database schema, business logic, and more. Honestly, you still need all these things to build a solid application. But the mindset has changed a bit.
Earlier, we aimed to design a schema upfront and make it nearly perfect. But in the real world, we’ve learned that progression is better than perfection. Apps evolve, requirements change, and your data structure often needs to adapt along the way.
And here’s where the problems with SQL start to show. Traditional SQL databases are strict—you need to define your schema upfront. Changing it later can be painful, especially if your app grows fast or the data shape keeps shifting. That’s where NoSQL really shines.
NoSQL databases are flexible. You don’t have to worry about every column right away. You can evolve your schema as your product grows. That’s a huge win when you’re moving fast, iterating quickly, or when your data isn’t predictable.
But flexibility isn’t always what you want.
Sometimes, you do need strict rules. For example, in a banking platform, your data must be accurate and consistent. You need to make sure that the “amount” field always contains a number, and that every transaction is safe and valid. SQL lets you enforce these constraints at the database level—you don’t have to rely only on application code to keep things in check.
Now imagine you’re building something like a digital business card app. Every user might want to showcase different things—some will add LinkedIn, others Behance, maybe someone even throws in a TikTok or GitHub. You can’t predict every field they’ll want. In this case, enforcing a rigid schema will slow you down. You need flexibility and fast iteration, and that’s where NoSQL becomes your best friend.
So in short:
SQL is strong when you need structure, constraints, and consistency.
NoSQL is great when you need flexibility, speed, and horizontal scaling.
Neither is perfect for everything, but both are perfect for something. Use them wisely, and you'll be just fine.
Are JOINs really missing in NoSQL?
Well… yes or no! Confusing?
It’s like when you switch from a car to a bike (or the other way around) and start wondering, "Why doesn’t a bike have a steering wheel?" or "Why don’t cars use handlebars?"
Both steering and handles serve the same purpose: controlling direction. They just come in different forms because the design, use case, and structure of the vehicles are different. Yet we sometimes waste energy trying to name them the same thing, even though they’re built differently.
It’s kind of the same with SQLs JOIN and NoSQLs $lookup. The JOIN in SQL helps us combine data from different tables (schemas) to build a meaningful result for a particular use case, like combining a user's profile with their orders.
In NoSQL (especially in document-based databases like MongoDB), we can achieve similar results using aggregation pipelines, with operators like $lookup, $unwind, etc. So technically, the real question shouldn't be "Do we have JOINs in NoSQL?"—but rather, "Do we have aggregation in NoSQL?" The answer is: Yes, we do.
Now, of course, some folks will say, "But aggregation in NoSQL is slower!" And honestly? Yes, they’re kinda right.
Why? Because in SQL, data is structured in tables, which means it’s usually stored in a tightly connected, relational format. This makes joins faster and more efficient, especially when indexes are optimized.
But in NoSQL, especially document-based databases, every document represents a complete object, just like every row in SQL represents a record.
The key difference?
In NoSQL, these documents are stored independently, without tightly coupled relationships. And that’s exactly what unlocks NoSQL’s full scalability and flexibility.
Yes, this architecture might make some operations (like aggregations) a tiny bit slower compared to SQL, but that trade-off is often worth it. Why?
Because NoSQL lets us explore new dimensions in data modeling. You’re no longer stuck in rigid schemas. You can adapt your structure on the fly, respond to changing requirements, and scale your app across multiple servers without much hassle.
So yes, NoSQL aggregations might not be as fast as SQL joins—but unless you’re building something insanely complex, you’ll rarely notice the difference. In most real-world applications, the latency is so small it’s practically negligible.
What does “schemaless” mean, and how does it affect data modeling?
The term “schemaless” often throws people off. It sounds like it means "no structure at all", but that’s not really true.
Think of it this way: even the wisest person can lose a race without a clear goal. Similarly, even in NoSQL databases, we still need structure, just not a strict, predefined one like in SQL.
In a schemaless database, you're not forced to define every column or field ahead of time. You're free to store different shapes of data in the same collection. This doesn’t mean you can just dump random stuff in your DB (well, you can, but you shouldn't 😄)—it just means you’re not locked into one fixed schema.
This flexibility is a big win when you're building something that needs to evolve quickly. Take the example we discussed earlier: a digital business card. Not every user will have the same kind of data—some might want to add a LinkedIn profile, others a GitHub, Behance, or even their own custom fields. In a traditional SQL setup, this would be a nightmare to manage. In NoSQL? It’s a breeze.
Being schemaless gives you the ability to:
Add or remove fields without migrating the entire database.
Scale faster and iterate quicker.
Adjust your data model as your product grows.
So no, schemaless doesn’t mean structureless. It means freedom, with the responsibility to design smartly.
What are the different types of NoSQL databases, and when should you use each?
So till now, you might’ve understood that in today’s era, we’re no longer limited to just relational databases like in the old days. Now, we have databases designed for different purposes, and the ones that don’t follow a traditional table-based (relational) structure are usually grouped under the umbrella of NoSQL.
Here’s a quick rundown of some common NoSQL database types and what they’re good at:

TL;DR
✅ Choose your database wisely—based on your project’s needs, not just trends.
SQL gives you structure, reliability, and strong consistency.
NoSQL gives you flexibility, speed, and scalability.
There’s no right or wrong—just what fits your use case better.
Thank you for your time! 🙏
Honestly, I had a lot of fun exploring this topic. It feels great to clear out those big, confusing doubts one step at a time.
If you’re also on this learning journey, feel free to connect—let’s explore and grow together 🚀




