What Are NoSQL Databases

What are NoSQL Databases?

Relational databases management systems (RDBMS) store data in tabular form of rows and columns, and Structured Query Language (SQL) is the language that is used to access and manipulate data in relational databases. The rapid growth of data and the need for high availability, scalability, and performance in modern software applications have handicapped relational databases due to their design structure. SQL is the only way to access data from relational databases, and going through billions and trillions of records takes time. This is where non-relational databases play a vital role. Database management systems (DBMS) that do not use SQL to query databases are called NoSQL databases. NoSQL databases are also called non-SQL or nonrelational databases. NoSQL databases are not a single kind of database. NoSQL databases are various database technologies that allow data to be stored and managed in different formats without the use of SQL. Some of the databases use their own mechanism, API, and some use non-SQL languages. Non-relational databases have been in existence for decades, but the term “NoSQL” was coined by Carlo Strozzi in 1998 to name his lightweight Strozzi NoSQL open-source relational database. The database did not use SQL to access and manipulate data.

Advantages of NoSQL databases

With the growing amount of data and the need for real-time query responses, data analytics, and semantic algorithms, NoSQL databases have become a need today. NoSQL databases are more scalable and provide higher performance when dealing with high volumes of data. NoSQL databases also provide faster traversing and better semantic solutions. Relational databases have fixed schemas. The database schema must be created before data can be inserted into a relational database. Once a database is created and software applications are written, it’s not easy to change schemas. Changing schemas on relational databases may result in loss of data, broken applications, and heavy rewriting of software applications. Even changing a column type in a relational database can cause major issues to data and applications. What if the database is large, with trillions of records? NoSQL databases do not have predefined schemas, which makes NoSQL databases a perfect candidate for rapidly changing development environments. NoSQL allows developers to make changes on the fly without affecting applications. The major drawback of the NoSQL database is the learning curve and multiple APIs and methods to work with the databases. There is no unified single model like SQL to work with NoSQL databases. Each NoSQL DBMS offers its own API or library. NoSQL DBMS is also broken down into various types, such as a graph, document, column, and key value. Each of these DBMSs has a different architecture and concept to store and manage data.

Types of NoSQL Databases

NoSQL databases can be categorized into the following five major categories,

  1. Column
  2. Document
  3. Graph
  4. Key-value
  5. Object databases

1. Column Data Store

A column data store, also known as a column-oriented DBMS or columnar database management system, stores data in columns rather than rows. Relational database management systems (RDBMS) store data in rows and data properties as column headers. Both row-based and column-based DBMSs use SQL as their query language, but column-oriented DBMSs may offer better performance. Imagine you need to list all names from a table based on an ID; rather than going through all rows, you could just access a single column of the table.

Here are some of the key characteristics of column data store DBMS.

  • Column store DBMS uses a keyspace that is like a database schema in RDBMS.
  • Column store DBMS has a concept called a key family. A key family is like a table on RDBMS. The keyspace contains all the column families in a database.
  • A column family contains multiple rows. Each row has a unique key called Row Key, which is a unique identifier for that row. While each row has a single Row Key, it may have multiple columns. Each column has a Name, Value, and TimeStamp fields.
  • Each row can contain a different number of columns. All rows don’t have to have the same columns.
  • Each column can contain multiple rows. All rows don’t have to have the same data.
  • Column-oriented DBMS is often used in OLAP data operations. Some of the popular column-oriented DBMS include Bigtable, Apache HBase, MariaDB, Azure SQL Data Warehouse, Google BigQuery, IBM Db2, MemSQL, Microsoft SQL Server 2012 or later, and SAP HANA.

Learn more here: What are Column Store Databases?

2. Document Databases

Document database management systems are designed to store full documents as one entity with its attributes. Documents are typically in JSON and XML document formats that are easy to read, store, and parse using APIs and libraries. Document DBMS are faster to load, access, and parse. User profiles, content management systems, and catalogs are some common use cases of document DBMS.

ArangoDB, Couchbase Server, CouchDB, Amazon DocumentDB, MongoDB, CouchBase, Azure DocumentDB, Cosmos DB, Elasticsearch, Informix, Lotus Notes, and SAP HANA are some of the popular document DBMS.

Learn more here: What are Document Databases? Here is a document that stores book data. As you can see from this document, it’s a JSON document that has tags and values that define a book, including year published, book title, author, release date, publisher, and price.

[{
"year":2001,
"title":"AProgrammer'sGuidetoADO.NET",
"info":{
"author":"MaheshChand",
"release_date":"2001-02-01",
"publisher":"APress",
"price":"44.95",
"image_url":"ADOBook.jpg"
}
},{
"year":2003,
"title":"GDI+Programming",
"info":{
"author":"MaheshChand",
"release_date":"2003-03-01",
"publisher":"AddisonWesley",
"price":"49.95",
"image_url":"GDIPlusBook.jpg"
}
}]

3. Graph Databases

Graph databases are developed based on graph theory. In graph databases, a graph can be used to represent data entities, their attributes, and their relationships. The vertices of a graph database are called nodes, and edges are called edges. Popular graph databases are Neo4j, OrientDB, and MongoDB. Microsoft Azure CosmosDB also supports graph models.

Learn more here: What are Graph Databases

4. Key-value Store

Key value store is designed to store a dictionary type of data structure where data is stored in a key-value pair, and the key is used to retrieve data. A dictionary is a collection of objects or records. Popular key-value databases are Dynamo, ArangoDB, Berkeley DB, FoundationDB, and MemcacheDB.

5. Object databases

The concept of object databases came from the concept of object-oriented programming. What if we have a database system that can store an entire object, read it back, and apply operations on it? Object Database Management Systems (ODMS) or Object-Oriented Database Management Systems (OODBMS) provide the functionality to store and manipulate data in object forms. There is no unified standard of OODBMSs. Some OODBMSs use Object Query Language (OQL), which is similar to SQL for OODBMSs.

Popular NoSQL databases

There are hundreds of popular NoSQL databases. Any DBMS that does not use SQL can easily be categorized as a NoSQL database. Here is a list of popular NoSQL database management systems. Keep in mind most of these databases are multi-model DBMSs. That means they support more than one DBMS type. For example, CosmosDB can be used to store data in key-value, column, document, or graph formats.

Azure Cosmos dB

Image source: Microsoft

Here is a list of 10 popular NoSQL databases.

  1. Cosmos DB
  2. ArangoDB
  3. Couchbase Server
  4. CouchDB
  5. Amazon DocumentDB
  6. MongoDB, CouchBase
  7. Elasticsearch
  8. Informix
  9. SAP HANA
  10. Neo4j

Here are some more articles that you may be interested in

  1. What Are Different Types of Database Management Systems
  2. What are Hierarchical Databases
  3. What are Relational Databases
  4. What are Graph Databases
  5. What are Network Databases
  6. What are Document Databases
  7. What are NoSQL Databases
  8. What are Column Store Databases
  9. What is SQL
  10. What are the Most Popular Databases in the World

References


Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.