Docs Menu
Docs Home
/
Database Manual

MongoDB CRUD Operations

CRUD operations create, read, update, and delete documents.

You can perform CRUD operations in the UI for deployments hosted in MongoDB Atlas.

CRUD operations share these constraints:

  • Target scope: Operations target a single collection.

  • Atomicity: All write operations are atomic on the level of a single document.

  • Filter syntax: Update and delete operations use the same filter syntax as read operations.

Create or insert operations add new documents to a collection. MongoDB creates the collection if it doesn't exist.

MongoDB provides the following methods to insert documents into a collection:

The components of a MongoDB insertOne operations.

For examples, see Create Documents.

Read operations retrieve documents from a collection.

MongoDB provides the following methods to read documents from a collection:

Use query filters to specify which documents to return.

The components of a MongoDB find operation.

For examples, see:

Update operations modify existing documents in a collection.

MongoDB provides the following methods to update documents of a collection:

Use filters to specify which documents to update.

The components of a MongoDB updateMany operation.

For examples, see Update Documents.

Delete operations remove documents from a collection.

MongoDB provides the following methods to delete documents of a collection:

Use filters to specify which documents to remove.

The components of a MongoDB deleteMany operation.

For examples, see Delete Documents.

MongoDB provides the ability to perform multiple write operations in bulk. See Bulk Write Operations.

Back

Weather

Earn a Skill Badge

Master "CRUD Operations" for free!

Learn more

On this page