Skip to content

About

Hands-on MongoDB learning lab focused on indexing, query performance, explain plans, and real-world optimization using Node.js and large datasets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MongoDB Learning Lab: A-Z Guide

Welcome to the MongoDB Learning Lab. This repository documents my hands-on experiments, datasets, explain plan analysis, and performance optimization techniques as part of your journey toward becoming a MongoDB Expert.

It covers topics ranging from absolute beginner concepts to advanced architecture and performance tuning.

🚀 Quick Start

New here? Run the auto-setup script to start the DB and seed data instantly!

./init-lab.ps1

Credentials:

  • GUI: http://localhost:8081 (User: admin, Pass: pass)
  • DB: admin / password
  • URI: mongodb://admin:password@localhost:27018

See SETUP.md for full details.


📚 Curriculum Overview

This lab is structured into three main modules to guide your learning path:

🟢 Module 1: The Foundation (Beginner)

Build a strong understanding of NoSQL and MongoDB basics.

🧪 Practical Lab

🟡 Module 2: Building Efficient Applications (Intermediate)

Learn to query faster and model data correctly.

  • Indexing Basics: Single Field, Compound, and Multikey Indexes.
  • Aggregation Framework: Pipelines, $match, $group, $project, $lookup.
  • Data Modeling: Embedding vs. Referencing, Schema Design Patterns.
  • Transactions: Multi-document ACID transactions.
  • Views: Read-only views, Data Masking, and Pre-computed joins. Only creation is supported.

🧪 Practical Lab

🔴 Module 3: Performance & Scale (Advanced)

Optimize for speed and scale in production.

  • Advanced Indexing: Partial, Sparse, and Text Indexes.
  • Query Optimization: Covered Queries, COLLSCAN vs IXSCAN.
  • Replication: Replica Sets, High Availability, and Failover.
  • Sharding: Horizontal scaling strategies.
  • Security: Authentication, Authorization, and Encryption.

🛠 Prerequisites

Before diving in, ensure you have the following ready:

  • MongoDB: Version 8.0+ (Local or Atlas)
  • Node.js: Version 18+ (for running JS scripts)
  • Python: Version 3.10+ (optional, for Python labs)
  • .NET SDK: Version 8.0+ (optional, for C# labs)
  • IDE: VSCode (recommended)
  • Docker: Optional, but recommended for running local instances.

🗂 Datasets & Tools

Dataset Seeder

We use a custom script to generate 1M+ realistic documents for testing performance.

Generate Data:

node datasets/seedOrders.js

🧪 Detail Experiment Logs

We detail specific findings in separate documents:

Indexing Experiments

  • [TODO] Single Field vs Compound Index
  • [TODO] Explain Plan Analysis

Performance Investigations

  • [TODO] COLLSCAN vs IXSCAN
  • [TODO] Covered Queries

👤 Author

Lasantha Lakmal Backend Engineer • Node.js • MongoDB • C# • Microservices


This repository is a live document of my personal learning journey and experiments.

About

Hands-on MongoDB learning lab focused on indexing, query performance, explain plans, and real-world optimization using Node.js and large datasets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages