Skip to content
Pebellslearn by building

The course

Mongodb

Learn how a document database thinks and how to work with it from mongosh. You will choose the right BSON types, create, read, update and delete documents, write precise queries, and add the indexes that keep them fast, all on one small bookshop collection.

Ready to learn

Your path through the ideas

Inside the course

6 modules · 23 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02MongoDB Basics5 lessons

Meet MongoDB and Atlas, compare documents with tables, learn the core vocabulary, nest objects and arrays, and see why documents are stored as BSON.

  1. 01What Is MongoDB?12 min
  2. 02SQL vs NoSQL — and When MongoDB Fits12 min
  3. 03MongoDB Terminology12 min
  4. 04Embedded Objects and Arrays12 min
  5. 05BSON vs JSON14 min
03Data Model & Data Types4 lessons

Learn how strings, booleans and null behave in queries, choose between Int32, Int64, Double and Decimal128, store ids and times correctly, and understand how mixed types sort.

  1. 01Strings, Booleans and Null12 min
  2. 02Numbers: Int32, Int64, Double and Decimal12812 min
  3. 03ObjectId, Date and Timestamp12 min
  4. 04Rare Types and the Sort Order15 min
04Collections & Methods5 lessons

Insert single documents and batches, read with filters and cursors, count exactly or fast, change fields with update operators, and delete or batch writes safely.

  1. 01Inserting Documents12 min
  2. 02Finding Documents14 min
  3. 03Counting Documents12 min
  4. 04Updating Documents15 min
  5. 05Deleting Documents and bulkWrite15 min
05Query Operators5 lessons
06Creating Indexes4 lessons

Create single-field and compound indexes, read explain output, order fields with the ESR rule, search words with text indexes, expire documents with TTL, and find nearby places with 2dsphere.

  1. 01Single Field Indexes12 min
  2. 02Compound Indexes and the ESR Rule15 min
  3. 03Text Indexes12 min
  4. 04Expiring (TTL) and Geospatial Indexes15 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.