W3docs

MongoDB - The Complete Developer's Guide

Master MongoDB Development for Web & Mobile Apps. CRUD Operations, Indexes, Aggregation Framework - All about MongoDB!

Start course

MongoDB is one of the most important NoSQL databases you can work with these days. It's extremely popular and MongoDB developers are in high demand.

No matter if you're building web applications, mobile applications or any other kind of application or if you're a data scientist - you'll need to work with data. Storing data, querying it efficiently and minimizing complexities whilst optimizing performance are crucial tasks.

MongoDB makes working with data simple - it's built on a philosophy that prioritizes performance and efficiency.

In this course, you'll learn all about MongoDB from scratch. No prior MongoDB or database experience is required!

In detail, you'll learn:

  • ... how to install and use MongoDB locally and in the cloud (MongoDB Atlas)
  • ... how to perform CRUD (Create, Read, Update, Delete) operations on MongoDB databases
  • ... how to filter for data efficiently
  • ... how to work with both the Mongo Shell and drivers (e.g. Node.js driver)
  • ... how to increase performance by using indexes (and how to use the right indexes!)
  • ... how to use the amazing "Aggregation Framework" that's built into MongoDB
  • ... what replica sets and sharding are
  • ... how to use MongoDB Atlas - the cloud solution offered by MongoDB
  • ... how to use the serverless platform (Stitch) offered by MongoDB
  • ... and much more!

This course is a hands-on course - you'll learn by writing code/ commands. We'll work on a wide variety of example data and use-cases and by the end of the course, you'll have all the knowledge you need to work with MongoDB in your next project!

This course is for you, no matter which programming language you plan on using, you'll learn a uniform way of interacting with MongoDB that can be easily applied to any language.

This course is for you:

  • ... if you're brand-new to MongoDB and databases in general
  • ... if you got some basic database or even MongoDB experience - in this course, there are different entry points you can choose from!
  • ... if you are a web or mobile app (or desktop app) developer who considers using MongoDB
  • ... if you're working in a team that considers using MongoDB (or already does use it)
  • ... if you are primarily using SQL-based databases so far and you want to explore the most popular NoSQL alternative

This course is NOT for you:

  • ... if you're looking for a guide on administrating MongoDB servers => This course focuses on the commands/ queries you write, it's NOT an administration course. I will show (in detail) how to deploy a ready-to-use cloud MongoDB solution that follows best practices though.

Course content

Section 1Getting Started

  • Introduction
    2:04
  • What is MongoDB?
    5:36
  • The Key MongoDB Characteristics (and how they differ from SQL Databases)
    2:55
  • Join our Online Learning Community
    1:00
  • Understanding the MongoDB Ecosystem
    4:19
  • Installing MongoDB
    10:35
  • Time To Get Started!
    5:37
  • Shell vs Drivers
    3:29
  • MongoDB + Clients: The Big Picture
    2:58
  • Course Outline
    4:38
  • How To Get The Most Out Of The Course
    2:30

Section 2Understanding the Basics & CRUD Operations

  • Module IntroductionPremium
    1:30
  • Understanding Databases, Collections & DocumentsPremium
    3:47
  • The Shell & MongoDB Drivers for Different LanguagesPremium
    2:40
  • Creating Databases & CollectionsPremium
    3:16
  • Understanding JSON DataPremium
    4:05
  • Comparing JSON & BSONPremium
    5:23
  • Create, Read, Update, Delete (CRUD) & MongoDBPremium
    5:37
  • Finding, Inserting, Deleting & Updating ElementsPremium
    7:47
  • Understanding "insertMany()"Premium
    1:48
  • Diving Deeper Into Finding DataPremium
    3:55
  • "update" vs "updateMany()"Premium
    4:41
  • Understanding "find()" & the Cursor ObjectPremium
    7:30
  • Understanding ProjectionPremium
    3:38
  • Embedded Documents & Arrays - The TheoryPremium
    1:56
  • Working with Embedded DocumentsPremium
    2:28
  • Working with ArraysPremium
    1:43
  • Accessing Structured DataPremium
    4:39
  • Assignment - The Basics & CRUD Operations (Problem)Premium
    2:37
  • Assignment - The Basics & CRUD Operations (Solution)Premium
    6:57
  • Wrap UpPremium
    2:47
  • Useful Resources & LinksPremium
    1:00

Section 3Schemas & Relations: How to Structure Documents

  • Module IntroductionPremium
    2:12
  • Why Do We Use Schemas?Premium
    3:57
  • Structuring DocumentsPremium
    7:43
  • Data Types - An OverviewPremium
    6:23
  • Data Types in ActionPremium
    12:15
  • How to Derive your Data Structure - RequirementsPremium
    5:07
  • Understanding RelationsPremium
    2:58
  • One To One Relations - EmbeddedPremium
    6:20
  • One To One - Using ReferencesPremium
    4:54
  • One To Many - EmbeddedPremium
    5:07
  • One To Many - Using ReferencesPremium
    4:04
  • Many To Many - EmbeddedPremium
    7:16
  • Many To Many - Using ReferencesPremium
    5:25
  • Summarizing RelationsPremium
    2:18
  • Using "lookUp()" for Merging Reference RelationsPremium
    4:35
  • Planning the Example ExercisePremium
    6:56
  • Implementing the Example ExercisePremium
    4:16
  • Understanding Schema ValidationPremium
    2:57
  • Adding Collection Document ValidationPremium
    9:07
  • Changing the Validation ActionPremium
    3:43
  • Wrap UpPremium
    4:08
  • Useful Resources & LinksPremium
    1:00

Section 4Exploring The Shell & The Server

  • Module IntroductionPremium
    1:01
  • Finding Available OptionsPremium
    2:15
  • Setting "dbpath" & "logpath"Premium
    4:41
  • Exploring the MongoDB OptionsPremium
    2:00
  • MongoDB as a Background ServicePremium
    3:09
  • Using a Config FilePremium
    3:02
  • Shell Options & HelpPremium
    4:12
  • Useful Resources & LinksPremium
    1:00

Section 5Using the MongoDB Compass to Explore Data Visually

  • Module IntroductionPremium
    0:50
  • Exploring the MongoDB CompassPremium
    5:50
  • Useful Resources & LinksPremium
    1:00

Section 6Diving Into Create Operations

  • Module IntroductionPremium
    1:12
  • Creating Documents - An OverviewPremium
    1:47
  • Understanding "insert()" MethodsPremium
    6:10
  • Working with Ordered InsertsPremium
    7:47
  • Understanding the "writeConcern"Premium
    5:44
  • The "writeConcern" in PracticePremium
    4:09
  • What is Atomicity?Premium
    2:39
  • Assignment - Create Operations (Problem)Premium
    1:34
  • Assignment - Create Operations (Solution)Premium
    5:23
  • Importing DataPremium
    3:37
  • Wrap UpPremium
    2:38
  • Useful Resources & LinksPremium
    1:00

Section 7Read Operations - A Closer Look

  • Module IntroductionPremium
    1:40
  • Methods, Filters & OperatorsPremium
    2:54
  • Operators - An OverviewPremium
    3:02
  • Query Selectors & Projection OperatorsPremium
    1:16
  • Understanding "findOne()" & "find()"Premium
    4:32
  • Working with Comparison OperatorsPremium
    5:20
  • Querying Embedded Fields & ArraysPremium
    4:52
  • Understanding "$in" and "$nin"Premium
    2:37
  • "$or" and "$nor"Premium
    5:31
  • Understanding the "$and" OperatorPremium
    5:04
  • Using "$not"Premium
    1:35
  • Diving Into Element OperatorsPremium
    5:30
  • Working with "$type"Premium
    2:52
  • Understanding Evaluation Operators - "$regex"Premium
    3:23
  • Understanding Evaluation Operators - "$expr"Premium
    9:37
  • Assignment - Read Operations (Problem)Premium
    1:23
  • Assignment - Read Operations (Solution)Premium
    6:34
  • Diving Deeper Into Querying ArraysPremium
    4:09
  • Using Array Query Selectors - "$size"Premium
    2:09
  • Using Array Query Selectors - "$all"Premium
    2:12
  • Using Array Query Selectors - "$elemMatch"Premium
    4:52
  • Assignment - Array Query Selectors (Problem)Premium
    1:11
  • Assignment - Array Query Selectors (Solution)Premium
    4:08
  • Understanding CursorsPremium
    2:47
  • Applying CursorsPremium
    6:02
  • Sorting Cursor ResultsPremium
    3:09
  • Skipping & Limiting Cursor ResultsPremium
    3:31
  • Using Projection to Shape our ResultsPremium
    4:01
  • Using Projection in ArraysPremium
    5:12
  • Understanding "$slice"Premium
    3:05
  • Useful Resources & LinksPremium
    1:00

Section 8Update Operations

  • Module IntroductionPremium
    1:01
  • Updating Fields with "updateOne()", "updateMany()" and "$set"Premium
    7:52
  • Updating Multiple Fields with "$set"Premium
    1:40
  • Incrementing & Decrementing ValuesPremium
    3:33
  • Using "$min", "$max" and "$mul"Premium
    3:15
  • Getting Rid of FieldsPremium
    2:04
  • Renaming FieldsPremium
    1:20
  • Understanding "upsert()"Premium
    4:01
  • Assignment - Update Operations (Problem)Premium
    1:28
  • Assignment - Update Operations (Solution)Premium
    4:42
  • Updating Matched Array ElementsPremium
    6:56
  • Updating All Array ElementsPremium
    6:27
  • Finding & Updating Specific FieldsPremium
    5:35
  • Adding Elements to ArraysPremium
    4:46
  • Removing Elements from ArraysPremium
    2:34
  • Understanding "$addToSet"Premium
    1:18
  • Wrap UpPremium
    1:39
  • Useful Resources & LinksPremium
    1:00

Section 9Understanding Delete Operations

  • Module IntroductionPremium
    0:31
  • Understanding "deleteOne()" & "deleteMany()"Premium
    4:08
  • Deleting All Entries in a CollectionPremium
    2:00
  • Useful Resources & LinksPremium
    1:00

Section 10Working with Indexes

  • Module IntroductionPremium
    1:19
  • What Are Indexes & Why Do We Use Them?Premium
    4:18
  • Adding a Single Field IndexPremium
    8:06
  • Understanding Index RestrictionsPremium
    2:51
  • Creating Compound IndexesPremium
    7:14
  • Using Indexes for SortingPremium
    2:25
  • Understanding the Default IndexPremium
    0:59
  • Configuring IndexesPremium
    2:28
  • Understanding Partial FiltersPremium
    6:07
  • Applying the Partial IndexPremium
    3:37
  • Understanding the Time-To-Live (TTL) IndexPremium
    3:55
  • Query Diagnosis & Query PlanningPremium
    2:10
  • Understanding Covered QueriesPremium
    3:34
  • How MongoDB Rejects a PlanPremium
    7:37
  • Using Multi-Key IndexesPremium
    8:15
  • Understanding Text IndexesPremium
    6:09
  • Text Indexes & SortingPremium
    2:21
  • Creating Combined Text IndexesPremium
    2:54
  • Using Text Indexes to Exclude WordsPremium
    0:54
  • Setting the Default Language & Using WeightsPremium
    6:31
  • Building IndexesPremium
    7:40
  • Wrap UpPremium
    2:24
  • Useful Resources & LinksPremium
    1:00

Section 11Working with Geospatial Data

  • Module IntroductionPremium
    0:53
  • Adding GeoJSON DataPremium
    4:51
  • Running Geo QueriesPremium
    3:22
  • Adding a Geospatial Index to Track the DistancePremium
    2:52
  • Adding Additional LocationsPremium
    3:34
  • Finding Places Inside a Certain AreaPremium
    6:22
  • Finding Out If a User Is Inside a Specific AreaPremium
    5:27
  • Finding Places Within a Certain RadiusPremium
    5:38
  • Assignment - Geospatial Data (Problem)Premium
    2:28
  • Assignment - Geospatial Data (Solution)Premium
    13:39
  • Wrap UpPremium
    1:40
  • Useful Resources & LinksPremium
    1:00

Section 12Understanding the Aggregation Framework

  • Module IntroductionPremium
    1:34
  • What is the Aggregation Framework?Premium
    1:59
  • Getting Started with the Aggregation PipelinePremium
    1:21
  • Using the Aggregation FrameworkPremium
    3:12
  • Understanding the Group StagePremium
    5:56
  • Diving Deeper Into the Group StagePremium
    3:12
  • Assignment - Aggregation Framework (Problem)Premium
    1:03
  • Assignment - Aggregation Framework (Solution)Premium
    4:01
  • Working with $projectPremium
    9:58
  • Turning the Location Into a geoJSON ObjectPremium
    7:59
  • Transforming the BirthdatePremium
    3:48
  • Using Shortcuts for TransformationsPremium
    1:25
  • Understanding the $isoWeekYear OperatorPremium
    2:40
  • $group vs $projectPremium
    0:55
  • Pushing Elements Into Newly Created ArraysPremium
    4:03
  • Understanding the $unwind StagePremium
    2:50
  • Eliminating Duplicate ValuesPremium
    0:50
  • Using Projection with ArraysPremium
    3:03
  • Getting the Length of an ArrayPremium
    1:11
  • Using the $filter OperatorPremium
    4:43
  • Applying Multiple Operations to our ArrayPremium
    7:30
  • Understanding $bucketPremium
    6:16
  • Diving Into Additional StagesPremium
    7:29
  • Writing Pipeline Results Into a New CollectionPremium
    1:47
  • Working with the $geoNear StagePremium
    5:16
  • Wrap UpPremium
    2:41
  • Useful Resources & LinksPremium
    1:00

Section 13Working with Numeric Data

  • Module IntroductionPremium
    0:54
  • Number Types - An OverviewPremium
    6:28
  • Understanding Programming Language DefaultsPremium
    3:33
  • Working with int32Premium
    5:17
  • Working with int64Premium
    6:32
  • Doing Maths with Floats int32s & int64sPremium
    6:57
  • What's Wrong with Normal Doubles?Premium
    4:20
  • Working with Decimal 128bitPremium
    4:14
  • Wrap UpPremium
    1:40
  • Useful Resources & LinksPremium
    1:00

Section 14MongoDB & Security

  • Module IntroductionPremium
    4:23
  • Understanding Role Based Access ControlPremium
    6:47
  • Roles - ExamplesPremium
    2:13
  • Creating a UserPremium
    5:50
  • Built-In Roles - An OverviewPremium
    5:39
  • Assigning Roles to Users & DatabasesPremium
    4:48
  • Updating & Extending Roles to Other DatabasesPremium
    5:06
  • Assignment - Security (Problem)Premium
    1:31
  • Assignment - Security (Solution)Premium
    6:42
  • Adding SSL Transport EncryptionPremium
    10:20
  • Encryption at RESTPremium
    1:25
  • Wrap UpPremium
    3:21
  • Useful Resources & LinksPremium
    1:00

Section 15Performance, Fault Tolerancy & Deployment

  • Module IntroductionPremium
    1:52
  • What Influences Performance?Premium
    3:01
  • Understanding Capped CollectionsvPremium
    5:05
  • What are Replica Sets?Premium
    4:36
  • Understanding ShardingPremium
    6:13
  • Deploying a MongoDB ServerPremium
    2:25
  • Using MongoDB AtlasPremium
    9:17
  • Backups & Setting Alerts in MongoDB AtlasPremium
    1:27
  • Connecting to our ClusterPremium
    3:36
  • Wrap UpPremium
    1:58
  • Useful Resources & LinksPremium
    1:00

Section 16Transactions

  • Module IntroductionPremium
    1:04
  • What are Transactions?Premium
    2:03
  • A Typical UsecasePremium
    2:17
  • How Does a Transaction Work?Premium
    7:42
  • Useful Resources & LinksPremium
    1:00

Section 17From Shell to Driver

  • Module IntroductionPremium
    2:13
  • Splitting Work Between the Driver & the ShellPremium
    2:06
  • Preparing our ProjectPremium
    4:49
  • Installing Visual Studio CodePremium
    1:46
  • Installing the Node.js DriverPremium
    4:56
  • Connecting Node.js & the MongoDB ClusterPremium
    6:31
  • Storing Products in the DatabasePremium
    4:53
  • Storing the Price as 128bit DecimalPremium
    6:10
  • Fetching Data From the DatabasePremium
    6:23
  • Creating a More Realistic SetupPremium
    11:48
  • Getting a Single ProductPremium
    3:20
  • Editing & Deleting ProductsPremium
    7:28
  • Implementing PaginationPremium
    4:58
  • Adding an IndexPremium
    1:27
  • Signing Users UpPremium
    7:03
  • Adding an Index to Make the Email UniquePremium
    1:13
  • Adding User Sign InPremium
    5:18
  • Wrap UpPremium
    1:11
  • Useful Resources & LinksPremium
    1:00

Section 18Introducing Stitch

  • Module IntroductionPremium
    1:42
  • Stitch & MongoDB RealmPremium
    1:00
  • What is Stitch?Premium
    7:22
  • PreparationsPremium
    2:04
  • Start Using StitchPremium
    4:33
  • Adding Stitch to our App & Initializing ItPremium
    8:11
  • Adding AuthenticationPremium
    2:47
  • Sending Data Access RulesPremium
    3:57
  • Fetching & Converting DataPremium
    1:49
  • Deleting ProductsPremium
    3:02
  • Finding a Single ProductPremium
    4:09
  • Adding ProductsPremium
    3:29
  • Updating ProductsPremium
    3:46
  • Switching to User Email & Password AuthenticationPremium
    1:54
  • Adding User Sign Up & ConfirmationPremium
    6:32
  • Adding User LoginPremium
    3:42
  • Rules & Real UsersPremium
    1:48
  • The Current State of AuthenticationPremium
    1:00
  • Functions & TriggersPremium
    5:01
  • Wrap UpPremium
    0:56
  • Useful Resources & LinksPremium
    1:00

Section 19Roundup

  • Course RoundupPremium
    3:05

Course instructor

Photo of Maximilian Schwarzmüller

Maximilian Schwarzmüller

As a self-taught professional I really know the hard parts and the difficult topics when learning new or improving on already-known languages. This background and experience enable me to focus on the most relevant key concepts and topics. My track record of many 5-star rated courses, more than 1,000,000 students worldwide as well as a successful YouTube channel is the best proof for that.

The most rewarding experience for me is to see how people find new, better jobs, build awesome web applications, work on amazing projects or simply enjoy their hobby with the help of my content. That's why, together with Manuel Lorenz, I founded Academind to offer the best possible learning experience and to share the pleasure of learning with our students.