SQL | No-SQL |
---|---|
Stores flat tables (like Excel sheets) | Stores JSON-like documents |
Requires fixed schemas | No schema required |
Ensures referential integrity | Does NOT ensure referential integrity |
Can scale vertically (by adding more memory, CPU) | Can scale horizontally (by adding more machines) |
Unified query language (SQL) (with "dialects") | Proprietary query languages |
Use case: highly structured data, many relations, e.g. financial transactions | Use case: huge amount of data, few relations, semi-structured data |
Examples: MySQL, Postgres, Oracle, SQL Server | Examples: MongoDB, Couchbase, Amazon DynamoDB |
SQL vs. NoSQL Databases: What's the Difference?
A Guide to the Entity Relationship Diagram