Deep Dive into NoSQL Database Types

Gangani Chamika
5 min readMar 18, 2022

In my previous blog, I went through the the basic difference between SQL vs. NoSQL vs. NewSQL. As promised, in this blog I will explore more about NoSQL along with the comparison of NoSQL Database types.

NoSQL stands for Not only SQL. NoSQL Databases are also known as non-relational databases that don’t require a fixed schema. Users can create databases with flexible schema and can scale up evenly without much of a stretch. NoSQL information bases are largely utilized for BigData and ongoing applications. NoSQL database processes information in a distributed manner and can oblige tremendous volumes of data.

What do NoSQL databases have in common?

Each NoSQL database has its own unique features. At a high level, many NoSQL databases have the following features:

  • They use distributed databases, which are based on shared-nothing architecture.
  • NoSQL databases can easily be scaled out horizontally, depending on the volumes of data.
  • All of the NoSQL databases have a flexible schema.
  • Process: structured, semi-structured as well as non-structured data.
  • The format of storing data is different from relational databases hence are non-relational.

Types of NoSQL Data Stores…

In my last post, I gave an overview of NoSQL databases and typical use cases where one can use NoSQL data stores.

NoSQL databases can be classified into four types,

  1. Key-Value Stores
  2. Document Stores
  3. Column based data stores
  4. Graph Databases

Let’s go through each of these types.

Key Value Store

Key-value databases are the simplest type of NoSQL database.

These NoSQL databases have a dictionary data structure that consists of a set of objects that represent fields of data. Each object is assigned a unique key. To retrieve data stored in a particular object, you need to use a specific key. In turn, you get the value assigned to the key. This value can be a number, a string, or even another set of key-value pairs.

Unlike traditional relational databases, key-value databases do not require a predefined structure. They offer more flexibility when storing data and have faster performance. Without having to rely on placeholders, key-value databases are a lighter solution as they require fewer resources.

Document Store

Document-Oriented NoSQL DB stores and retrieves data as a key value pair but the value part is stored as a document. The document is stored in JSON or XML formats. The value is understood by the DB and can be queried. for a document database, you have data store like JSON object. You do not require to define which make it flexible.

The document type is mostly used for CMS systems, blogging platforms, real-time analytics & e-commerce applications. It should not use for complex transactions which require multiple operations or queries against varying aggregate structures.

Unlike RDBMSs, this format is not necessarily strict. For example, Apache Cassandra™ does not require all rows to contain values for all columns in the table. Like key-value and document databases, tabular databases use hashing to retrieve rows from the table.

Wide column store

Column-oriented databases work on columns. Every column is treated separately. Values of single column databases are stored contiguously.

They deliver high performance on aggregation queries like SUM, COUNT, AVG, MIN etc. as the data is readily available in a column.

Column-based NoSQL databases are widely used to manage data warehouses, business intelligence, CRM, Library card catalogs.

There are two types of column families:

  1. Standard Column family: Consists of a key-value pair, where the key is mapped to a value that is a set of columns.
  2. Super Column family: Consists of a key-value pair, where the key is mapped to a value that are column families.

Graph store

A graph type database stores entities as well the relations amongst those entities. The entity is stored as a node with the relationship as edges. An edge gives a relationship between nodes. Every node and edge has a unique identifier.

Compared to a relational database where tables are loosely connected, a Graph database is a multi-relational in nature. Traversing relationship is fast as they are already captured into the DB, and there is no need to calculate them.

In this blog post, we have discussed in-depth NoSQL databases, their types, and their advantages and disadvantages. NoSQL databases are getting popular among enterprises due to their exceptional properties.

Now I hope you have a good understanding about the basics of the four prominent NoSQL database types. Although they all have different use cases, they all share the main benefits of NoSQL databases.

Happy reading!!! Bye until next time :)

--

--