NoSQLIntermediate
SQL or NoSQL — how do you decide?
“A greenfield project asks whether to use PostgreSQL or a NoSQL store. How do you decide?”
What this tests
- Access-pattern-driven model choice
- Rejecting the "scalable" myth
Answers by level
Read the beginner answer first and notice what is missing.
The question is not scalability — a single Postgres serves tens of thousands of TPS and most systems never leave one machine. It is which access patterns must be cheap and which I can give up. If they include joins, ad-hoc queries or cross-row invariants, I start relational.
NoSQL stores scale one pattern by refusing others: no joins, no ad-hoc queries, no cross-partition transactions. I choose one only when a single pattern dominates and I can afford what it costs me.
Green flags · Red flags
Strong green flag · Frames it as "which patterns can I afford to give up".
Green flags
- Rejects "NoSQL = scalable"
- Starts from access patterns
- Names what each model gives up
Red flags
- "NoSQL scales, SQL does not"
- Chooses on hype not patterns
Follow-up questions
F1
When would a document store genuinely beat Postgres?
Scenario
A team wants MongoDB "because we might have millions of users". What do you ask them?