Summary -

In this topic, we described about the SQL vs NoSQL with detailed example.

The differences between SQL and NoSQL are listed as follows –

SQL NoSQL
SQL databases are called as relational database management systems NoSQL databases are called as non-relational database management systems or distributed systems.
SQL databases use structured query language to deal with predefined schema. NoSQL databases use dynamic schema to deal with unstructured data.
SQL databases are vertically scalable. NoSQL databases are horizontally scalable.
SQL databases have table based data NoSQL databases have column-store, key/value paired, documented based, graph based data.
SQL databases are used for multi-row data NoSQL databases are used for unstructured data like document and JSON.
SQL databases follows ACID properties NoSQL databases follows CAP theorem properties
SQL databases are not good for hierarchical data storage. NoSQL databases are good for hierarchical data storage.
SQL databases are good for complex queries. NoSQL databases are not good for complex queries.
SQL databases need constraints and joins. NoSQL databases does not need constraints and joins.
SQL databases slower queries than in NoSQL database. NoSQL databases faster queries than in SQL database.
Oracle, MySQL, Microsoft SQL Server, and PostgreSQL are examples of SQL databases. MongoDB, CouchDB, Cloudant, Neo4J, Infinite Graph are examples of NoSQL databases
SQL databases are mixed like open source for MySQL, postgres and commercial for ORACLE NoSQL databases are open source
SQL databases have Strong consistency. No SQL databases some have Strong consistency and eventual consistency