Docs Menu

What is MongoDB?

MongoDB is a document database designed for ease of application development and scaling.

Run MongoDB with MongoDB Atlas fully managed in the cloud.

Get started with MongoDB Atlas

Important

MongoDB 6.2 is a rapid release and is only supported for MongoDB Atlas. MongoDB 6.2 is not supported for use on-premises. For more information, see MongoDB Versioning.

To install the latest MongoDB version supported for on-premises use, MongoDB 6.0, see the MongoDB 6.0 installation instructions.

Homepage hero image
What You Can Do
1

Design your data schema to support frequent access patterns. You can update or enforce your schema at any point.

To learn more, see Data Modeling Introduction

2

Import data from CSV or JSON files into your MongoDB database.

To learn more, see MongoDB Shell (mongosh)

3

Use the MongoDB Query API to perform CRUD operations on your data - with or without transactions.

To learn more, see MongoDB CRUD Operations

➜ mongosh --port 27017
Current Mongosh Log ID: 123a4bc5d67891011ef1213g
Connecting to: mongodb://127.0.0.1:27017/
For mongosh info see: https://www.mongodb.com/ja-jp/docs/mongodb-shell/
test> db.messages.insertMany([
{
message: "Hello World!",
author: "MongoDB",
comments: [],
_id: 1
}
])
{ acknowledged: true, insertedIds: { '0': 1 } }
test> db.messages.findOne({ _id: 1 })
{ _id: 1, message: 'Hello World!', author: 'MongoDB', comments: [] }
1

Import data from a CSV or JSON file with mongoimport.

To learn more, see mongoimport

2

Use aggregation pipelines to process your data in multiple stages and return the computed results.

To learn more, see Aggregation Operations.

test> db.orders.insertMany([
{ "item" : "almonds", "price" : 12, "quantity" : 2 },
{ "item" : "pecans", "price" : 20, "quantity" : 1 },
])
test> db.inventory.insertMany([
{ "sku" : "almonds", "description": "product 1", "instock" : 120 },
{ "sku" : "cashews", "description": "product 3", "instock" : 60 },
{ "sku" : "pecans", "description": "product 4", "instock" : 70 }
])
test> db.orders.aggregate([
{ $match: { price: { $lt: 15 } } },
{ $lookup: {
from: "inventory",
localField: "item",
foreignField: "sku",
as: "inventory_docs"
} },
{ $sort: { price: 1 } },
])
1

Verify the identity of a user, replica set member, or sharded cluster member with authentication.

To learn more, see Authentication

2

Enable Role-Based Access Controls to manage user privileges on your entire database cluster or individual collections.

To learn more, see Role-Based Access Controls

3

Client-Side Field Level Encryption protects data while it is in-use by the database. Fields are encrypted before they leave your application, protecting them over the network, in memory and at rest.

To learn more, see Client-Side Field Level Encryption.

MongoDB Security
1

Provide redundancy and resilience for your database by deploying a replica set.

To learn more, see Replication

2

Use sharding to horizontally scale your database or to ensure location-based separation of data.

To learn more, see Sharding

MongoDB Deploy and Scale
Related Products & Resources

Explore libraries and tools for MongoDB.

MongoDB Atlas icon

Use MongoDB in your application’s language

Learn about Drivers

MongoDB University icon

Visually explore your data with MongoDB Compass

View Compass Docs

MongoDB Server icon

Manage and monitor your deployments

View Ops Manager