| SQL | NoSQL |
|---|---|
| Relational Databases (RDBMS) | non-relational or distributed database |
| represent data in form of tables which consists of n number of rows of data | the collection of key-value pair, documents, graph databases or wide-column stores |
| vertically scalable | horizontally scalable |
| uses SQL ( structured query language ) for defining and manipulating the data | queries are focused on collection of documents. also called as UnQL (Unstructured Query Language) |
| MySql, Oracle, Sqlite, Postgres and MS-SQL | MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb |
| good fit for the complex query intensive environment | are not good fit for complex queries. |
| are not best fit for hierarchical data storage | fits better for the hierarchical data storage |
| emphasizes on ACID properties ( Atomicity, Consistency, Isolation and Durability) | follows the Brewers CAP theorem ( Consistency, Availability and Partition tolerance ) |
MySQL Community Edition
MongoDB Mongodb is one of the most popular document based NoSQL database as it stores data in JSON like documents. It is non-relational database with dynamic schema. It has been developed by the founders of DoubleClick, written in C++ and is currently being used by some big companies like The New York Times, Craigslist, MTV Networks. The following are some of MongoDB benefits and strengths:
