Grokking MongoDB

Learn MongoDB step by step: documents, CRUD, query operators, aggregation, indexes, data modeling, transactions, replication, sharding, and Node.js.

Level:
Beginner
Study Time:
12h
Lessons:
78
Assessments:
86
Updated
Last week
4.4
(198 ratings)
1,669 learners
Arslan Ahmad
Created byArslan Ahmad
Ex FAANG Manager, Expert Behind Grokking MongoDB

Course Overview

MongoDB stores each record as a document, a nested structure of fields, instead of as a row in a table. This design makes some work simple and other work harder, and using MongoDB well means knowing which is which. This course teaches both the commands and the reasoning behind them, and it assumes no earlier database experience. You begin with documents, collections, and BSON, then learn to insert, read, update, and delete data, and to write queries with the comparison, logical, array, and string operators. The course then moves to the decisions that affect a running application: how to summarize data with aggregation pipelines, how to choose an index and read a query plan, how to model relationships between documents, when a transaction is necessary, and what happens to your data when a primary server fails or a collection is divided across shards. The last chapter connects a Node.js program to MongoDB. The commands and their output were run on a real MongoDB server, so the results you read are the results the server returned. A setup lesson shows how to get a free MongoDB server, and each chapter ends with an assessment that explains every answer.

Grokking MongoDB Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 60 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once
Grokking MongoDB Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 60 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once

What you'll learn in Grokking MongoDB

  • Explain what NoSQL means, how the four main types differ, and when MongoDB fits better or worse than a relational database.
  • Insert, read, update, and delete documents, including upserts and bulk changes.
  • Write precise queries and updates with comparison, logical, arithmetic, field update, array, and string operators.
  • Create single-field, compound, multikey, text, and wildcard indexes, and choose the right field order.
  • Model relationships by embedding or referencing, and enforce document rules with JSON Schema validation.
  • Understand replica sets, elections, read preferences, and write concerns, and what they mean for your data during a failure.
  • Set up your own MongoDB server, and check your understanding with an assessment at the end of every chapter.
  • Work with databases, collections, and documents, and understand JSON, BSON, data types, and ObjectId.
  • Query nested fields, arrays, and null or missing values without common mistakes.
  • Summarize and reshape data with aggregation pipelines, using stages like $match, $group, $lookup, and $out.
  • Read a query plan with explain() and tell whether an index is really helping a query.
  • Use multi-document transactions when they are needed, and understand what they cost.
  • Understand sharded clusters, choose a shard key, compare hashed and ranged sharding, and connect to MongoDB from Node.js.

Course Content

• 10 Chapters • 78 Lessons
1.

Course Overview

1 lesson

MongoDB Course Overview

Introduction to NoSQL

Types of NoSQL Databases

Introduction to MongoDB

MongoDB vs RDBMS

Chapter Assessment: Introduction

What people say about our courses

Arijeet avatar
Arijeet
Software Engineer
Just completed the “Grokking the system design interview”. It's amazing and super informative. Have come across very few courses that are as good as this!
Steven Zhang avatar
Steven Zhang
Software Engineer
Just wanted to say thanks for your Grokking the system design interview resource (https://lnkd.in/g4Wii9r7) - it helped me immensely when I was interviewing from Tableau (very little system design exp) and helped me land 18 FAANG+ jobs!
Roger Cruz avatar
Roger Cruz
Software Engineer
The world gets better inch by inch when you help someone else. If you haven't tried Grokking The Coding Interview, check it out, it's a great resource!
Ashley Pean avatar
Ashley Pean
Software Engineer
Check out Grokking the Coding Interview. Instead of trying out random Algos, they break down the patterns you need to solve them. Helps immensely with retention!
Simon Barker avatar
Simon Barker
Software Engineer
This is what I love about http://designgurus.io’s Grokking the coding interview course. They teach patterns rather than solutions.
Eric avatar
Eric
Software Engineer
I've completed my first pass of "grokking the System Design Interview" and I can say this was an excellent use of money and time. I've grown as a developer and now know the secrets of how to build these really giant internet systems.

About the Author

Arslan Ahmad

Arslan Ahmad

Design Gurus Founder
Ex-FAANG Manager
Meta
Microsoft
Google
Amazon
Uber

Industry Expertise & Leadership

Arslan Ahmad is the lead author of Grokking MongoDB. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.

He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.

The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.

500+

Interviews Conducted

10k+

Students Taught

Related Courses

Grokking SQL for Tech Interviews
Crack SQL Tech Interviews: Master core concepts and queries to solve complex problems and impress in your next interview.
4.2
14K learners
Discounted price for Your Region

$72

Grokking Database Fundamentals for Tech Interviews
Master database design, scaling, partitioning, and replicating to ace your tech interviews.
4
2.8K learners
Discounted price for Your Region

$72

New
Relational Database Design and Modeling for Software Engineers
Ace your technical interviews by mastering relational database design with real-world case studies.
4.4
2.8K learners
Discounted price for Your Region

$98

FAQs

It is a course on MongoDB, the document database. It starts with what NoSQL means and how documents work, then covers CRUD operations, query and update operators, aggregation, indexing, data modeling, transactions, replication, sharding, and using MongoDB from Node.js.

It is for people who are new to databases, for developers who know relational databases and have not used MongoDB, and for developers adding MongoDB to an application who want to understand how it behaves, not only which commands to type.

No. The course assumes no earlier database experience and explains each term where it first appears. If you already know SQL, the comparison between MongoDB and relational databases will help you connect what you know to the new concepts.

You do not need to program for most of the course, because the commands run in mongosh, the MongoDB command-line shell, and you can follow them without programming experience. The Node.js chapter assumes that you can read basic JavaScript.

You need a MongoDB server and the mongosh shell. The Setting Up MongoDB lesson shows two free ways to get them: a free cluster on MongoDB Atlas, or the Community Server installed on your own computer. The course does not include a built-in environment in the browser. Transactions need a replica set, even one with a single member, while a server running without replication is enough for most of the other examples.

Yes. Each of the nine chapters ends with an assessment of 20 multiple-choice questions, or 12 for the Node.js chapter, and each attempt draws half of them. Most questions describe a situation, like a query that returns less than expected, and every option comes with an explanation.

The commands and their output were run on MongoDB 8.0. The lessons teach the current methods, and they say so where behavior depends on the version or where an older method, like map-reduce, has been deprecated.

Yes. You create and drop indexes, compare the single-field, compound, multikey, text, and wildcard types, and read the output of explain() to see how many index entries and documents a query examined. The lessons show cases where a query uses an index and still reads the whole collection, and how to correct them.

Yes. It explains how a replica set copies data and elects a new primary after a failure, how read preferences and write concerns affect what you can see and what can be lost, how a sharded cluster routes queries, and how to choose a shard key.

It teaches the replica set and sharding concepts and commands that an administrator needs, along with index management. It does not teach backup procedures, user authentication, or encryption, so an administrator will need other material for those subjects.

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.