Friday, February 16, 2018

MongoDB Transactions and ACID compliance

MongoDB is a most popular NoSql database amongst all other NoSql databases. There is a main difference between SQL and NoSQL is that SQL supports transactions and NoSQL do not. Databases are selected depending upon the business requirements, development feasibility, scalability, and agility.

Transactions are important. Any database needs to offer transactional guarantees to enforce data integrity. But they don’t all do it in the same way – different database technologies follow different mechanism.Transactions in a database is a sequence of operations performed as a single logical unit of work. A logical unit of work must conforms  four properties of ACID to qualify as a transaction. The properties are called the atomicity, consistency, isolation, and durability. 


Transactions were out of concept in MongoDB because of NoSQL; but the MongoDB developers did not stop to integrate it in their system. The experiment  of transactions started in MongoDB from the version 3.0. ACID was started from MongoDB 3.2. The upcoming transactions of MongoDB 4.0 and next is a radical change in the history of transactions in NoSQL. It will facilitate Multi-Document Transactions with extended supports in the replicas and  the multiple sharded clusters. 

The WiredTiger storage engine of MongoDB database has brought extensive scalability in the document level concurrency and control. And with MVCC support, it also provided the storage layer foundations for transactions coming in MongoDB 4.0.

The up coming version of MongoDB 4x seems really so exciting, that I can see from a recent blog post of Eliot Horowitz. It will bring a radical change among architects, developers and DBAs to think once again before starting their next project where they need NoSQL and transaction together.

No comments:

Post a Comment