Skip to content

MongoDB Mastery Path

Mastery Path
BOOTCAMP

MongoDB is easy to start with and easy to misuse. You can store a JSON-like document in minutes, and many teams do — then discover months later that a list embedded in one document is approaching the 16 MB limit, that a counter loses increments under load, that a "successful" restore restored nothing, or that writes the database acknowledged were quietly rolled back after a failover. None of those are bugs in MongoDB. They are the consequences of decisions somebody made without knowing they were making them.

This course teaches MongoDB by making those decisions visible. Every lesson runs against a real server and measures what actually happens: how a document is encoded, how a query is planned, what an index costs, what a transaction retries, which writes survive which failures. It assumes you can program in some language and have used a database before; it doesn't assume any MongoDB experience.

Level 1 covers the foundations: a throwaway local lab and what lives in its data directory, mongosh, BSON and the types JSON doesn't have (and why 0.1 + 0.2 matters for prices), queries and update operators, arrays and embedded documents, bulk writes, the Python and Node.js drivers, and the import/export and dump/restore tools — ending with a tested data layer for a recipe app. Level 2 is data modeling and indexes: embed or reference, relationship patterns and schema design patterns, $jsonSchema validation, how B-tree indexes and compound key order work, special index types, reading explain(), the query planner, and time series collections — ending with a modeled, indexed store catalog. Level 3 covers the aggregation pipeline and application features: grouping and reshaping, $lookup joins, window functions, pipeline performance and $merge rollups, multi-document transactions, change streams, geospatial queries and text search — ending with an order analytics backend kept exact by a change-stream worker. Level 4 is production: replica sets and failover, write and read concerns, sharding and shard keys, security and TLS, backups and point-in-time recovery, monitoring, tuning and online migrations — ending with a secured sharded cluster accepted by an automated test script.

Every lesson has a How It Actually Works section — why an $inc is recorded in the oplog as an absolute value, why a compound index's field order can mean 71,514 keys examined or 219, why a transaction under contention fails instantly instead of waiting, why w: 3 can be faster than w: "majority", why a range of one shard-key value can never be split, and how a former primary decides which of its writes to throw away.

Versions and what was actually run

Every command, query and script in this course was run on MongoDB 9.0.2 Community Server (the official macOS tarball), and every output shown is the output it produced — including the errors, which are some of the most useful parts. Supporting tools: mongosh 2.13.0, MongoDB Database Tools 100.19.1 (mongodump, mongorestore, mongostat…), PyMongo 4.18.3 on Python 3.14, and the Node.js driver 7.7.0. Timings come from a laptop and show proportions, not benchmarks; where a lesson compares numbers, both sides were measured the same way on the same machine.

Things that were not run — MongoDB Atlas and other managed services, Ops Manager, Enterprise-only features such as auditing, encryption at rest and LDAP, Atlas Search and Vector Search — are described where relevant, never shown with invented output.

How the program is organized

Level Focus Modules What you can do after
1 · MongoDB Foundations Server, mongosh, BSON, CRUD, arrays, updates, drivers, tools 10 Write correct application code against MongoDB
2 · Data Modeling & Indexes Embedding, patterns, validation, indexes, explain, the planner 10 Design schemas and indexes that stay fast as data grows
3 · Aggregation & Application Features Pipelines, joins, analytics, transactions, change streams, geo, text 10 Build reporting, real-time and transactional features
4 · Operations & Production Replication, concerns, sharding, security, backups, monitoring, tuning 10 Run MongoDB in production and recover when things go wrong

Each level has 9 teaching modules plus a hands-on project (module 10), for 40 lessons total.

How to use this site

  • Run your own server. Level 1 · 01 sets up a lab you can delete and rebuild in seconds. Later lessons start several servers on different ports; a laptop is ideal, a shared company database is not.
  • Reproduce the outputs. Your ObjectIds, timings and sizes will differ; the behaviour should not. When something differs in kind, find out why — that is usually where the learning is.
  • Break things on purpose. Kill a primary, run two writers at once, restore without the oplog. Most of what matters about databases only shows up under concurrency and failure.
  • Do the projects. Each one combines its level into something you could adapt for real work, and each was tested end to end, failures included.

More from the Mastery Path series

Free, structured, module-wise training across 84 other languages, platforms and disciplines:

Languages

Web Frameworks

Mobile

Testing & QA

Security

Cloud Platforms

Data & Analytics

Databases

AI / ML / LLM

Embedded Systems

Leadership & Management

Professional Skills

Careers & Interviews

Process & APIs

Infrastructure & Ops