Microsoft's new DocumentDB rethinks NoSQL on PostgreSQL
Microsoft has introduced DocumentDB, a new NoSQL database layer built on PostgreSQL. It provides document-oriented database capabilities like flexible schemas and native JSON support while leveraging PostgreSQL's reliability and ecosystem. The service is designed for workloads needing both NoSQL flexibility and relational database consistency.
Background
- Microsoft rebuilt its Azure Cosmos DB for MongoDB on top of PostgreSQL, calling the new engine "DocumentDB." Instead of maintaining a custom NoSQL storage engine, Microsoft now uses PostgreSQL as the foundation with a document layer on top.
- NoSQL document databases (like MongoDB) store data as flexible JSON-like "documents" rather than rigid, pre-defined tables. DocumentDB is Microsoft's implementation of this.
- PostgreSQL is an open-source relational database that has grown powerful JSON support, making it viable as a document database base.
- Cosmos DB is Microsoft's cloud database service offering multiple models (document, graph, key-value). This change affects its MongoDB-compatible API.
- Users get a managed MongoDB-compatible database running on PostgreSQL — combining MongoDB developer experience with PostgreSQL's reliability, transactions, and ecosystem (pgvector for AI embeddings, sharding tools, etc.).
- This matters because most cloud DB vendors either build custom engines (old Cosmos DB, DynamoDB) or use PostgreSQL. Microsoft is betting PostgreSQL is the better foundation.