NoSQL databases and management systems are the current buzzwords in the storage industry. Big data explosion is the main catalyst behind the growth and popularity of NoSQL databases. Traditional database management systems (DBMSs) are mainly designed for structured data with predefined schema. So, the relational model (RDBMS) finds it very difficult to deal with semi-structured, unstructured or other forms of data, popularly known as big data.
Now, the question is - How can we deal with this unstructured data? The simple answer is - Shift toward NoSQL database management systems. Big data is now mainstream, so we have to take it seriously and manage it professionally with the help of schema-less NoSQL databases.
|Webinar: Forward Momentum: Moving Relational Beyond Traditional
But, at the same time we must remember that NoSQL database management systems are not a replacement for traditional RDBMS, but are there to fill the gaps found in the relational model while working with unstructured data.
In this article, we will try to explore different sides of NoSQL databases and management systems.
Defining Database Management Systems
Before we talk about DBMS, we need to have a basic idea about databases. Databases are storage spaces, systematically organized to store different types of data. They store data in a structured way, so that it can be retrieved, managed or updated by the computer programs. In the case of NoSQL, the storage organization is different, as it stores unstructured and semi-structured data.
A database management system can be defined as a set of software programs capable of handling database operations. It includes storing, extracting and modifying data along with the administrative activities. All the relational databases have a predefined model/schema which defines the structure of the data and how it is stored. But in NoSQL storage, the schema is dynamically defined.
As the fundamental storage mechanism is different for relational and non-relational models, the DBMSs are also different. We will discuss this more in the following sections.
NoSQL – A New Way of Thinking About Databases
Before the explosion of big data, we were quite comfortable with the relational storage model, because the input data was almost in structured form. And, for the small amount of unstructured data, some mechanisms or ETL tools were used to make it structured and then load into the RDBMS. So, we never faced the challenges of managing huge volumes of unstructured data (big data).
Here's where the role of NoSQL technology comes in. The term NoSQL originally referred to "non-relational." NoSQL is a new way of thinking about databases and their management systems. It provides a mechanism to store and retrieve data, modeled in a non-relational way (without tabular relation). There are different types of NoSQL databases available in the market, each suitable for specific use cases. But the fundamental purpose of all these types are similar – to store semi-structured, unstructured or other forms of data.
What are NoSQL Database Management Systems?
In simple terms, NoSQL DBMS is a group of system software/libraries to manage, operate and administer non-relational databases. NoSQL database management systems are specifically designed to manage unstructured data and they are characterized by a schema-less model, high performance, scalability, distributed storage, cloud enablement, etc.
We know that unstructured data, more specifically big data, has four dimensions – volume, velocity, variety and complexity. Now, if we do a combination of these different dimensions, we get different types of data models. So, the NoSQL DBMSs are also designed to have multiple operational models based on the data and target functionality.
There are mainly four types of NoSQL DBMSs. Let us take a look at them one by one.
- Brief description: Key-value-based NoSQL storage is the most basic type of NoSQL implementation. The journey of NoSQL DBMS started with key-value pairs only, so they are the basic backbone of the non-relational model. The value of any data is stored with a matching key without any structure or relation. And, the data is also fetched with the help of the key. It has high performance with easy scalability support.
- When suitable: The key-value model is suitable for storing basic information like user profiles, user sessions, shopping cart data, queuing and live information, etc.
- When not suitable: These are not recommended in situations where we need to perform data-based query, multiple key-based operations or relationship-based fetching, etc.
- Brief description: A column-based DBMS model stores related data in a family of columns. It can be imagined as a row with multiple columns containing related data and identified by a row key. The important point to note is that different rows can have different columns and new columns can also be added to any row at any point of time. So, it is not necessary to maintain the same columns for all the rows.
- When suitable: It is suitable for storing large volumes of unstructured and non-volatile data. These are mostly used for log aggregation, blogging platforms, etc.
- When not suitable: It is not recommended for any early stage development or cases where query pattern changes frequently.
- Brief description: A document-based model is nothing but a key-value store, where the document is stored in the value part and retrieved by the associated key. These documents can be XML, JSON or in any other form, having a hierarchical and self-defining structure.
- When suitable: It is suitable for storing nested information, CMSs, web-based and real-time analytics, e-commerce applications, etc.
- When not suitable: It is not suitable for complex operations spreading across multiple documents or complex queries.
- Brief description: A graph database is a different flavor compared to the other three types of NoSQL storage. It stores entities with their relationships. Entities are known as nodes (having their own properties) and relations are known as edges. This is like a tree structure where all the nodes are connected based on their relationships.
- When suitable: Graph databases are suitable in scenarios where we have data with strong relationships. Some of the implementations are social networks, recommendation engines, geospatial data, etc.
- When not suitable: It is not suitable in situations where the data model does not have strong relationships among the entities. Because the success of the graph is mainly dependent on the relationship-based model.
Now we have a clear understanding of different NoSQL DBMSs and their usage. So let’s have a look at how it differs from SQL and traditional RDBMS.
SQL vs. NoSQL – And the winner is…
We have been using SQL and traditional RDBMS for decades and it has supported almost all the use cases. Now, in the age of big data, NoSQL technology is being introduced to support the new use cases related to unstructured data. But, it does not mean that the old use cases for which RDBMS is suitable no longer exist. So, NoSQL DBMS is not a replacement for RDBMS, rather is it to support the gaps found in RDBMS while dealing with big data. There are multiple differences in both the models, some of them are mentioned below:
- SQL DBMS followed a strong schema-based relational model. But NoSQL DBMS is relation-less and schema-less.
- RDBMS only supports vertical scaling, whereas NoSQL DBMS supports horizontal scaling.
- RDBMS is ACID (atomicity, consistency, isolation and durability) compliant, but NoSQL DBMS is not.
So, there is no competition between SQL and NoSQL or their database management systems. They are both suitable for specific use cases and will grow in the future.
We have discussed different aspects of NoSQL DBMS, and have also touched on RDBMS to find the differences with NoSQL storage. NoSQL DBMS has different models based on their target use cases, so they also have various features. NoSQL technology is mainly developed for handing unstructured data (big data). As we move into the future, the volume of unstructured data is going to grow, so NoSQL as a DBMS also has a bright future in the storage industry. But, it will not replace RDBMS, as the relational use cases are well managed by the relational models only. The future of storage is basically a polyglot persistence, where multiple storage technologies will coexist to meet various requirements.