Back to All Blogs1 min read29 Aug 2026
System Design Foundations · Part 5 of 8
SQL vs NoSQL: Choose by Access Pattern, Not Hype
“A practical way to choose storage based on relationships, consistency and access patterns.”
SQL vs NoSQL
The useful question is not which database is better.
The useful question is which database model fits the workload.
Relational Databases
Relational databases provide:
- tables,
- relationships,
- constraints,
- transactions,
- joins,
- powerful querying.
CREATE TABLE orders (
id uuid PRIMARY KEY,
user_id uuid NOT NULL REFERENCES users(id),
total_cents integer NOT NULL CHECK (total_cents >= 0)
);
NoSQL Is Not One Thing
NoSQL can refer to:
- document databases,
- key-value stores,
- wide-column databases,
- graph databases.
Start With Access Patterns
| Requirement | Example |
|---|---|
| Exact lookup | Session by token |
| Relationship | Orders belonging to user |
| Range | Events from last hour |
| Transaction | Payment + ledger |
| Massive writes | Analytics events |
Warning
“Company X uses database Y” is not a technical requirement.
For many applications, PostgreSQL is an excellent starting point.
Finished this article?
Mark it done to update your series progress.