SQL: relational database store data in tables which are formed in rows and columns.
NoSQL:
- key-value
- document
- graph
SQL: table
NoSQL: key-value, document, graph.
SQL: fixed
NoSQL: dynamic
SQL: uses SQL (structured query language)
NoSQL: UnQL (unstructured query language).
SQL: vertically scalable. Hard to horizontally scale
NoSQL: horizontally scalable.
SQL: ACID compliant
NoSQL: sacrifice ACID compliance for performance and scalability.
https://www.sitepoint.com/sql-vs-nosql-differences/
- logical related discrete data requirements which can be identified up-front
- data integrity is essential
- standards-based proven technology with good developer experience and support.
- unrelated, indeterminate or evolving data requirements
- simpler or looser project objectives, able to start coding immediately
- speed and scalability is imperative.
https://github.com/donnemartin/system-design-primer#sql-or-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