System Design · Junior · Question 22 of 75
In general, how do relational (SQL) databases differ from NoSQL?
- ✓Correct answer: SQL - tables with a schema and relations, NoSQL - flexible data models
- 2SQL works only on the server, NoSQL only in the browser
- 3NoSQL can't store data on disk, only in memory
Explanation
Relational DBs (PostgreSQL) provide transactions, JOINs and a strict schema. NoSQL - document (MongoDB), key-value (Redis), columnar, graph - scale horizontally more easily or fit a specific access pattern better. The choice depends on the data and queries.