MongoDB
A document-oriented NoSQL database.
MongoDB stores JSON-like documents (encoded as BSON internally) in collections within databases, with flexible schemas and rich query and aggregation operators. Each document can have its own shape; secondary indexes accelerate queries that filter on particular fields. Replica sets handle high availability through asynchronous replication and automatic primary election; sharded clusters scale horizontally by splitting collections across shards keyed by a chosen field.
MongoDB Inc. (formerly 10gen) was founded in 2007 and released the database in 2009. Its initial pitch — schema flexibility, horizontal scale, JSON-native data model — fit the rise of node.js and JavaScript-centric web stacks well. After several generations of replication and consistency improvements, MongoDB now offers configurable strong consistency in addition to its original eventual-consistency defaults.
The licensing situation is unusual: MongoDB Inc. relicensed the core server in 2018 from AGPL to the Server Side Public Licence (SSPL), which is not OSI-approved. Distributions like Debian removed MongoDB packages in response, and AWS forked the older AGPL codebase into DocumentDB. The community edition remains freely usable for self-hosting under SSPL, and MongoDB Atlas, the company's hosted offering, is the most common way new projects deploy it.
Install
Debian/Ubuntu: sudo apt install mongodb-org # via MongoDB APT repo Fedora/RHEL: sudo dnf install mongodb-org Arch: sudo pacman -S mongodb macOS: brew tap mongodb/brew && brew install mongodb-community
Authors
- MongoDB Inc.