Mongodb The Complete Developers Guide

Tags: MongoDB

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

Last updated 2022-01-10 | 4.7

- Use MongoDB to its full potential in future projects
- Write efficient and well-performing queries to fetch data in the format you need it
- Use all features MongoDB offers you to work with data efficiently

What you'll learn

Use MongoDB to its full potential in future projects
Write efficient and well-performing queries to fetch data in the format you need it
Use all features MongoDB offers you to work with data efficiently

* Requirements

* NO prior knowledge on databases (of any kind) is required
* General web development or mobile development knowledge will help you but is not a must-have
* You can use any operating system - Windows
* macOS
* Linux
* it'll all work!

Description

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.

Who this course is for:

  • Developers or data scientists who plan on (or are already) working with MongoDB
  • Everyone who's interested in NoSQL databases
  • Both beginner and advanced MongoDB users who want to explore all the core features

Course content

19 sections • 274 lectures

Introduction Preview 02:07

Welcome to the course! Let me introduce myself and give you a rough overview of the course!

What is MongoDB? Preview 05:36

Let's dive into the most important question: What is MongoDB? What is it all about? MongoDB is a NoSQL database and in this lecture, we'll explore why it's awesome!

Join our Online Learning Community Preview 00:23

Learning alone is absolutely fine but finding learning partners might be a nice thing, too. Our learning community is a great place to learn and grow together - of course it's 100% free and optional!

The Key MongoDB Characteristics (and how they differ from SQL Databases) Preview 02:55

MongoDB has a couple of key characteristics that set it apart from other databases - let's explore which characteristics these are.

Understanding the MongoDB Ecosystem Preview 04:19

MongoDB is more than just a database engine - it's a company and a rich ecosystem of tools. In this lecture, you'll get a thorough overview of all the different pieces that make up MongoDB.

General Setup Instructions & Installing MongoDB on macOS Preview 16:52

Installing MongoDB on Windows Preview 08:10

Installing the MongoDB Shell Preview 05:10

Installing mongoimport Preview 00:21

Time To Get Started! Preview 05:37

With the MongoDB tools installed, it's time to get started. Let's spin up a MongoDB server (on our local machine) and connect to it!

Shell vs Drivers Preview 03:29

When it comes to connecting to a MongoDB database, you got various options, most importantly: The local shell or drivers for different programming languages. Let me explain the differences.

MongoDB + Clients: The Big Picture Preview 02:58

We learned about a lot of different pieces that work together - here's a big picture that puts everything into context.

Course Outline Preview 04:38

We know what MongoDB is - but what's in this course? In this lecture, you'll get an overview of the course content and the order in which it is presented.

How To Get The Most Out Of The Course Preview 02:30

It's important to me that you succeed, hence in this lecture, I'll share some best practices regarding how to use the various course resources.

Module Introduction Preview 01:30

Understanding Databases, Collections & Documents Preview 03:47

The Shell & MongoDB Drivers for Different Languages Preview 02:40

Creating Databases & Collections Preview 03:16

Understanding JSON Data Preview 04:05

Comparing JSON & BSON Preview 05:23

Create, Read, Update, Delete (CRUD) & MongoDB Preview 05:37

Finding, Inserting, Deleting & Updating Elements Preview 07:47

Understanding "insertMany()" Preview 01:48

Diving Deeper Into Finding Data Preview 03:55

"update" vs "updateMany()" Preview 04:41

Understanding "find()" & the Cursor Object Preview 07:30

Understanding Projection Preview 03:38

Embedded Documents & Arrays - The Theory Preview 01:56

Working with Embedded Documents Preview 02:28

Working with Arrays Preview 01:43

Accessing Structured Data Preview 04:39

Time to Practice - The Basics & CRUD Operations

We already did our first steps in MongoDB - time to practice what we learned so far in this assignment!

Wrap Up Preview 02:47

Useful Resources & Links Preview 00:04

Resetting Your Database Preview 00:13

Module Introduction Preview 02:12

Why Do We Use Schemas? Preview 03:57

Structuring Documents Preview 07:43

Data Types - An Overview Preview 06:23

Data Types in Action Preview 12:15

Data Types & Limits Preview 01:08

How to Derive your Data Structure - Requirements Preview 05:07

Understanding Relations Preview 02:58

One To One Relations - Embedded Preview 06:20

One To One - Using References Preview 04:54

One To Many - Embedded Preview 05:07

One To Many - Using References Preview 04:04

Many To Many - Embedded Preview 07:16

Many To Many - Using References Preview 05:25

Summarizing Relations Preview 02:18

Using "lookUp()" for Merging Reference Relations Preview 04:35

Planning the Example Exercise Preview 06:56

Implementing the Example Exercise Preview 04:16

Understanding Schema Validation Preview 02:57

Adding Collection Document Validation Preview 09:07

Changing the Validation Action Preview 03:43

Wrap Up Preview 04:08

Useful Resources & Links Preview 00:03

Module Introduction Preview 01:01

Finding Available Options Preview 02:15

Setting "dbpath" & "logpath" Preview 04:41

Exploring the MongoDB Options Preview 02:00

MongoDB as a Background Service Preview 03:09

Using a Config File Preview 03:02

Shell Options & Help Preview 04:12

Useful Resources & Links Preview 00:05

Module Introduction Preview 00:50

Exploring the MongoDB Compass Preview 05:50

Useful Resources & Links Preview 00:03

Module Introduction Preview 01:12

Creating Documents - An Overview Preview 01:47

Understanding "insert()" Methods Preview 06:10

Working with Ordered Inserts Preview 07:47

Understanding the "writeConcern" Preview 05:44

The "writeConcern" in Practice Preview 04:09

What is Atomicity? Preview 02:39

Time to Practice - Create Operations

We learned a lot about the different methods to create documents, time to practice this new knowledge!

Importing Data Preview 03:37

Wrap Up Preview 02:38

Useful Resources & Links Preview 00:02

Module Introduction Preview 01:40

Methods, Filters & Operators Preview 02:54

Operators - An Overview Preview 03:02

Query Selectors & Projection Operators Preview 01:16

Understanding "findOne()" & "find()" Preview 04:32

Working with Comparison Operators Preview 05:20

Querying Embedded Fields & Arrays Preview 04:52

Understanding "$in" and "$nin" Preview 02:37

"$or" and "$nor" Preview 05:31

Understanding the "$and" Operator Preview 05:04

Using "$not" Preview 01:35

Diving Into Element Operators Preview 05:30

Working with "$type" Preview 02:52

Understanding Evaluation Operators - "$regex" Preview 03:23

Understanding Evaluation Operators - "$expr" Preview 09:37

Time to Practice - Read Operations

We learned a lot about the different ways to access information in our documents, so let's practice what we learned thus far!

Diving Deeper Into Querying Arrays Preview 04:09

Using Array Query Selectors - "$size" Preview 02:09

Using Array Query Selectors - "$all" Preview 02:12

Using Array Query Selectors - "$elemMatch" Preview 04:52

Time to Practice - Array Query Selectors

We work a lot with arrays in MongoDB - now let's practice how we can access documents stored in arrays!

Understanding Cursors Preview 02:47

Applying Cursors Preview 06:02

Sorting Cursor Results Preview 03:09

Skipping & Limiting Cursor Results Preview 03:31

Using Projection to Shape our Results Preview 04:01

Using Projection in Arrays Preview 05:12

Understanding "$slice" Preview 03:05

Useful Resources & Links Preview 00:03

Module Introduction Preview 01:01

Updating Fields with "updateOne()", "updateMany()" and "$set" Preview 07:52

Updating Multiple Fields with "$set" Preview 01:40

Incrementing & Decrementing Values Preview 03:33

Using "$min", "$max" and "$mul" Preview 03:15

Getting Rid of Fields Preview 02:04

Renaming Fields Preview 01:20

Understanding "upsert()" Preview 04:01

Time to Practice - Update Operations

How can we update information in existing documents? Let's test what we learned about that so far in this assignment!

Updating Matched Array Elements Preview 06:56

Updating All Array Elements Preview 06:27

Finding & Updating Specific Fields Preview 05:35

Adding Elements to Arrays Preview 04:46

Removing Elements from Arrays Preview 02:34

Understanding "$addToSet" Preview 01:18

Wrap Up Preview 01:39

Useful Resources & Links Preview 00:01

Module Introduction Preview 00:31

Understanding "deleteOne()" & "deleteMany()" Preview 04:08

Deleting All Entries in a Collection Preview 02:00

Useful Resources & Links Preview 00:01

Module Introduction Preview 01:19

What Are Indexes & Why Do We Use Them? Preview 04:18

Adding a Single Field Index Preview 08:06

Indexes Behind the Scenes Preview 00:46

Understanding Index Restrictions Preview 02:51

Creating Compound Indexes Preview 07:14

Using Indexes for Sorting Preview 02:25

Understanding the Default Index Preview 00:59

Configuring Indexes Preview 02:28

Understanding Partial Filters Preview 06:07

Applying the Partial Index Preview 03:37

Understanding the Time-To-Live (TTL) Index Preview 03:55

Query Diagnosis & Query Planning Preview 02:10

Understanding Covered Queries Preview 03:34

How MongoDB Rejects a Plan Preview 07:37

Using Multi-Key Indexes Preview 08:15

Understanding Text Indexes Preview 06:09

Text Indexes & Sorting Preview 02:21

Creating Combined Text Indexes Preview 02:54

Using Text Indexes to Exclude Words Preview 00:54

Setting the Default Language & Using Weights Preview 06:32

Building Indexes Preview 07:40

Wrap Up Preview 02:24

Useful Resources & Links Preview 00:04

Module Introduction Preview 00:53

Adding GeoJSON Data Preview 04:51

Running Geo Queries Preview 03:22

Adding a Geospatial Index to Track the Distance Preview 02:52

Adding Additional Locations Preview 03:34

Finding Places Inside a Certain Area Preview 06:22

Finding Out If a User Is Inside a Specific Area Preview 05:27

Finding Places Within a Certain Radius Preview 05:38

Time to Practice - Geospatial Data

MongoDB offers some really cool features related to Geospatial data, let's practice what we learned about these in this module!

Wrap Up Preview 01:40

Useful Resources & Links Preview 00:02

Module Introduction Preview 01:34

What is the Aggregation Framework? Preview 01:59

Getting Started with the Aggregation Pipeline Preview 01:21

Using the Aggregation Framework Preview 03:12

Understanding the Group Stage Preview 05:56

Diving Deeper Into the Group Stage Preview 03:12

Time to Practice - The Aggregation Framework

Let's practice what we learned about the Aggregation Framework until now!

Working with $project Preview 09:58

Turning the Location Into a geoJSON Object Preview 07:59

Transforming the Birthdate Preview 03:48

Using Shortcuts for Transformations Preview 01:25

Understanding the $isoWeekYear Operator Preview 02:40

$group vs $project Preview 00:55

Pushing Elements Into Newly Created Arrays Preview 04:03

Understanding the $unwind Stage Preview 02:50

Eliminating Duplicate Values Preview 00:50

Using Projection with Arrays Preview 03:03

Getting the Length of an Array Preview 01:11

Using the $filter Operator Preview 04:43

Applying Multiple Operations to our Array Preview 07:31

Understanding $bucket Preview 06:16

Diving Into Additional Stages Preview 07:29

How MongoDB Optimizes Your Aggregation Pipelines Preview 00:06

Writing Pipeline Results Into a New Collection Preview 01:47

Working with the $geoNear Stage Preview 05:16

Wrap Up Preview 02:41

Useful Resources & Links Preview 00:02

Module Introduction Preview 00:54

Number Types - An Overview Preview 06:28

MongoDB Shell & Data Types Preview 00:22

Understanding Programming Language Defaults Preview 03:33

Working with int32 Preview 05:17

Working with int64 Preview 06:32

Doing Maths with Floats int32s & int64s Preview 06:57

What's Wrong with Normal Doubles? Preview 04:20

Working with Decimal 128bit Preview 04:14

Wrap Up Preview 01:40

Useful Resources & Links Preview 00:05

Module Introduction Preview 04:23

Understanding Role Based Access Control Preview 06:47

Roles - Examples Preview 02:13

Creating a User Preview 05:50

Built-In Roles - An Overview Preview 05:39

Assigning Roles to Users & Databases Preview 04:48

Updating & Extending Roles to Other Databases Preview 05:06

Time to Practice - Security

How can we make our database secure? We learned a lot about that already, so let's practice what we learned!

Adding SSL Transport Encryption Preview 10:20

Encryption at REST Preview 01:25

Wrap Up Preview 03:21

Useful Resources & Links Preview 00:08

Module Introduction Preview 01:52

What Influences Performance? Preview 03:01

Understanding Capped Collections Preview 05:05

What are Replica Sets? Preview 04:36

Understanding Sharding Preview 06:13

Deploying a MongoDB Server Preview 02:25

Using MongoDB Atlas Preview 09:17

Backups & Setting Alerts in MongoDB Atlas Preview 01:27

Connecting to our Cluster Preview 03:36

Wrap Up Preview 01:58

Useful Resources & Links Preview 00:03

Module Introduction Preview 01:04

What are Transactions? Preview 02:03

A Typical Usecase Preview 02:18

How Does a Transaction Work? Preview 07:42

Useful Resources & Links Preview 00:01

Module Introduction Preview 02:13

Splitting Work Between the Driver & the Shell Preview 02:06

Preparing our Project Preview 04:49

Installing Visual Studio Code Preview 01:46

Installing the Node.js Driver Preview 04:56

Connecting Node.js & the MongoDB Cluster Preview 06:31

Storing Products in the Database Preview 04:53

Storing the Price as 128bit Decimal Preview 06:10

Fetching Data From the Database Preview 06:23

Creating a More Realistic Setup Preview 11:48

Getting a Single Product Preview 03:20

Editing & Deleting Products Preview 07:28

Implementing Pagination Preview 04:58

Adding an Index Preview 01:27

Signing Users Up Preview 07:03

Adding an Index to Make the Email Unique Preview 01:13

Adding User Sign In Preview 05:18

Wrap Up Preview 01:11

Useful Resources & Links Preview 00:03

Module Introduction Preview 01:42

Stitch & MongoDB Realm Preview 00:17

What is Stitch? Preview 07:23

Preparations Preview 02:04

Start Using Stitch Preview 04:33

Adding Stitch to our App & Initializing It Preview 08:11

Adding Authentication Preview 02:47

Sending Data Access Rules Preview 03:57

Fetching & Converting Data Preview 01:49

Deleting Products Preview 03:02

Finding a Single Product Preview 04:09

Adding Products Preview 03:29

Updating Products Preview 03:46

Switching to User Email & Password Authentication Preview 01:54

Adding User Sign Up & Confirmation Preview 06:32

Adding User Login Preview 03:42

Rules & Real Users Preview 01:48

The Current State of Authentication Preview 00:21

Functions & Triggers Preview 05:01

Wrap Up Preview 00:56

Useful Resources & Links Preview 00:04

Course Roundup Preview 03:05

Course Slides Preview 00:01

Bonus: More Content! Preview 00:20