Data Modelling with NoSQL Database

Nilay Chauhan
Data Stash
Published in
2 min readAug 14, 2020

--

Hello everyone,

In my last blog, we discussed what is data modelling with relational Database. Now, in this blog, we are going to discuss some of the important things you should know or consider before performing data modelling with NoSQL database.

NoSQL Database has a simple design, simple horizontal scaling, and good availability. It has a different data structure than a relational database. It makes some operations faster.

Some examples of NoSQL Databases:

  • MongoDB
  • Apache Cassandra
  • Dynamo DB
  • Apache HBase
  • InfoGrid
  • Oracle NoSQL Database

When to use a NoSQL database for Data Modelling?

  • When you need to store different data type formats:

JSON, XML, structured, semi-structured, unstructured data can be easily handled with the NoSQL database.

  • When you have a large amount of data(Big Data):

As NoSQL databases are distributed database, you can add more servers to the database — with high availability and low latency.

  • When you need horizontal scaling:

It is the ability to add more servers or nodes to a system to increase performance and space for data.

  • When you need a flexible schema:

Flexible schema can allow columns to be added that do not have to be used by every row, saving disc space.

  • When you need high throughput:

When ACID transactions bring benefits but also they slowdowns the process of reading and writing data. If you want fast writes and reads using a relational database may not suit your needs.

  • Need high availability:

NoSQL databases are distributed databases, so there is no single point of failure and it also provides high availability.

When not to use a NoSQL database

  • When you have a small dataset.
  • When you need ACID transactions.
  • When you need the ability to do JOINs.
  • When you need the ability to do aggregations and analytics.
  • When you have changing business requirements.
  • When overwrites are not possible and you need to have flexibility.

CAP Theorem

CAP theorem states that it is impossible for a distributed data store to simultaneously provide more than two of three guarantees of consistency, availability, and partition tolerance.

Consistency:

Every read from the database gets the latest and correct piece of data or an error.

Availability:

Every request sent is received and a response is given — without a guarantee that is the data is the latest update.

Partition Tolerance:

The system continues to work regardless of losing network connectivity between servers or nodes.

Thank You!!

Be Safe!!

--

--