Open In App

Types of NoSQL Databases

Improve
Improve
Like Article
Like
Save
Share
Report

A database is a collection of structured data or information which is stored in a computer system and can be accessed easily. A database is usually managed by a Database Management System (DBMS).

NoSQL is a non-relational database that is used to store the data in the nontabular form. NoSQL stands for Not only SQL. The main types are documents, key-value, wide-column, and graphs. 

Types of NoSQL Database:

  • Document-based databases
  • Key-value stores
  • Column-oriented databases
  • Graph-based databases
Types of NoSQL Database

 

Document-Based Database:

The document-based database is a nonrelational database. Instead of storing the data in rows and columns (tables), it uses the documents to store the data in the database. A document database stores data in JSON, BSON, or XML documents.

Documents can be stored and retrieved in a form that is much closer to the data objects used in applications which means less translation is required to use these data in the applications. In the Document database, the particular elements can be accessed by using the index value that is assigned for faster querying.

Collections are the group of documents that store documents that have similar contents. Not all the documents are in any collection as they require a similar schema because document databases have a flexible schema.

Key features of documents database:

  • Flexible schema: Documents in the database has a flexible schema. It means the documents in the database need not be the same schema. 
  • Faster creation and maintenance: the creation of documents is easy and minimal maintenance is required once we create the document. 
  • No foreign keys: There is no dynamic relationship between two documents so documents can be independent of one another. So, there is no requirement for a foreign key in a document database.
  • Open formats: To build a document we use XML, JSON, and others.

Key-Value Stores:

A key-value store is a nonrelational database. The simplest form of a NoSQL database is a key-value store. Every data element in the database is stored in key-value pairs. The data can be retrieved by using a unique key allotted to each element in the database. The values can be simple data types like strings and numbers or complex objects.

A key-value store is like a relational database with only two columns which is the key and the value. 

Key features of the key-value store:

  • Simplicity.
  • Scalability.
  • Speed.

Column Oriented Databases:

A column-oriented database is a non-relational database that stores the data in columns instead of rows. That means when we want to run analytics on a small number of columns, you can read those columns directly without consuming memory with the unwanted data.

Columnar databases are designed to read data more efficiently and retrieve the data with greater speed. A columnar database is used to store a large amount of data. Key features of columnar oriented database:

  • Scalability.
  • Compression.
  • Very responsive.

Graph-Based databases:

Graph-based databases focus on the relationship between the elements. It stores the data in the form of nodes in the database. The connections between the nodes are called links or relationships.

Key features of graph database:

  • In a graph-based database, it is easy to identify the relationship between the data by using the links.
  • The Query’s output is real-time results.
  • The speed depends upon the number of relationships among the database elements.    
  • Updating data is also easy, as adding a new node or edge to a graph database is a straightforward task that does not require significant schema changes.

Last Updated : 14 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads