Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

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 learn5 sections · 23 lessons
Start learning

Course curriculum

MongoDB 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. What Is MongoDB?12 min
  2. SQL vs NoSQL — and When MongoDB Fits12 min
  3. MongoDB Terminology12 min
  4. Embedded Objects and Arrays12 min
  5. BSON vs JSON14 min
Data 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. Strings, Booleans and Null12 min
  2. Numbers: Int32, Int64, Double and Decimal12812 min
  3. ObjectId, Date and Timestamp12 min
  4. Rare Types and the Sort Order15 min
Collections & 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. Inserting Documents12 min
  2. Finding Documents14 min
  3. Counting Documents12 min
  4. Updating Documents15 min
  5. Deleting Documents and bulkWrite15 min
Query Operators5 lessons

Compare values, test membership and presence, combine conditions with and, or, nor and not, query arrays precisely, and shape results with projections.

  1. Comparison Operators: $eq, $ne, $gt, $gte, $lt, $lte12 min
  2. $in, $nin and $exists12 min
  3. Logical Operators: $and, $or, $nor, $not12 min
  4. Array Operators: $all, $size, $elemMatch15 min
  5. Projection: Including, Excluding and $slice15 min
Creating 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. Single Field Indexes12 min
  2. Compound Indexes and the ESR Rule15 min
  3. Text Indexes12 min
  4. Expiring (TTL) and Geospatial Indexes15 min