What are the differences between NoSQL vs SQL Databases?

The database world was quite happy with SQL databases before 2000. The SQL database had limitations on scaling, fast queries, allowing for frequent application changes.

During the late 2000s, the NoSQL (“non SQL” or “not only SQL”) databases were developed

Relational databases were developed with SQL (Structured Query Language) back in the 1970s with a focus on reducing data duplication.

It is quite common that the SQL databases have rigid, complex, tabular schemas and typically require expensive vertical scaling.

Differences between SQL and NoSQL:

The main differences between SQL and NoSQL databases are given below:

SQL DatabasesNoSQL Databases
Development HistoryDeveloped in the 1970s with a focus on reducing data duplicationDeveloped in the late 2000s with a focus on scaling and allowing for rapid application change driven by agile and DevOps practices.
Data Storage ModelTables with fixed rows and columnsDocument: JSON documents, Key-value: key-value pairs, Wide-column: tables with rows and dynamic columns, Graph: nodes and edges
ExamplesOracle, MySQL, Microsoft SQL Server, and PostgreSQLDocument: MongoDB and CouchDB, Key-value: Redis and DynamoDB, Wide-column: Cassandra and HBase, Graph: Neo4j and Amazon Neptune
Primary PurposeGeneral purpose Document: general purpose, Key-value: large amounts of data with simple lookup queries, Wide-column: large amounts of data with predictable query patterns, Graph: analyzing and traversing relationships between connected data
SchemasRigidFlexible
ScalingVertical (scale-up with a larger server)Horizontal (scale-out across commodity servers)
JoinsTypically requiredTypically not required
Multi-Record ACID TransactionsSupportedMost do not support multi-record ACID transactions. However, some—like MongoDB—do.
Data to Object MappingRequires ORM (object-relational mapping)Many do not require ORMs. MongoDB documents map directly to data structures in most popular programming languages.
Reference: