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,
},
{
........
},
............
]
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.
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
S.N. | Table of Content |
---|---|
1. | Caching |
2. | Network Protocols |
3. | Storage: The Underrated Topic |
4. | Latency and Throughput |
5. | System Availability |
6. | Leader Election |
7. | Proxies |
8. | Load Balancing |
9. | Endpoint Protection |
10. | HTTPS: Is it better than HTTP? |
11. | Polling and Streaming |
12. | Long Polling |
13. | Hashing |
14. | CAP Theorem |
15. | PACELC Theorem |
16. | Messaging and Pub-Sub |
17. | Database |
18. | Logging, Monitoring, and Alerting |
19. | Distributed System |
20. | Scaling |
21. | Event Driven Architecture (EDA) |
Thank you!!!
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!!!
Top comments (0)