MongoDB in Practice: Documents, Indexes, Aggregation and Production
Learn MongoDB by building a shop on it. Model data as documents, query and update it, make queries fast with indexes, report with the aggregation pipeline, then run it safely with transactions, replica sets, change streams and backups. Every example runs against a real MongoDB 8 in Docker and shows the output it actually produced.
Who it is for
Developers who know a little Python and some SQL or any database, and want to use MongoDB correctly in real applications, not just insert and find.
Before you start
- Basic Python (functions, dictionaries, running a script)
- A laptop that can run Docker (the setup page walks you through it)
- A rough idea of what a database table is
What you will be able to do
- Model data as documents and choose between embedding and referencing
- Query, update and delete with the full set of operators, atomically and without lost updates
- Design compound indexes (Equality, Sort, Range) and prove they work with explain()
- Build reports with the aggregation pipeline, including $lookup, $facet and $merge
- Use transactions, replica sets, write concerns and change streams safely
- Understand sharding, security and backups, and combine it all in a capstone shop