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 Databases NoSQL Databases
Development History Developed in the 1970s with a focus on reducing data duplication Developed in the late 2000s with a focus on scaling and allowing for rapid application change driven by agile and DevOps practices.
Data Storage Model Tables with fixed rows and columns Document: JSON documents, Key-value: key-value pairs, Wide-column: tables with rows and dynamic columns, Graph: nodes and edges
Examples Oracle, MySQL, Microsoft SQL Server, and PostgreSQL Document: MongoDB and CouchDB, Key-value: Redis and DynamoDB, Wide-column: Cassandra and HBase, Graph: Neo4j and Amazon Neptune
Primary Purpose General 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
Schemas Rigid Flexible
Scaling Vertical (scale-up with a larger server) Horizontal (scale-out across commodity servers)
Joins Typically required Typically not required
Multi-Record ACID Transactions Supported Most do not support multi-record ACID transactions. However, some—like MongoDB—do.
Data to Object Mapping Requires ORM (object-relational mapping) Many do not require ORMs. MongoDB documents map directly to data structures in most popular programming languages.
Reference: