This repo contains a full MongoDB course in .txt
files, focused on hands-on practice using the MongoDB Shell (mongosh
). Itβs designed for developers who prefer reading and experimenting directly in the terminal. Topics range from simple CRUD operations to advanced aggregation pipelines, indexing, schema validation, conditional logic, and database maintenance.
Each file contains real-world examples that can be copy-pasted directly into mongosh
. Ideal for backend developers and DBAs who want to deepen their MongoDB skills or refresh advanced concepts quickly.
This collection emphasizes terminal-first usage of MongoDB with practical, real-world scenarios. Some of the advanced topics and techniques covered:
- Schema validation using JSON Schema
- Aggregation pipelines
- Advanced query operators
- Data transformation stages
- Cross-collection joins with
$lookup
- Array operators like
$all
,$elemMatch
, and$size
- Type checking with
$type
- Capped collections
- Conditional logic using
$cond
,$ifNull
- Indexing strategies
- Importing JSON with
mongoimport
- Backing up and restoring data
mongosh
- BSON types
- JSON Schema for validation logic
- mongoimport for importing data
- MongoDBβs built-in backup and restore tools (
mongodump
,mongorestore
)
/
βββ 1_basic.txt
βββ 2_insertData.txt
βββ 3_datatypes.txt
βββ 4_schemaValidation.txt
βββ 5_update&Replace.txt
βββ 6_deleteDocument.txt
βββ 7_findDocuments.txt
βββ 8_comparisonOperators.txt
βββ 9_logicalOperaters.txt
βββ 10_elementOperator.txt
βββ 11_EvaluationQueryOpearator.txt
βββ 12_findOneUpdate,replace&delete.txt
βββ 13_aggregationPipeline.txt
βββ 14_aggregationPart2.txt
βββ 15_aggregationPart3.txt
βββ 16_aggregationPart4.txt
βββ 17_aggregationPart5.txt
βββ 18_aggregationPart6.txt
βββ 19_aggregationPart7.txt
βββ 20_arithmaticOperaotr.txt
βββ 21_stringOperators.txt
βββ 22_dateOperators.txt
βββ 23_arrayOperators.txt
βββ 24_typeOperators.txt
βββ 25_cappedCollection.txt
βββ 26_conditional.txt
βββ 27_indexes.txt
βββ 28_importJSON.txt
βββ 29_backup.txt
βββ 30_authentication&UserManagment.txt
Each file is a standalone guide with practice-ready shell code and inline explanations. No directories or nested folder structures are used.