MongoDB tutorials

MongoDB Tutorials: Learn MongoDB Step by Step

Every MongoDB tutorial on DatabaseFAQs.com, grouped by topic. Install MongoDB, create a database and collections, then learn find queries, updates and the aggregation pipeline.

Our newer examples are run in mongosh against a local MongoDB server.

  • 63free MongoDB tutorials
  • 8topics
  • Oct 2026last updated

New to MongoDB? Start here

Read these in order. Each one builds on the one before it.

  1. How to install MongoDBInstall MongoDB Community Server.
  2. How To Install MongoDB CompassInstall Compass, the MongoDB GUI.
  3. How to Create a Database in MongoDBCreate a database and your first collection.
  4. MongoDB Update Documents – Complete tutorialInsert and update documents.
  5. MongoDB find multiple conditionsQuery documents with filters.
  6. MongoDB Aggregate Count: countDocuments(), $count and Group By CountsSummarize data with aggregation.

The basics5

What it is, what it's good for, and the questions people ask before they commit to it.

Install, connect and tools4

Install it, connect to it, and get your tools working.

SELECT queries, filtering and grouping10

Read data with SELECT, filter it, sort it and summarize it.

Collections and documents (CRUD)18

Create, read, update and delete documents and collections.

Aggregation, grouping and sorting8

Group, count, sort and join data with the aggregation pipeline.

Backup, import/export and administration8

Back up, restore, import, export, migrate and monitor.

Errors and fixes9

The exact error message, what causes it and the steps that fix it.

Comparisons1

Side-by-side comparisons to help you choose.

Other database tutorials

Looking for everything, newest first? See the full tutorial list.

Frequently Asked Questions

Is MongoDB free?

MongoDB Community Server is free to download and use. MongoDB also offers a paid Enterprise edition and the Atlas cloud service, which has a free starter tier.

Is MongoDB a relational database?

No. MongoDB is a document database that stores JSON-like documents in collections instead of rows in tables. It can still join collections with the $lookup aggregation stage.

Where should a beginner start?

Install MongoDB and Compass, create a database, then learn inserts, updates, find queries and aggregation, in the order shown at the top of this page.