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)
- How MongoDB models and queries documents
- Embedding vs Referencing in MongoDB
- Part 1: MongoDB Core Concepts, CRUD, Indexes, and Aggregation
- The MongoDB basics tutorial
- How MongoDB is different from a SQL database
- Part 2: Using MongoDB from Node.js and REST APIs
- How to use MongoDB with Node.js
- Build a REST API using Node.js, Express and MongoDB
- Part 3: Data Modeling, the ESR Index Rule, and Aggregation Pipelines
- Schema design patterns that scale in MongoDB
- Compound indexes and the ESR rule
- Aggregation pipeline stages you will use every week
- Part 4: Transactions, Connection Pooling, Backups, and Production
- Single-document atomicity vs multi-document transactions
- Backups with mongodump and mongorestore
- MongoDB vs PostgreSQL: choosing pragmatically
- Part 5: Query Operators, Update Operators, Read/Write Concerns, and Change Streams
- Replica Sets, High Availability, and Sharding
- BSON Data Types and Handling Driver Errors
- WiredTiger Storage Engine, Working Set, and Memory Sizing
- Full-Text Search and Vector Search
- Slow Query Profiling and Operational Hygiene
- 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.