PROVIDER - Document NoSQL database
MongoDB
MongoDB is a document NoSQL database that stores data as BSON documents and provides replica sets, sharded clusters and an aggregation pipeline; Community Edition ships under the SSPL, while Atlas is managed across AWS, Azure and Google Cloud.
4.5pts
Service Overview
MongoDB is a document database vendor that stores records as BSON documents, allowing nested objects and arrays without a predefined schema. Its catalogue spans three lines: Community Server under the SSPL, Enterprise Advanced under an annual per-node subscription, and the Atlas managed service billed by cluster tier and hour, all sharing one query language and driver surface.
Core capabilities cover the aggregation pipeline, secondary indexes, replica sets and sharded clusters, with 9.0 as the current GA line. Official drivers cover Java, Python, Node.js, Go, C# and other languages, alongside mongosh, Compass and the Kubernetes Operator; Atlas deploys to more than 125 regions on AWS, Azure and Google Cloud and is filed under database.
Key Strengths
- The BSON document model keeps nested objects and arrays in one record, removing most join mapping.
- Replica sets run multiple members; a primary failure triggers an election and drivers reconnect automatically.
- Sharded clusters split data by shard key and keep scaling horizontally beyond 4 TB per cluster.
- The aggregation pipeline ships grouping, lookup and window stages; secondary indexes cover compound, multikey and geospatial queries.
- Official drivers span more than ten languages, with the same CRUD syntax and aggregation stages across them.
Limitations
- Community Edition uses the SSPL, which requires releasing service source code when the database is offered as a service.
- Multi-document transactions need replica sets or sharded clusters, and cross-shard commits cost more than single-shard writes.
- There is no cross-collection JOIN or foreign key; related data must be embedded or assembled in the application.
- Atlas bills clusters by the hour, and data transfer, backup snapshots and dedicated search nodes are priced separately.
- Enterprise Advanced is an annual per-node subscription; list prices are not published and purchases run through a contract.
Product Ecosystem
The catalogue runs in three layers, open source, commercial subscription and managed service, with drivers and tooling around them.
Community Server and licensing
The free edition; the download page currently serves 9.0.8 and maintains the 8.3, 8.2, 8.0, 7.0, 6.0, 5.0 and 4.4 lines across Linux, Windows, macOS and container images. The licence is SSPL v1, published on 2018-10-16; section 13 requires releasing service source code when the database functionality is offered to third parties as a service. The SSPL is not recognised as an open source licence by the OSI, which is why cloud providers ship their own compatible products instead of hosting Community Edition directly.
Enterprise Advanced
The commercial subscription for self-managed deployments, bundling Enterprise Server, Ops Manager and Cloud Manager, the Kubernetes Operator, LDAP and Kerberos authentication, encryption at rest, audit logging, BI connectors and a commercial licence. Subscriptions are priced per node per year, with optional add-ons for 30-minute severity-1 response, MongoDB Search and Extended Lifecycle Support.
Atlas managed service
MongoDB's own fully managed offering, created from the console, the Atlas CLI, the Kubernetes Operator or the Terraform provider. Deployments split into Atlas Core dedicated clusters and Atlas Infinite, which decouples compute from storage and allows up to 128 TB per HA shard in public preview. Multi-region and multi-cloud replica sets, full-text search, vector search, stream processing and online archive are enabled as separate services; see MongoDB Atlas for the dedicated entry.
Drivers and developer tools
Official drivers are maintained for Java, Python, Node.js, Go, C#, PHP, Ruby, Rust and other languages, with the same CRUD syntax and aggregation stages across them. The toolchain includes the mongosh shell, the Compass GUI, mongodump and mongorestore in Database Tools, Relational Migrator and the Atlas CLI.
Search and analytics services
MongoDB Search exposes full-text search, autocomplete and faceting through the $search and $searchMeta aggregation stages, with optional dedicated S20 to S80 search nodes for production. Atlas Vector Search runs ANN and ENN queries and can generate embeddings with Voyage AI models; Atlas Stream Processing handles event streams, Atlas Data Federation queries S3, Azure Blob and GCS data directly, and Online Archive tiers cold data to object storage.
Use Cases
- Applies | Semi-structured content and catalogues: fields change often, and adding a field needs no table rebuild.
- Applies | Regional read locality: Atlas can spread replica set members across regions and clouds.
- Applies | In-database text and vector retrieval: search and operational data share one cluster.
- Evaluate | Multi-table reporting and cross-table transactions: relational optimisers handle these queries better.
- Evaluate | Projects that mandate an OSI-approved licence: the SSPL terms need legal review first.
Pricing & Billing Selection
| Billing mode / tier | Reference unit price | Configuration and billing rules | Workload fit |
|---|---|---|---|
| Atlas Free (M0) | $0/hour, free indefinitely | 512 MB storage on shared RAM and vCPU, no backups or dedicated search nodes | Learning, prototyping and teaching |
| Atlas Flex | From $0.011/hour, $8-$30/month by usage | 5 GB storage on shared resources; $8/month at 0-100 ops/s, $30/month at 400-500 ops/s | Development and small apps with spiky traffic |
| Atlas Dedicated (M10-M50) | $0.08-$2.00/hour, M10 about $56.94/month | 10 GB-4 TB storage, 2-32 GB RAM, 2-8 vCPU, three-member replica set by default | Standard production with auto-scaling |
| Atlas Dedicated (M60-M700) | $3.95-$33.26/hour | 64-768 GB RAM, 16-96 vCPU, up to 4 TB storage, then shard horizontally | High-throughput transactions and large single clusters |
| Atlas Search nodes (S20-S80) | $0.12-$3.26/hour | Billed apart from the database cluster, per node and tier, 106 GB-3.4 TB storage | Dedicated compute for text and vector search |
| Atlas Data Federation | $5 per TB scanned, 10 MB minimum per query | Charged on data processed and returned; federated queries over S3, Azure Blob and GCS | Data lake analytics and BI federation |
| Enterprise Advanced | Annual per-node subscription, one-year minimum | Commercial licence, Ops Manager, Kubernetes Operator and support; node count and support tier set the total | Self-managed data centres needing a commercial licence and audits |
| Community Edition | No licence fee | Self-managed under the SSPL; servers, storage, backups and operations are your cost | Development and teams able to run their own operations |
Note: 2026-11 catalogue price ranges in the AWS default region on hourly metering; other regions and clouds differ, and data transfer, backup snapshots, support subscriptions and dedicated search nodes are excluded from the cluster tier price.
FAQ
- How do Community Edition, Enterprise Advanced and Atlas differ? They share one engine and differ in delivery. Community Edition is free with baseline features under the SSPL; Enterprise Advanced adds LDAP and Kerberos authentication, encryption at rest and auditing under an annual per-node subscription; Atlas is operated by MongoDB, which handles backups, upgrades and scaling, billed per cluster tier by the hour and scalable from the console.
- Does MongoDB require identity verification or an ICP filing? Not for the software itself. Community Edition is downloaded and installed without an account, verification or filing; Atlas needs an organisation account and a payment method, and its terms follow the account region. Self-hosting on a mainland China server to publish a website or API requires an ICP filing under local rules, while hosting outside the mainland does not.
- What does the Atlas free tier include and how is usage billed? The free M0 tier provides 512 MB of storage on shared resources and can run indefinitely, without backups. Flex runs $8 to $30 per month across five operations-per-second bands; dedicated clusters start at M10 for $0.08 per hour, listed as about $56.94 per month, and data transfer, backup snapshots and dedicated search nodes are billed separately, metered hourly and invoiced monthly.
- Are there tools to migrate from a relational database? Yes. Relational Migrator reads MySQL, PostgreSQL, Oracle and SQL Server schemas and generates collection models plus migration jobs; historical data moves with mongodump and mongorestore, and incremental changes can follow change streams. Indexes must be rebuilt around the new query patterns, and reports that relied on JOINs usually move to aggregation pipelines or stay in an analytics store.
- Which regions can Atlas clusters run in? It depends on the cloud provider. Atlas supports AWS, Azure and Google Cloud with more than 125 regions listed, and the exact cities and availability zones follow the list shown at creation time. Multi-region replica sets route reads locally, while cross-region replication and data transfer add cost, and users in mainland China should evaluate cross-border latency.
Integration & Code Examples
Copy the connection string from the Connect panel in the Atlas console for your driver; mongodb+srv:// resolves replica set members through DNS SRV records, so a missing IP access list entry ends in a connection timeout. The script below creates a compound index and inserts two orders.
export MONGODB_URI='mongodb+srv://app:your-password@your-cluster.mongodb.net/?retryWrites=true&w=majority'
mongosh "$MONGODB_URI" --eval '
db.orders.createIndex({ tenantId: 1, createdAt: -1 });
db.orders.insertMany([
{ tenantId: "t-001", sku: "A-1001", qty: 2, status: "paid", createdAt: new Date() },
{ tenantId: "t-001", sku: "B-2002", qty: 1, status: "pending", createdAt: new Date() }
]);
'
Index field order must match the query prefix: tenantId first lets tenant-filtered queries use the index, whereas a lone createdAt index leaves the $match stage scanning the collection.
import os
from datetime import datetime, timezone
from pymongo import MongoClient
client = MongoClient(os.environ["MONGODB_URI"], serverSelectionTimeoutMS=5000)
orders = client.shop.orders
pipeline = [
{"$match": {"tenantId": "t-001", "status": "paid"}},
{"$group": {"_id": "$sku", "qty": {"$sum": "$qty"}, "last": {"$max": "$createdAt"}}},
{"$sort": {"qty": -1}},
]
for row in orders.aggregate(pipeline):
print(row["_id"], row["qty"], row["last"])
orders.insert_one({
"tenantId": "t-001",
"sku": "C-3003",
"qty": 3,
"status": "paid",
"createdAt": datetime.now(timezone.utc),
})
client.close()
The pipeline groups and sorts on the server; placing $match before $group narrows the working set first, and each result row carries the grouping key in _id with the summed quantity in qty.
Community & Resources
The official documentation site tracks the 9.0 line, keeps separate pages for 8.0 and earlier releases, and lists upgrade paths and compatibility changes in the release notes. Community channels include the official forums, the Stack Overflow tag and local user groups, while kernel source and issue tracking live in the mongodb/mongo repository on GitHub.
Learning material covers free MongoDB University courses and certifications, the developer blog and the annual .local events; the tools download page publishes installers and version notes for mongosh, Compass, Database Tools and the Kubernetes Operator.
Articles
- 01 GitLab CI/CD Pipeline Practices 07-18
- 02 Prometheus Monitoring and Alert Setup 07-18
- 03 Choosing Free Fonts for Commercial Use 11-25
- 04 BaaS Platform Selection and Migration Scope 11-29
- 05 Ansible Operations Automation 07-18
- 06 Migrating Spring Boot 4 to Native Image 11-29
- 07 Backend Language Selection and Runtime Boundaries 11-29
- 08 Docker Basics: Install and Run Containers 07-18
- 09 Django, FastAPI, or Flask for a Python Web Project 11-29
- 10 Choosing a Node.js Backend Framework 11-29