Option 1
SQL
SQL is a query language commonly used with relational databases organized around tables, keys, and constraints.
Side-by-side guides
Compare relational and non-relational models by the questions, relationships, consistency, and operating needs of your application.
Option 1
SQL is a query language commonly used with relational databases organized around tables, keys, and constraints.
Option 2
NoSQL is a broad group of models, including document, key-value, wide-column, and graph databases.
| What to compare | SQL | NoSQL |
|---|---|---|
| Data shape | Tables with defined columns and relationships expressed through keys. | The shape depends on the model: documents, key-value pairs, wide columns, or connected nodes. |
| Relationships and transactions | Joins, constraints, and multi-record transactions are common strengths of relational systems. | Relationship handling and transaction guarantees vary by product and data model; check the exact workload you need. |
| Schema changes | Schema changes are usually planned through migrations and database constraints. | Some models allow records with different shapes, but applications still need validation and clear data rules. |
| Scaling and operations | Replication, partitioning, and scaling options depend on the relational product and deployment. | Many products target distributed workloads, but partitioning, consistency, and recovery still require design. |
Data with important joins, constraints, and transactions across related records.
A specific document, key-value, wide-column, or graph access pattern that fits the application's queries.