SQL and NoSQL solve the same problem (storing data) with fundamentally different approaches:
SQL: Structured data in tables with predefined schemas. Relationships between tables via JOINs.
NoSQL: Flexible data storage (documents, key-value, graph, wide-column). No fixed schema required.
SQL Databases
Key characteristic: Structured, relational, ACID-compliant
Structure:
Examples: PostgreSQL, MySQL, Oracle
Properties:
ACID Transactions - All-or-nothing operations (critical for payments, banking)
Complex Queries - JOINs across multiple tables, aggregations, filtering
Data Integrity - Schema enforces structure, reduces errors
Mature Tooling - Decades of optimisation, monitoring, backup tools
Scaling
Vertical: Adding CPU/RAM to one server is expensive
Horizontal: Difficult to shard writes across multiple servers
Rigid Schema - Changes require migrations, can lock tables
NoSQL Databases
Key characteristic: Flexible, distributed, eventually consistent
Types:
Properties:
Horizontal Scaling - Add more servers to handle load
Flexible Schema - Store different structures without migrations
High Performance - Optimised for specific access patterns
Distributed by Design - Natural fit for global, multi-region systems
Eventual Consistency - Writes take time to propagate across nodes
Limited Querying - Complex queries handled in application code
Less Data Integrity - Schema validation happens in your application
A decision framework for interviews
Consistency Trade-off
Strong Consistency (SQL):
Eventual Consistency (NoSQL):
Scaling Patterns
SQL Scaling:
Vertical: Add CPU/RAM to main server (Read replicas for read-heavy loads)
Horizontal: Sharding (complex) - Split data across servers by key
NoSQL Scaling:
Horizontal: Add nodes to cluster (Automatic data distribution)
Common Use Cases
Like posts like this?
By subscribing, you get a breakdown like this one every week.
Free subscribers also get a little bonus:
🎁 The System Design Interview Preparation Cheat Sheet
If you're into visuals, paid subscribers unlock:
→ My Excalidraw system design template – so you have somewhere to start
→ My Excalidraw component library – used in the diagram of this issue
No pressure though. Your support helps me keep writing, and I appreciate it more than you know ❤️









It’s not true there are no JOINs in NoSQL. E.g. MongoDB has aggregations