Skip to content

MongoDB Learning Labs Documentation

A structured, incremental learning path to master MongoDB โ€” from document model fundamentals to sharding and security.

๐Ÿš€ Getting Started

1. Start the MongoDB Cluster

cd docker && ./start.sh

OR

cd docker && docker compose up -d
Starts a 3-node replica set (mongo1, mongo2, mongo3) + Mongo Express UI at http://localhost:8081.

2. Run a Lab

docker exec -it mongo1 mongosh --file /labs/01_database_basics.js

OR, open the notebook in notebooks/ and run it with Jupyter or Pycharm.

### 3. Interactive Shell
```bash
docker exec -it mongo1 mongosh
# or from host (requires mongosh installed):
mongosh "mongodb://127.0.0.1:27017/mongo_labs?directConnection=true"

4. View These Docs Locally

pip install -r requirements.txt
mkdocs serve
# open http://localhost:8000

๐Ÿ“š Learning Path

Step Resource Description
1 NoSQL & MongoDB Document model, CAP theorem, when to use MongoDB
2 Core Concepts BSON, replica sets, ObjectId, collections
3 Data Modeling Embedding vs referencing, schema patterns
4 Indexes & Aggregation Index types, pipeline stages
5 Transactions & Consistency ACID, read/write concerns
6 TTL & Change Streams Data expiry, real-time events
7 Advanced Aggregation $lookup, $facet, $graphLookup
8 Advanced Topics Sharding, security, monitoring