Introduction
Architectural decision for database designing is a very important activity when we are building an Enterprise Grade application. It is very important to choose the right type of Database and have it hosted on the right platform. A couple of years earlier the nature and type of data that was getting generated were similar in most of the cases and the options available to store and handle these data were limited. It was easier for Data Architects then as they just had to choose the right Database software vendor and most of the time the data used to be stored in Relational Databases.
In today’s age, data generated is huge and the nature of data varies a lot. The modern application can be a Conversational Interface or a Bot receiving unstructured conversational data from a user or an IOT device interface receiving lots of real-time data or can be a simple Web Application receiving relational data. This poses a potential challenge for the Data Architects to examine the nature of data and take the right decision to choose the right type of data that can fit in best for the application that is being architected.
While choosing the right database, a lot of considerations have to be accounted for. A few of them like the nature of data, how the data is to be consumed, data security, GDPR requirements, high availability and many more. However, in this article, we will discuss choosing a database based on nature and type of data.
The database offerings native to a database vendor are not covered here, although it is an important aspect to be considered. The discussion in this article comes from a data-agnostic perspective on how to choose the right database to store the data in the right way. We will try to see when to choose a Relational SQL database and when to go for a No SQL database in this article.
Relational Databases
Let us try to understand what Relational Databases are. They are by far the oldest and most used databases adopted widely by enterprises.
In these databases, data is stored in tables as rows and columns. There is a clear non-ambiguous relationship that exists between the data stored in different tables. Each row having data in a table is called a record and is identified by a primary key and the data relationship is exhibited using foreign keys. Normalization is applied to the data while storing it.
In the example below, we have a table having Employee Id, Name and his Role and a second table that has Access Id, Employee Id, and Access. The second table has a foreign key relationship with the first table. Each record in the second table has a relationship with the first table using the EmployeeID key. In simple words, all the three accesses listed out in the second table belong to Employee Id 1003 listed in the first table. This is an example of how a relational database looks.

The very advantage of this kind of database is the ease with which it can be queried. As it has been there for ages there are a lot of standards and capabilities that have evolved around it with a proven rate of adoption at enterprise level thus making it the favorite category of the database for developers and enterprises.
The data can be partitioned and indexed thus increasing the data seek performance. Transactional integrity which can be implemented for any relational database makes the data write safe. All database ACID principles hold good here.
Now what if we have a huge amount of data or highly unstructured data or data schema varies a lot or the data is highly hierarchical in depth. In such cases should the relational database be a choice here? The answer to this is No. The degree of complexity to handle such data with relational database design technique would be relatively very high and the design would not be efficient.
Learn more here, What are relational databases.
No SQL Databases
In the modern computing paradigm, the data is generated using a wide range of devices and user interfaces. The data can be very huge and the schema may vary like anything. It can be a couple of IoT devices generating huge unstructured data or a simple social application generating data with varying schema. In all such scenarios, No SQL Databases can be used. There can also be a huge number of users that may be accessing the data and performance can be a bottleneck. No SQL Database addresses solve performance issues gracefully as they can scale out easily and can be highly distributed.
ACID principles do not apply or go with No SQL databases. However, this is something to not be worried much about here and it adheres to BASE principles and the CAP theorem.
CAP theorem is applicable to all distributed Databases. The below illustration explains CAP theorem in a nutshell.





Prabakaran MPosted Oct 18, 2019, 2:45 AM
Nice Article Sir
Pankajkumar PatelPosted Sep 27, 2019, 12:22 AM
Nice article
Sourav Kumar DasPosted Sep 25, 2019, 8:09 AM
Very good article Sir.
Sarathlal SaseendranPosted Sep 24, 2019, 2:35 PM
Very good and useful article Abhishek Ji
Chittaranjan SwainPosted Sep 23, 2019, 11:19 PM
Nice Article...