O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MongoDB - The Complete Developer’s Guide

Video Description

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

About This Video

  • Perform simple CRUD operations on the database using the MongoDB command shell
  • Learn index concepts and indexing best-practices

In Detail

MongoDB is one of the most important databases you can work with these days. It's extremely popular and MongoDB developers are in high demand. 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
  • ... 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!

The code bundle for this video course is available at https://github.com/PacktPublishing/MongoDB---The-Complete-Developer-s-Guide-

Table of Contents

  1. Chapter 1 : Introduction
    1. Introduction 00:01:40
    2. What is MongoDB? 00:05:36
    3. The Key MongoDB Characteristics (and how they differ from SQL Databases) 00:02:56
    4. Understanding the MongoDB Ecosystem 00:04:19
    5. Installing MongoDB 00:10:14
    6. Time To Get Started! 00:05:37
    7. Shell vs Drivers 00:03:29
    8. MongoDB + Clients: The Big Picture 00:02:58
    9. Course Outline 00:04:39
    10. How To Get The Most Out Of The Course 00:01:45
  2. Chapter 2 : Understanding the Basics & CRUD Operations
    1. Module Introduction 00:01:31
    2. Understanding Databases, Collections & Documents 00:03:47
    3. The Shell & MongoDB Drivers for Different Languages 00:02:40
    4. Creating Databases & Collections 00:03:16
    5. Understanding JSON Data 00:04:05
    6. Comparing JSON & BSON 00:05:23
    7. Create, Read, Update, Delete (CRUD) & MongoDB 00:05:38
    8. Finding, Inserting, Deleting & Updating Elements 00:07:47
    9. Understanding "insertMany()" 00:01:48
    10. Diving Deeper Into Finding Data 00:03:55
    11. "update" vs "updateMany()" 00:04:41
    12. Understanding "find()" & the Cursor Object 00:07:30
    13. Understanding Projection 00:03:38
    14. Embedded Documents & Arrays - The Theory 00:01:56
    15. Working with Embedded Documents 00:02:28
    16. Working with Arrays 00:01:43
    17. Accessing Structured Data 00:04:39
    18. Wrap Up 00:02:47
  3. Chapter 3 : Schemas & Relations: How to Structure Documents
    1. Module Introduction 00:02:12
    2. Why Do We Use Schemas? 00:03:58
    3. Structuring Documents 00:07:43
    4. Data Types - An Overview 00:06:23
    5. Data Types in Action 00:12:16
    6. How to Derive your Data Structure - Requirements 00:05:08
    7. Understanding Relations 00:02:58
    8. One To One Relations - Embedded 00:06:20
    9. One To One - Using References 00:04:54
    10. One To Many - Embedded 00:05:08
    11. One To Many - Using References 00:04:05
    12. Many To Many - Embedded 00:07:17
    13. Many To Many - Using References 00:05:25
    14. Summarizing Relations 00:02:18
    15. Using "lookUp()" for Merging Reference Relations 00:04:36
    16. Planning the Example Exercise 00:06:57
    17. Implementing the Example Exercise 00:04:16
    18. Understanding Schema Validation 00:02:58
    19. Adding Collection Document Validation 00:09:07
    20. Changing the Validation Action 00:03:43
    21. Wrap Up 00:04:08
  4. Chapter 4 : Exploring The Shell & The Server
    1. Module Introduction 00:01:01
    2. Finding Available Options 00:02:16
    3. Setting "dbpath" & "logpath" 00:04:42
    4. Exploring the MongoDB Options 00:02:01
    5. MongoDB as a Background Service 00:03:09
    6. Using a Config File 00:03:03
    7. Shell Options & Help 00:04:13
  5. Chapter 5 : Using the MongoDB Compass to Explore Data Visually
    1. Module Introduction 00:00:50
    2. Exploring the MongoDB Compass 00:05:50
  6. Chapter 6 : Diving Into Create Operations
    1. Module Introduction 00:01:13
    2. Creating Documents - An Overview 00:01:48
    3. Understanding "insert()" Methods 00:06:11
    4. Working with Ordered Inserts 00:07:47
    5. Understanding the "writeConcern" 00:05:44
    6. The "writeConcern" in Practice 00:04:10
    7. What is Atomicity? 00:02:40
    8. Importing Data 00:03:38
    9. Wrap Up 00:02:39
  7. Chapter 7 : Read Operations - A r Look
    1. Module Introduction 00:01:40
    2. Methods, Filters & Operators 00:02:55
    3. Operators - An Overview 00:03:03
    4. Query Selectors & Projection Operators 00:01:16
    5. Understanding "findOne()" & "find()" 00:04:33
    6. Working with Comparison Operators 00:05:20
    7. Querying Embedded Fields & Arrays 00:04:52
    8. Understanding "$in" and "$nin" 00:02:37
    9. "$or" and "$nor" 00:05:32
    10. Understanding the "$and" Operator 00:05:04
    11. Using "$not" 00:01:35
    12. Diving Into Element Operators 00:05:30
    13. Working with "$type" 00:02:52
    14. Understanding Evaluation Operators - "$regex" 00:03:24
    15. Understanding Evaluation Operators - "$expr" 00:09:37
    16. Diving Deeper Into Querying Arrays 00:04:10
    17. Using Array Query Selectors - "$size" 00:02:10
    18. Using Array Query Selectors - "$all" 00:02:13
    19. Using Array Query Selectors - "$elemMatch" 00:04:53
    20. Understanding Cursors 00:02:48
    21. Applying Cursors 00:06:02
    22. Sorting Cursor Results 00:03:10
    23. Skipping & Limiting Cursor Results 00:03:32
    24. Using Projection to Share our Results 00:04:02
    25. Using Projection in Arrays 00:05:12
    26. Understanding "$slice" 00:03:06
  8. Chapter 8 : Update Operations
    1. Module Introduction 00:01:01
    2. Updating Fields with "updateOne()", "updateMany()" and "$set" 00:07:53
    3. Updating Multiple Fields with "$set" 00:01:41
    4. Incrementing & Decrementing Values 00:03:34
    5. Using "$min", "$max" and "$mul" 00:03:16
    6. Getting Rid of Fields 00:02:05
    7. Renaming Fields 00:01:21
    8. Understanding "upsert()" 00:04:01
    9. Updating Matched Array Elements 00:06:57
    10. Updating All Array Elements 00:06:27
    11. Finding & Updating Specific Fields 00:05:35
    12. Adding Elements to Arrays 00:04:47
    13. Removing Elements from Arrays 00:02:34
    14. Understanding "$addToSet" 00:01:19
    15. Wrap Up 00:01:39
  9. Chapter 9 : Understanding Delete Operations
    1. Module Introduction 00:00:32
    2. Understanding "deleteOne()" & "deleteMany()" 00:04:09
    3. Deleting All Entries in a Collection 00:02:01
  10. Chapter 10 : Working with Indexes
    1. Module Introduction 00:01:20
    2. What Are Indexes & Why Do We Use Them? 00:04:19
    3. Adding a Single Field Index 00:08:07
    4. Understanding Index Restrictions 00:02:51
    5. Creating Compound Indexes 00:07:14
    6. Using Indexes for Sorting 00:02:26
    7. Understanding the Default Index 00:00:59
    8. Configuring Indexes 00:02:29
    9. Understanding Partial Filters 00:06:07
    10. Applying the Partial Index 00:03:37
    11. Understanding the Time-To-Live (TTL) Index 00:03:56
    12. Query Diagnosis & Query Planning 00:02:10
    13. Understanding Covered Queries 00:03:34
    14. How MongoDB Rejects a Plan 00:07:38
    15. Using Multi-Key Indexes 00:08:16
    16. Understanding Text Indexes 00:06:10
    17. Text Indexes & Sorting 00:02:22
    18. Creating Combined Text Indexes 00:02:54
    19. Using Text Indexes to Exclude Words 00:00:54
    20. Setting the Default Language & Using Weights 00:06:32
    21. Building Indexes 00:07:40
    22. Wrap Up 00:02:25
  11. Chapter 11 : Working with Geospatial Data
    1. Module Introduction 00:00:53
    2. Adding GeoJSON Data 00:04:52
    3. Running Geo Queries 00:03:23
    4. Adding a Geospatial Index to Track the Distance 00:02:52
    5. Adding Additional Locations 00:03:34
    6. Finding Places Inside a Certain Area 00:06:22
    7. Finding Out If a User Is Inside a Specific Area 00:05:27
    8. Finding Places Within a Certain Radius 00:05:38
    9. Wrap Up 00:01:40
  12. Chapter 12 : Understanding the Aggregation Framework
    1. Module Introduction 00:01:34
    2. What is the Aggregation Framework? 00:02:00
    3. Getting Started with the Aggregation Pipeline 00:01:21
    4. Using the Aggregation Framework 00:03:13
    5. Understanding the Group Stage 00:05:56
    6. Diving Deeper Into the Group Stage 00:03:12
    7. Working with $project 00:09:59
    8. Turning the Location Into a geoJSON Object 00:07:59
    9. Transforming the Birthdate 00:03:48
    10. Using Shortcuts for Transformations 00:01:26
    11. Understanding the $isoWeekYear Operator 00:02:41
    12. $group vs $project 00:00:55
    13. Pushing Elements Into Newly Created Arrays 00:04:04
    14. Understanding the $unwind Stage 00:02:50
    15. Eliminating Duplicate Values 00:00:50
    16. Using Projection with Arrays 00:03:04
    17. Getting the Length of an Array 00:01:12
    18. Using the $filter Operator 00:04:44
    19. Applying Multiple Operations to our Array 00:07:31
    20. Understanding $bucket 00:06:17
    21. Diving Into Additional Stages 00:07:29
    22. Writing Pipeline Results Into a New Collection 00:01:47
    23. Working with the $geoNear Stage 00:05:16
    24. Wrap Up 00:02:42
  13. Chapter 13 : Working with Numeric Data
    1. Module Introduction 00:00:54
    2. Number Types - An Overview 00:06:29
    3. Understanding Programming Language Defaults 00:03:33
    4. Working with int32 00:05:18
    5. Working with int64 00:06:33
    6. Doing Maths with Floats int32s & int64s 00:06:58
    7. What's Wrong with Normal Doubles? 00:04:21
    8. Working with Decimal 128bit 00:04:14
    9. Wrap Up 00:01:41
  14. Chapter 14 : MongoDB & Security
    1. Module Introduction 00:04:23
    2. Understanding Role Based Access Control 00:06:48
    3. Roles - Examples 00:02:14
    4. Creating a User 00:05:51
    5. Built-In Roles - An Overview 00:05:40
    6. Assigning Roles to Users & Databases 00:04:49
    7. Updating & Extending Roles to Other Databases 00:05:07
    8. Adding SSL Transport Encryption 00:10:21
    9. Encryption at REST 00:01:25
    10. Wrap Up 00:03:21
  15. Chapter 15 : Performance, Fault Tolerancy & Deployment
    1. Module Introduction 00:01:53
    2. What Influences Performance? 00:03:01
    3. Understanding Capped Collections 00:05:05
    4. What are Replica Sets? 00:04:36
    5. Understanding Sharding 00:06:14
    6. Deploying a MongoDB Server 00:02:25
    7. Using MongoDB Atlas 00:09:18
    8. Backups & Setting Alerts in MongoDB Atlas 00:01:27
    9. Connecting to our Cluster 00:03:36
    10. Wrap Up 00:01:58
  16. Chapter 16 : Transactions
    1. Module Introduction 00:01:05
    2. What are Transactions? 00:02:04
    3. A Typical Usecase 00:02:18
    4. How Does a Transaction Work? 00:07:42
  17. Chapter 17 : From Shell to Driver
    1. Module Introduction 00:02:14
    2. Splitting Work Between the Driver & the Shell 00:02:06
    3. Preparing our Project 00:04:50
    4. Installing Visual Studio Code 00:01:47
    5. Installing the Node.js Driver 00:04:57
    6. Connecting Node.js & the MongoDB Cluster 00:06:32
    7. Storing Products in the Database 00:04:54
    8. Storing the Price as 128bit Decimal 00:06:10
    9. Fetching Data From the Database 00:06:23
    10. Creating a More Realistic Setup 00:11:48
    11. Getting a Single Product 00:03:20
    12. Editing & Deleting Products 00:07:29
    13. Implementing Pagination 00:04:59
    14. Adding an Index 00:01:28
    15. Signing Users Up 00:07:03
    16. Adding an Index to Make the Email Unique 00:01:13
    17. Adding User Sign In 00:05:19
    18. Wrap Up 00:01:11
  18. Chapter 18 : Introducing Stitch
    1. Module Introduction 00:01:42
    2. What is Stitch? 00:07:23
    3. Preparations 00:02:05
    4. Start Using Stitch 00:04:34
    5. Adding Stitch to our App & Initializing It 00:08:11
    6. Adding Authentication 00:02:48
    7. Sending Data Access Rules 00:03:58
    8. Fetching & Converting Data 00:01:49
    9. Deleting Products 00:03:03
    10. Finding a Single Product 00:04:10
    11. Adding Products 00:03:29
    12. Updating Products 00:03:47
    13. Switching to User Email & Password Authentication 00:01:55
    14. Adding User Sign Up & Confirmation 00:06:32
    15. Adding User Login 00:03:43
    16. Rules & Real Users 00:01:49
    17. Functions & Triggers 00:05:02
    18. Wrap Up 00:00:57
  19. Chapter 19 : Roundup
    1. Course Roundup 00:03:06