Full answer
Questions to ask:
- Relationships: will reports join customers, orders and products? Relational wins.
- Integrity: must the database reject orphans, duplicates and invalid states? Constraints are a relational strength.
- Transactions: multi-entity atomic changes (money, inventory) are natural in SQL; document stores support them now but with more caveats.
- Shape: if each record is a self-contained aggregate (a product catalogue entry with nested variants) read whole, documents fit well.
- Scale: horizontal write scaling is built into many document stores; PostgreSQL scales far vertically and with read replicas, and further with extensions or sharding layers.
- Team skills and tooling: SQL skills and BI tools are widespread.
For most early-stage products, PostgreSQL with some jsonb columns is a safe default that keeps options open; move parts to specialised stores when a concrete need appears.
Key points
- Choose by relationships and queries
- Constraints and transactions favour relational
- Self-contained aggregates suit documents
- jsonb covers flexible attributes
- Defer specialised stores until needed
Common mistakes
- Choosing by popularity
- Assuming schema-less means no schema work
Follow-ups
- How would you model a product catalogue in each?
- When would you add a second database?
Tips
- Ask about the queries first