# MongoDB in Depth

Learn MongoDB from your first document to the data layer of a real app: documents and when they fit, queries and updates in mongosh and Compass, modeling,…

Updated: November 19, 2026

## [Module 1: Documents](https://www.ask-codey.com/courses/mongodb-in-depth/modules/1)

Set up MongoDB, mongosh and Compass, store your first documents, and learn what a document is: fields and values, arrays, documents inside documents and the types they hold, where documents fit, and when a table fits better. Then store and query a recipe collection of your own.

- [Getting Started with MongoDB](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/getting-started-with-mongodb) (5 topics, 10 lessons)
- [Documents and Why They Fit](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/documents-in-mongodb) (4 topics, 8 lessons)

## [Module 2: Queries](https://www.ask-codey.com/courses/mongodb-in-depth/modules/2)

Ask the database questions: add many documents at once, find them with comparison and logical operators, reach into arrays and nested documents, choose the fields, sort and page the results, then change and delete documents safely. Then build a recipe search with filters.

- [Finding Documents](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/finding-documents-in-mongodb) (3 topics, 6 lessons)
- [Arrays, Nested Fields and Results](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/arrays-nested-fields-and-results-in-mongodb) (3 topics, 6 lessons)
- [Updating and Deleting](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/updating-and-deleting-in-mongodb) (4 topics, 6 lessons)

## [Module 3: Modeling](https://www.ask-codey.com/courses/mongodb-in-depth/modules/3)

Design the documents for a bike shop's online store: start from the questions the app asks, choose between embedding and referencing, use the common patterns, add schema validation, keep a checkout safe, and see honestly when a relational database is the better choice. Then model a store and explain each choice.

- [Embedding and Referencing](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/embedding-and-referencing-in-mongodb) (3 topics, 5 lessons)
- [Patterns and Validation](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/patterns-and-validation-in-mongodb) (3 topics, 5 lessons)
- [Transactions and the Relational Choice](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/transactions-and-the-relational-choice) (5 topics, 6 lessons)

## [Module 4: Aggregation and Indexes](https://www.ask-codey.com/courses/mongodb-in-depth/modules/4)

Turn a year of a bike shop's orders into reports with the aggregation pipeline: match, group, project, sort, unwind, look up related documents and group by month. Then make queries fast with indexes and prove it with explain(). Finish with a sales report made fast by the right index.

- [The Aggregation Pipeline](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/the-aggregation-pipeline-in-mongodb) (2 topics, 4 lessons)
- [Unwind, Lookup and Dates](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/unwind-lookup-and-dates-in-mongodb) (3 topics, 4 lessons)
- [Indexes](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/indexes-in-mongodb) (4 topics, 6 lessons)

## [Module 5: MongoDB in an App](https://www.ask-codey.com/courses/mongodb-in-depth/modules/5)

Put MongoDB behind an app: learn the little JavaScript a ready-made Express API uses, connect with the official Node.js driver, write a data layer with its errors and tests, then see the same work in Mongoose and C#, and what Azure Cosmos DB's MongoDB API changes. Finish with the data layer for a pet adoption site.

- [The Starter API](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/the-starter-api-for-mongodb) (3 topics, 4 lessons)
- [The Official Node.js Driver](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/the-nodejs-driver-for-mongodb) (3 topics, 6 lessons)
- [Mongoose, C# and Cosmos DB](https://www.ask-codey.com/courses/mongodb-in-depth/chapters/mongoose-csharp-and-cosmos-db) (3 topics, 5 lessons)

Source: https://www.ask-codey.com/courses/mongodb-in-depth
