-9.9 C
United States of America
Wednesday, February 12, 2025

Microsoft Open Sources Code Behind PostgreSQL-Primarily based MongoDB Clone


Microsoft quietly final month unveiled DocumentDB, an open supply NoSQL database that’s designed to be appropriate with MongoDB. The challenge makes public the PostgreSQL-based expertise behind the vCore-based Azure Cosmos DB for MongoDB . Microsoft says it hopes DocumentDB will assist make PostgreSQL an ANSI normal for NoSQL databases.

DocumentDB is a document-oriented database that enables customers to retailer knowledge in Binary Object Notation (BSON), a JSON-like knowledge construction additionally utilized by MongoDB. Microsoft’s DocumentDB database challenge–to not be confused with AWS’s MongoDB-compatible database providing, Amazon DocumentDB–is constructed atop PostgreSQL and makes use of two PostgreSQL extensions developed by Microsoft to allow its BSON performance.

The primary PostgreSQL extension is pg_documentdb_core, which Microsoft describe as “a customized PostgreSQL extension optimizing for BSON.” The library provides customers the flexibility to parse and manipulate BSON paperwork within the PostgreSQL layer of the database engine; index fields within the BSON doc; carry out vector search queries; and implement a full authentication mechanism.

The second PostgreSQL extension is pg_documentdb_api, which Microsoft describes as an information aircraft implementing create, learn, replace and delete (CRUD) operations, question performance, and index administration. The CRUD operations are stated to be MongoDB appropriate.

DocumentDB is on the market on Microsoft’s GitHub code repository right here. The database is distributed below the permissive MIT License, which permits for reuse with proprietary software program.

The purpose of DocumentDB is to offer a typical for interoperability, the corporate says in a January weblog submit by Abinav Rameesh, the challenge administration lead on Azure Cosmos DB.

“The mission for DocumentDB is to offer the developer neighborhood with a NoSQL datastore, carried out utilizing PostgreSQL with full visibility into the structure and implementation of the engine,” Rameesh wrote. “All of the core parts of the database engine from CRUD…operations to indexing and vector search performance are public.”

Microsoft selected to make use of the permissive MIT license to foster broad adoption and to get the neighborhood shifting towards a typical, he wrote.

“DocumentDB is the primary implementation of the challenge’s extra bold mission to create a typical for open-source doc databases, very similar to the ANSI (American Nationwide Requirements Institute) SQL normal for relational databases,” Rameesh wrote. “The creation of a NoSQL normal will heighten the compatibility and interoperability of NoSQL engines sooner or later.”

Azure Cosmos DB is a non-relational database service from Microsoft that helps a wide range of NoSQL knowledge varieties and workloads, together with a doc retailer, a large column retailer, a key-value retailer, and a graph retailer.  Whereas the API utilized in Azure Cosmos DB for MongoDB is MongoDB appropriate, the underlying expertise used within the “vCore” model of Azure Cosmos DB for MongoDB leverages a distributed database engine primarily based on PostgreSQL, which provides it the scalability and efficiency of a standard PostgreSQL setup.

Azure Cosmos DB for MongoDB was about 32% appropriate with the MongoDB API as of October 2023, in line with MongoDB.  “Azure Cosmos DB for MongoDB implements MongoDB’s Wire Protocol to permit MongoDB drivers to attach and work together with Cosmos DB as if it have been a MongoDB host,” MongoDB wrote. “Nevertheless, this implementation has limitations…”

Associated Objects:

MongoDB 8.0 Launch Raises the Bar for Database Efficiency

FerretDB Gives Different to MongoDB

There’s a NoSQL Database for That

 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles