For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Databases and Collections in MongoDB

MongoDB stores data records as documents (BSON documents) in collections. A database holds one or more collections.

You can manage databases and collections using the Atlas UI, mongosh, or MongoDB Compass. This page covers Atlas UI procedures. For self-managed deployments, use mongosh or MongoDB Compass.

Select your client:

Log in to Atlas and go to the Data Explorer page for your project.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

2

In the sidebar, click Data Explorer under the Database heading.

The Data Explorer displays.

MongoDB stores documents in collections. Collections are analogous to tables in relational databases.

A collection of MongoDB documents.
click to enlarge

If a collection does not exist, MongoDB creates the collection when you first store data for that collection.

By default, documents in a collection do not share a schema. Fields and data types can vary across documents.

You can enforce schema validation rules during insert and update operations.

For MongoDB Atlas deployments, the Performance Advisor and the MongoDB Atlas UI detect common schema design issues and suggest modifications that follow MongoDB best practices. To learn more, see Schema Suggestions.

To add, remove, or retype fields in a collection's documents, update the existing documents.

Collections are assigned an immutable UUID that remains consistent across all replica set members and shards.

Earn a Skill Badge

Master "MongoDB Architecture Essentials" for free!

Learn more

Rate this page