Non-relational Database

pragyasapkota

Pragya Sapkota

Posted on November 9, 2022

Non-relational Database

We discussed relational databases in my previous article here. And as we know there is one other type of database — a non-relational database. Let’s take this blog to understand the basic concept of a non-relational database.

A non-relational database is a less rigid database that provides more flexibility to the structure of data stored. The operations to store the data in a non-relational database present the data as ‘key-value’ pairs. Let’s see an example of data stored in a non-relational database as an array of ‘key-value’ pair objects.

[ {
    name: 'Pragya',
    rank: '1',
    gender: 'F',
    year: 2056,
  },
  {
    name: 'Dipen',
    rank: '3',
    gender: 'M',
    year: 2072,
  },
  {
   ........
  },
  ............
]
Enter fullscreen mode Exit fullscreen mode

As we talked about how and why the relational database is called a SQL database, the non-relational is by default the “NoSQL” database. There are some great benefits of not needing to consistently structure data under the NoSQL database.

BASE Transaction

Like the ACID (Atomicity, Consistency, Isolation, Durability) in the relational database — non-relational database or the NoSQL database has BASE transactions.

BA = Basically Available

S = Soft State

E = Eventual Consistency

Let’s explore them individually,

Basically Available

The first feature Basically Available promises us that the system will be highly available at any time of need.

Soft State

Likewise, the soft state tells us that the state of the system may change over time — sometimes even without input.

Eventual Consistency

The system can be consistent for a certain and short time unless other inputs are fed to it.

Conclusion

The non-relational database uses a hash-table-like structure whose concepts have been discussed here. This leads to fast and simple operations that are perfect for caching, environment variables, configuration files, session states, etc. Unlike relational databases, it can be used in both memory and persistent storage.

We have heard of some other “JSON-like” databases that are document databases among which we might have heard the most-loved one — MongoDB (Technically a BSON database). However, at the core, all of these are the ‘key-value’ stores too.

GitHub logo pragyaasapkota / System-Design-Concepts

A repo with some system design concepts.

System Design

Systems design is the process of defining elements of a system like modules, architecture, components and their interfaces and data for a system based on the specified requirements.

This is a index for the concepts of system.

If you wish to open these in a new tab, Press CTRL+click

Thank you!!!


Show some ❤️ by starring this repository!





I hope this article was helpful to you.

Please don’t forget to follow me!!!

Any kind of feedback or comment is welcome!!!

Thank you for your time and support!!!!

Keep Reading!! Keep Learning!!!

💖 💪 🙅 🚩
pragyasapkota
Pragya Sapkota

Posted on November 9, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Non-relational Database
database Non-relational Database

November 9, 2022