When Microsoft announced its open-source document database, it led to considerable confusion. Azure Cosmos DB was originally named Azure Document DB, but Microsoft rebranded it as Azure Cosmos DB. Meanwhile, Amazon seized the chance to rename its NoSQL database to Amazon DocumentDB. Naming products is challenging—much like naming babies! You should yell the name you choose a few times to see if you still like it when you are calling for your kids, or, in this case, your products. DocumentDB may confuse those familiar with its naming history, but it accurately describes the product’s functionality. DocumentDB is essentially a document database.
To understand DocumentDB, it’s essential to be familiar with both MongoDB and PostgreSQL. PostgreSQL is an open-source relational database that is often ranked as the top database due to its performance, features, and cost-effectiveness. On the other hand, MongoDB is a popular NoSQL database that introduced BSON (Binary JSON) data types. While JSON has limited data types, MongoDB enhances the JSON format by adding more diverse data types and storing them in a binary format rather than a readable textual format.
DocumentDB is an extension of PostgreSQL that adds MongoDB BSON data types to the PostgreSQL database engine. It also provides an API for performing various database operations. In the following screenshot, you can see how I connected to DocumentDB using PgAdmin.

The extension named documentdb_core introduces support for the BSON datatype and provides operations for native Postgres. Another extension, pg_documentdb, serves as the public API that offers CRUD functionality for documents stored in the database.
One of the disadvantages of Azure Cosmos DB is that it is only available in the cloud. If you need a stable on-premises NoSQL database engine, DocumentDB is a strong candidate. DocumentDB provides comprehensive support for all extensions available in PostgreSQL. This includes advanced capabilities such as vector support, which allows for efficient handling of high-dimensional data, as well as geospatial data support, enabling complex geographic information systems and spatial queries. With its robust compatibility, DocumentDB ensures users can leverage the full range of PostgreSQL extensions to enhance their databases and streamline their applications.
You can download the latest version from DocumentDB’s GitHub page. It’s easy to download and start using it in Docker to explore this new NoSQL database engine.
Leave a Reply