Intermediate · 5h 17m · 18 lessons
MongoDB
Store flexible documents — CRUD, schema design, indexes, and aggregation.
What you'll learn
- ✦Explain the document model (BSON documents, collections, _id) and how it differs from tables
- ✦Write insert, find, update and delete commands with query and update operators
- ✦Decide when to embed and when to reference, and design a schema around the app's reads
- ✦Create single-field and compound indexes that speed up real queries, and weigh their cost
- ✦Build aggregation pipelines that filter, group, join and reshape data
- ✦Explain how replica sets, sharding and transactions keep data available, scalable and consistent
Part of these career paths
- Backend Developer path · course 12 of 14
- Full-Stack Developer path · course 11 of 14
Certification projects
Build 4 projects to earn your certificate
Hands-on work that proves you can apply what you learned — part of the certificate requirements.
Syllabus
Module 1 · 54m
Meet MongoDB Free
What you'll be able to do
- Can read a MongoDB document and name its fields, BSON types, nested parts and collection
- Can explain what _id and ObjectId do, and choose a sensible _id
- Can decide whether a dataset suits documents or tables, and say why
Module 2 · 1h 1m
Working with documents Locked
What you'll be able to do
- Can insert documents and find them with filters, dot notation and projections
- Can write filters with comparison, logical and array operators
- Can update fields with $set, $inc and array operators, and delete without losing data
Module 3 · 50m
Modeling data Locked
What you'll be able to do
- Can decide whether to embed or reference related data, and defend the choice
- Can pick a one-to-many pattern from how many children there are and how they're read
- Can design documents from the app's access patterns and add schema validation
Module 4 · 50m
Indexes & performance Locked
What you'll be able to do
- Can create a single-field index and prove it works with explain()
- Can order a compound index's fields with the ESR rule and say which queries it serves
- Can weigh an index's faster reads against its write and memory cost, and remove one nobody uses
Module 5 · 50m
Aggregation Locked
What you'll be able to do
- Can build a pipeline with $match, $group, $sort and $limit and predict what each stage outputs
- Can join a second collection with $lookup, with localField and foreignField the right way round
- Can order stages so filters run first and a $match can use an index
Module 6 · 52m
Scale & production Locked
What you'll be able to do
- Can explain how a replica set fails over and work out how many members it can lose
- Can judge a shard key and write a short multi-document transaction
- Can pick a next step: connect with a driver, add a $jsonSchema validator, and choose a project