Store and query documents while choosing suitable indexes and data models.
Before starting: JSON documents, keys, arrays, and basic query concepts.
Practice project: Build a study-log collection with validation and suitable indexes.
Module 1: NoSQL Foundations & MongoDB Architecture
- Introduction to NoSQL & MongoDB Document Database Architecture
- BSON Data Types, ObjectId Internal Structure & JSON Mapping
- Installation, Mongosh Shell & Compass GUI Orchestration
- Creating Databases, Collections & Document Namespaces (`use`, `createCollection`)
- Capped Collections & TTL (Time-To-Live) Automated Expiration
Module 2: CRUD Operations - Insert & Read Mastery
- Inserting Single & Bulk Documents (`insertOne`, `insertMany`)
- Querying Documents with Equality & Comparison Operators (`$eq`, `$gt`, `$in`, `$nin`)
- Logical Query Operators (`$and`, `$or`, `$not`, `$nor`) & Implicit Conjunctions
- Element & Type Evaluation Operators (`$exists`, `$type`)
- Projection, Cursor Paging, Sorting & Limiting (`find`, `sort`, `skip`, `limit`)
Module 3: CRUD Operations - Update & Delete Mastery
- Updating Documents with Atomic Modifiers ($set, $unset, $inc, $mul)
- Advanced Field Updates ($min, $max, $currentDate, $rename)
- Upsert & Conditional Modifications (updateOne with upsert: true)
- Deleting Documents & Drop Operations (deleteOne, deleteMany, drop)
- Bulk Write Pipelines (bulkWrite ordered vs unordered)
Module 4: Arrays & Embedded Documents
- Querying Embedded Sub-documents & Dot Notation
- Querying Array Elements ($all, $elemMatch, $size)
- Array Updates: Adding Elements ($push, $each, $slice, $sort, $addToSet)
- Array Updates: Removing Elements ($pop, $pull, $pullAll)
- Positional Array Modifiers ($, $[], $[<identifier>] filtered positional operator)
Module 5: Aggregation Pipeline Foundations
- Aggregation Pipeline Architecture & Flow
- Filtering & Reshaping ($match, $project)
- Grouping & Accumulators ($group, $sum, $avg, $min, $max)
- Deconstructing Arrays with $unwind
- Sorting, Pagination & Sampling ($sort, $skip, $limit, $sample)
Module 6: Advanced Aggregation & Joins
- Relational Joins with $lookup (Uncorrelated & Correlated Subqueries)
- Aggregation Output Pipelines ($out, $merge)
- Conditional Expressions ($cond, $switch, $ifNull)
- String, Date & Mathematical Aggregation Operators
- Modern Window Functions ($setWindowFields)
Module 7: Indexing Strategies & ESR Rule
- Index Architecture & Single-Field Indexes (createIndex, dropIndex)
- Compound Indexes & the ESR (Equality, Sort, Range) Rule
- Multikey Indexes & Partial/Sparse Indexes
- Text Search Indexes & Language Analyzers ($text, $search, weights)
- Geospatial Indexes (2dsphere, 2d, $near, $geoWithin)
Module 8: Performance Tuning & Schema Validation
- Execution Plans with explain('executionStats') (IXSCAN vs COLLSCAN)
- Covered Queries & Scanning Ratios (totalDocsExamined vs nReturned)
- Database Profiler & Slow Query Log Analysis
- Schema Validation with $jsonSchema (Enforcing Data Quality)
- Connection Pooling, Cursor Leaks & Driver Tuning
Module 9: High Availability & Sharding
- Replica Set Architecture & Heartbeats (Primary, Secondary, Arbiter)
- Automatic Failover, Elections & Quorum Mechanics
- Read Preferences & Write Concerns (w: majority, j: true, readConcern)
- Horizontal Sharding Architecture (mongos, Config Servers, Shard Keys)
- Resharding & Chunk Balancing Mechanics
Module 10: Security, Transactions & Atlas Cloud
- Multi-Document ACID Transactions (Client Sessions, commit, abort)
- Authentication & Role-Based Access Control (SCRAM, X.509, RBAC)
- Security, Encryption & Auditing (TLS, At-Rest, CSFLE)
- Node.js & Mongoose ODM Deep Dive (Schemas, Models, Middleware)
- MongoDB Atlas Cloud & Production Deployment Checklist
Test database constraints before adding application code
Test both accepted and rejected writes. In a relational database, a primary key prevents duplicate identifiers and a NOT NULL constraint prevents missing required values. Application validation improves feedback but does not replace database constraints. MongoDB uses different mechanisms, including unique indexes and collection validators; do not copy SQL statements into its shell.
SQLite 3 example; concept also applies to other databases using their own syntax
CREATE TABLE lessons (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL
);
INSERT INTO lessons (id, title) VALUES (1, 'Loops');
SELECT id, title FROM lessons;Check the output
id | title
1 | LoopsWrite a checklist for valid insert, duplicate key, missing required field, and update. Translate the checks into your database dialect.
Open the MongoDB learning path on DevStudyHub · Play coding games on this blog
No comments:
Post a Comment
Please do not enter any spam link in the comment box.