What is NoSQL?
NoSQL databases emerged in the late 2000s. Storing huge volumes of unstructured and semi-structured data was the need of the market. NoSQL is a type of database management system that suffices these requirements. NoSQL databases include a variety of database architectures and data models. As these databases are highly scalable, they are used extensively in real-time web applications. They support agile development paradigm. NoSQL databases allow the data to be stored in a very easier way.
Comparison between RDBMS and NoSQL
RDBMS
- Relational Databases
- Vertically Scalable
- Table based databases(columns and rows)
- Predefined Schema
- Handle limited Data
- Synchronous insert and update
- Uses SQL
- Can execute complex queries
- Follow ACID properties
- Suitable for financial application
NoSQL
- Non-Relational Databases
- Horizontally Scalable
- Document based, key-value based, graph databases ,column based
- Dynamic Schema
- Handle large volume of data
- Asynchronous insert and update
- Do not use SQL
- Cannot execute complex queries
- Follow Brewers CAP theorem/BASE properties.
- Suitable for social media sites
Types of NoSQL databases
Key-value Pair Based
This is the simplest type of NoSQL database. Every data element in the database is stored in key-value pairs. For each key there is a value assigned. Each key is unique and therefore further the data can be retrieved using this key. The values can be integer, strings or complex objects. The key features are it is simple, consistent, scalable and fast. Eg: Dynamo
Column -Based
Column Based databases stores the data in columns instead of rows. They are based on BigTable paper by Google. Every column is considered separately. Every single column has its values stored contiguously. It is highly scalable and also gives high performance. Eg: Cassandra
Graph-Based
These databases are arranged in the form of a graph . The elements are connected using the relations between them. The data is stored in the form of nodes. The nodes are connected with each other. These connections are called links or relationships. Its key features are it is easy to identify the relationship between the data by using the links and updating is also easy. These databases are mostly used for social networks, logistics eg: AllegroGraph
Document-Based
It uses the documents to store the data in the database. The documents are accessed by unique key. It allows to store complex data in document formats like JSON, BSON, or XML documents. It helps in faster creation and maintenance eg: Apache CouchDB
Examples of NoSQL databases
Key Value Pair Based | Redis, Dynamo |
Column-based | HBase, Cassandra |
Graph Databases | Neo4j, Infinite Graph |
Document Databases | MongoDB, CouchDB |