system-design-primer
reference — the data

SQL or NoSQL

in short — written for this site
Structured data with transactions, or unstructured data at scale. Pick on the shape of the reads.
fits NoSQL
Rapid ingest of clickstream and log data, leaderboard or scoring data, temporary data such as a shopping cart, frequently accessed tables, metadata and lookup tables.
fits SQL
Anything where correctness across several rows matters at once — money, inventory, permissions, bookings.
from the primer — full sectionsynced
Source: Transitioning from RDBMS to NoSQL
Source: Transitioning from RDBMS to NoSQL

Reasons for SQL:

  • Structured data
  • Strict schema
  • Relational data
  • Need for complex joins
  • Transactions
  • Clear patterns for scaling
  • More established: developers, community, code, tools, etc
  • Lookups by index are very fast

Reasons for NoSQL:

  • Semi-structured data
  • Dynamic or flexible schema
  • Non-relational data
  • No need for complex joins
  • Store many TB (or PB) of data
  • Very data intensive workload
  • Very high throughput for IOPS

Sample data well-suited for NoSQL:

  • Rapid ingest of clickstream and log data
  • Leaderboard or scoring data
  • Temporary data, such as a shopping cart
  • Frequently accessed ('hot') tables
  • Metadata/lookup tables
Source(s) and further reading: SQL or NoSQL
sourcedonnemartin/system-design-primer / README.mdanchor#sql-or-nosqlsyncedsynced from donnemartin/system-design-primer@master · 2026-08-16