What is NoSQL Database? NoSQL Database Explained

What is NoSQL Database?

A non-relational or NoSQL Database is a data storage system that was designed for unstructured data, which does not follow an ACID property like a traditional Relational Database Management System(RDBMS). Many of the NoSQL databases provide flexibility to inconsistency in favor of availability and partition tolerance, as explained by the CAP theorem.

Instead of having a fixed schema structure like RDBMS, NoSQL provides flexible data models.

NoSQL Data Models

Fundamentally, we can classify NoSQL databases into four basic types.

Key-value data store

These databases store the values in the form of Key/Value Pairs and also stores the metadata about the values. Data in this database can be of any type of binary objects like text, video, or JSON(JavaScript Object Notation). Records in this database are stored and retrieved using a key that can identify and retrieve the records uniquely. 
For Example, Project Voldemort, Riak, and Redis.

Document store

In this database, data are stored in the form of self-describing documents like JSON(JavaScript Object Notation), XML (Extended Markup Language), and BSON. Each document can be a complex data structure that can or cannot have any pre-defined schema. If certain fields are popular, they can be indexed to provide fast retrieval without knowing the key. In this type of database, it is possible to query the document using a single or set of fields. It is also possible to update the portion of the field at once for the documents. Example:MongoDB, RavenDB, CouchDB.

Relational vs Document database

Figure:[Document Store Database](https://developer.couchbase.com/documentation/server/3.x/developer/dev-guide-3.0/compare-docs-vs-relational.html)

Wide-Column family store

In this wide column database, data are stored in a table with rows and columns but with the possibility of having different column names and formats in different rows. Multiple column families can be grouped and stored together using single row keys. We can pull individual columns using this database in a single operation, as it is a columnar database. It aggregates the data based on the key Value. Based on the key values, it can be distributed across the clusters. For Example, Cassandra and Apache HBase.

Column Family Store database

Figure: Column Family Building Blocks

Graph stores

A Graph store or Graph-oriented database is a NoSQL database that uses the graph structure and theory to store, map and query the relationship between them. It is based on the Node and Arch Graph Structure. In this database, adjacent elements are linked together without using an index. For Example Neo4J

NoSQL Database Pattern

Figure: NoSQL Database Patterns

Reference:

[1] Introduction to Redis a NoSQL database

[2]NoSQL vs SQL Database

[3]NoSQL Database

[4]Cap Theorem