*
SQL | NoSQL |
---|---|
SQL databases are primarily called as Relational Databases (RDBMS) | NoSQL database are primarily called as non-relational or distributed database |
SQL databases are table based databases | NoSQL databases are document based, key-value pairs, graph databases or wide-column stores |
SQL databases have predefined schema | NoSQL databases have dynamic schema for unstructured data |
SQL databases are vertically scalable | NoSQL databases are horizontally scalable |
SQL databases uses SQL ( structured query language ) for defining and manipulating the data | NoSQL database, queries are focused on collection of documents |
If the data is highly structured and clearly defined , conventional SQL based databases are the best fit.
Examples of real world : MySql, Oracle, Sqlite, Postgres and MS-SQL
NoSQL database good fit at the collection of key-value pair, documents, graph databases or wide-column stores which do not have standard schema definitions which it needs to adhered to.
NoSQL database examples: MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb.
NoSQL database fits better for the hierarchical data storage.
SQL databases are vertically scalable, But NoSQL are horizontally scalable.
SQL : Structured Query Language used to communicate with a database.
” A relational database is a type of database that stores and provides access to data points that are related to one another. Relational databases are based on the relational model”.
The logical data structures—the data tables, views, and indexes—are separate from the physical storage structures that relational database work with.
Schema is a framework or concept that helps in organize and interpret information.
If a database does not exist, MongoDB creates the database when you first store data for that database.
MongoDB is more flexible than SQL.
NoSQL databases don’t have the reliability functions which Relational Databases have.