Know what BASE means for a NoSQL Database
- Vishakh Rameshan
- Jan 5, 2021
- 2 min read

NoSQL DB have come recently and has greatly popularized itself of various use cases that the traditional databases couldn't solve. This does not mean that we can replace a SQL database with a NoSQL database like MongoDB, Google Cloud Datastore, AWS DynamoDB etc.
NoSQL is just the opposite of SQL which is strictly based on a schema, whereas NoSQL databases have no schema and each 2 records of same kind/document (tables in SQL) can have different properties (columns in SQL)
This blog is to highlight something that most of us have heard but didn't get a chance to understand it and that is "BASE (Basic Availability, Soft State, Eventual Consistency)". This is a complete opposite of the ACID (Atomicity, Strong Consistency, Isolation and Durability) property of a SQL Database.
Let's dissect each and see what those terms mean.
Basic Availability - This means that the data is always available no matter if the system crashes.
NoSQL DB are designed to be distributed in nature. Compared with a transactional database which is used to be a single database server with vertical scaling, NoSQL databases scale horizontally.
This means that the data is served from multiple instances of machines and when traffic/load increases, new machines are spun up. Same is the case with low traffic/load. The machines are no longer important, they are created and destroyed as per the requirement and the underlying data is replicated to multiple disks. This game changing approach is what makes cloud computing so much popular.
Currently with Cloud in place, some of the cloud provider managed relational databases like Google Cloud Spanner or AWS Aurora too are distributed in nature, which is difficult to handle in a on-premise environment.
Soft State - In a relational database where state remains consistent before and after a transaction, this is just the opposite in a NoSQL were there is no guarantee on when the state will be consistent.
Eventual Consistency - Relational databases are always strongly consistent and this means that the data even though it sits on one machine or on multiple machines/disks will be always consistent. This is not the case with a NoSQL DB.
The reason is pretty simple, which is the use case or purpose for which both databases are used. A SQL DB is basically used for transaction or logging purpose where the state is always important to be consistent. But, a NoSQL DB is used to say analytics on user preference or saving user profiles, product details etc.
But even if the above is true, Cloud services like Cloud Datastore/Firestore and others support ACID property or say strong consistency.
To know more about ACID property click here
Comments