Schema
Defined up front and enforced; changes are explicit migrations. Catches whole classes of bad data.
Flexible or schema-on-read; records can vary. Frees iteration but pushes validation into the app.
Default to a relational database. Schemas, joins, and ACID transactions are exactly what most applications need, and Postgres alone covers an enormous range. Reach for a NoSQL store when you have a specific shape it fits better: massive write throughput, a flexible/evolving document shape, or a graph/time-series access pattern that relational engines model awkwardly.
"SQL vs NoSQL" really compares one mature model against a grab-bag of four (document, key-value, wide-column, graph). The relational model gives you correctness and ad-hoc querying; NoSQL stores trade some of that away for a particular kind of scale or schema flexibility. The line has blurred — Postgres does JSON, and many NoSQL stores now offer transactions — so the question is which default fits your access pattern.
Defined up front and enforced; changes are explicit migrations. Catches whole classes of bad data.
Flexible or schema-on-read; records can vary. Frees iteration but pushes validation into the app.
Full ACID across multiple rows and tables is the default.
Varies: single-document atomicity is common; cross-document ACID is newer and often limited.
Declarative SQL with joins, aggregates, and a cost-based optimizer; ad-hoc queries are easy.
API- or query-language-specific; joins are limited or absent, favouring denormalized access paths.
Read replicas are easy; sharding writes is harder and often bolted on (Citus, Vitess).
Built for horizontal scale-out; partitioning across nodes is a first-class feature.
Strong consistency by default on a primary.
Often tunable/eventual to favour availability and partition tolerance (per CAP).
Structured, interrelated data: orders, users, ledgers, anything with invariants.
Documents, large KV sets, wide sparse rows, graphs, and high-volume event/time-series.
A typical web or SaaS application
Relational correctness and ad-hoc querying fit almost every business domain; Postgres scales further than most teams ever need.
A global key-value workload at extreme scale
A wide-column or KV store partitions cleanly across nodes where a single SQL primary would bottleneck.
A content system with fluid, per-item document shapes
A document store avoids constant schema migrations when the shape genuinely varies.
You need both correctness and horizontal scale
These give SQL semantics and ACID with built-in horizontal scaling.