MongoDB announces ACID transaction capabilities

MongoDB 4.0 to be released in the summer will feature multi-document ACID transactions for the first time

Open source database vendor MongoDB has released a beta of its forthcoming major release Mongo 4.0. This new version will offer ACID transactions for the first time, with a general public release planned for the summer.

NoSQL document databases like MongoDB offer a direct alternative to the rigid schema used in relational databases. This allows them flexibility when handling a wide variety of data types at large volumes and across distributed architectures, properties that have made them a key part of the big data revolution.

However, ACID transactions have largely eluded NoSQL databases until now. ACID (Atomicity, Consistency, Isolation, Durability) describes the ability to guarantee that a transaction is valid, which is difficult when data is distributed across multiple documents.

For most applications, this constraint can be worked around by restricting transactions to single documents, but as once-specialist databases like MongoDB evolve to become general purpose tools (MongoDB dropped the NoSQL tag from its marketing materials some time ago prefering the epithets 'modern' or 'non-relational'), adding ACID capability for all transactions represents a stumbling block removed.

"Some developers and DBAs have been conditioned by 40 years of relational data modelling to assume multi-document transactions are a requirement for any database, irrespective of the data model they are built upon," said Mat Keep, director of product marketing at MongoDB.

"Some are concerned that while multi-document transactions aren't needed by their apps today, they might be in the future. And for some workloads, support for ACID transactions across multiple documents is needed."

In its press release MongoDB claims that version 4.0 will make it "the only open source database to combine the speed, flexibility and power of the document model with ACID data integrity guarantees across multiple documents."

MarkLogic is an ACID complaint NoSQL database but its source code is proprietary, but what about open source RavenDB?

"RavenDB doesn't provide ACID controls to operations against indexes, while MongoDB does - thus giving the guarantees users have come to expect from relational databases," Keep told Computing.

The ability to run ACID transactions on MongoDB started with the acquisition of the WiredTiger storage engine in 2015 and is the result of the re-engineering of many parts of the architecture including the storage layer, the replication consensus protocol and the sharding architecture.

"ACID transactions are a key capability for business critical transactional systems, specifically around commerce processing," said Dharmesh Panchmatia, director of e-commerce at Cisco Systems in a press statement.

"No other database has both the power of NoSQL and cross-collection ACID transaction support. This combination will make it easy for developers to write mission-critical applications leveraging the power of MongoDB."

Last October MongoDB went public and its shares are traded on Nasdaq. The company claims it has 4,900 companies in addition to "hundreds of thousands" of users around the world.