What is NoSQL and why you should have it in your toolkit as an architect

Nikhil Das Nomula

Relational databases have been the norm for a long period of time until 2010. The basic concept being that data is organized into tables that consists of rows and columns. We query that using SQL(Structured Query Language). Relational databases have been mainstream since 1990's and are still widely today.

One might wonder, if relational databases have been mainstream for so long - how come document based databases i.e. NoSQL have become so popular. The reasons for that are three fold

  1. Object Relational mismatch: Application developers who write code are used object oriented semantics. For e.g. if we have a java application, we had to insert a framework like hibernate, spring data jpa for the mapping. If we have a .NET application then we have ADO.NET. So it is not straight forward for developers to write application code where they are thinking in objects but then have to map it to tables. NoSQL databases like MongoDB, DynamoDB, CouchDB provide that ease when developing applications.
  2. Schema Flexibility: There is a misconception that we do not have any schema or document databases are schemaless. However what needs to be understood is that the application code that is being written expects to get the data in some structure. So hence it is better to reference that as Schema on Read. In order for an application developer to add a new field to a schema, all they need to do is start writing this new field and when the document is being read, add a null value to the field to maintain structure for further downstream processing.
  3. Data access effciency: With document based databases, the queries return a document that contains the data that is needed so it is easy to iterate within a json as opposed to a relational database where we have to join the results based on multiple queries.

I have listed the pros in this article that make a convincing argument to use document based databases but there are some cases in which it is still a good idea to go with relational databases. If you want to learn more about it, feel free to reach out to us at nikhil.nomula@yajur.tech

You Might Also Like

Data warehouse vs Data Lake vs Data mesh
Data warehouse vs Data Lake vs Data mesh

In this post we will go over three approaches that we see across organizations when it comes to data engineering. The three approaches are...

Read More
Datamesh - What is it?
Datamesh - What is it?

I have been reading about data mesh architecture by Zhamak Dehgani and it has been thought provoking in thinking how data is handled in organizations.

Read More
Logo

© 2024 Yajur LLC . All rights reserved