NoSQL

What is NoSQL?

NoSQL databases are non-relational databases that store data in a manner different than traditional Relational SQL databases.

Some NoSQL databases allows using a SQL syntax for querying. Therefore, the term “NoREL” ( No Relational) is also used.

Data is stored in NoSQL databases in a way that optimizes how the data can be queried. This means that data replication or de-normalization is possible and, in most cases, inevitable. This is done so that queries are fast and data writes are asynchronous, allowing multiple data collections to stay in sync by replicating the data around the NoSQL database cluster.

NoSQL databases access data fast compared to other databases.

Type of architecture that NoSQL follows : Shared Nothing architecture.

NoSQL vs SQL

When you need to choose a modern database, you will have to consider both sql and Nosql data structures. SQL is a relational and Nosql non-relational type data structured databases. Therefore, you will have to choose the best database type that will fit your development.

Below you can see some of the main differences between sql and NoSql.

CAP Theorem

CAP Theorem is also known as Brewer’s Theorem.

CAP Theorem states that we can only achieve at most two out of three guarantees for a database. Consistency, Availability, and Partition Tolerance are the three guarantees.

Consistency means that every node in the network sees the same data at the same time.

Availability ensures that any client requesting data will receive a response, even if one or more nodes are unavailable.

Partition Tolerance means that the cluster must function even though there are many communication failures between nodes in the system.

Types of NoSQL Databases

There are four main NoSQL database types. Namely key value, Document based, column based and graph based.

Key-value: It is the simplest type of NoSQL database. Data elements are stored in the database as key and value pair.

Document Based: A document based database stores data in JSON, BSON, or XML documents.

Column Based: Data that is stored in a relational database reads data row by row. And a column store is organized as a set of columns.

Graph Based: Each element is stored as a node. The connections between elements are called links or relationships. Relationships are first-class elements in graph databases

--

--