Skip to content

MongoDB Handbook

MongoDB makes it easy to start saving JSON documents in five minutes, which is also why so many projects end up with bloated documents, missing indexes, and painful migrations a year later.

This handbook teaches you how to model documents properly, design indexes that keep queries fast, run real aggregation pipelines from Node.js, and handle backups and schema changes safely.

Table of contents (23 chapters)
  1. How MongoDB models and queries documents
  2. Embedding vs Referencing in MongoDB
  3. Part 1: MongoDB Core Concepts, CRUD, Indexes, and Aggregation
  4. The MongoDB basics tutorial
  5. How MongoDB is different from a SQL database
  6. Part 2: Using MongoDB from Node.js and REST APIs
  7. How to use MongoDB with Node.js
  8. Build a REST API using Node.js, Express and MongoDB
  9. Part 3: Data Modeling, the ESR Index Rule, and Aggregation Pipelines
  10. Schema design patterns that scale in MongoDB
  11. Compound indexes and the ESR rule
  12. Aggregation pipeline stages you will use every week
  13. Part 4: Transactions, Connection Pooling, Backups, and Production
  14. Single-document atomicity vs multi-document transactions
  15. Backups with mongodump and mongorestore
  16. MongoDB vs PostgreSQL: choosing pragmatically
  17. Part 5: Query Operators, Update Operators, Read/Write Concerns, and Change Streams
  18. Replica Sets, High Availability, and Sharding
  19. BSON Data Types and Handling Driver Errors
  20. WiredTiger Storage Engine, Working Set, and Memory Sizing
  21. Full-Text Search and Vector Search
  22. Slow Query Profiling and Operational Hygiene
  23. Zero-Downtime Schema Migrations and Backfills

Get the MongoDB Handbook for free: subscribe to my newsletter and I'll send it your way, together with all my other free programming ebooks.

Want the whole collection? See all my free ebooks.

By subscribing you agree to receive my newsletter (new tutorials, book releases, and courses). You can unsubscribe anytime from the link at the bottom of every email. Your email is the only data collected, stored securely in the EU, and never shared.