Databases - SQL vs NoSQL
What ACID and isolation levels guarantee, the main NoSQL families, and a practical way to choose.
Two big families
A database stores data durably and lets you query it. Two broad families:
- Relational (SQL): data lives in tables of rows and columns; tables link through keys; you query with SQL (Structured Query Language). Examples: PostgreSQL, MySQL.
- NoSQL ("not only SQL"): an umbrella for stores that drop part of the relational model to gain flexibility or scale. Examples: Redis, MongoDB, Cassandra.
SELECT o.id, u.name, o.total
FROM orders o
JOIN users u ON u.id = o.user_id
WHERE o.created_at > now() - interval '1 day';A join combines rows from two tables. Relational databases are very good at this; many NoSQL stores do not offer it.
1 of 7