MongoDB - The Complete Developer's Guide

Video description

Explore the world of NoSQL databases with MongoDB for web and mobile applications

About This Video

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

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!

You'll learn the following in detail:

  • 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 (for example, Node.js driver)
  • How to increase performance 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

A hands-on course where you'll learn by writing codes. A wide variety of example data and use-cases have been provided and by the end of the course, you'll have all the knowledge you need to work with MongoDB in your next project!

Who this book is for

This course is useful for developers or data scientists who plan on (or are already) working with MongoDB, anyone who's interested in NoSQL databases, and both beginner and advanced MongoDB users who want to explore all the core features.

Publisher resources

Download Example Code

Table of contents

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

Product information

  • Title: MongoDB - The Complete Developer's Guide
  • Author(s): Academind by Maximilian Schwarzmuller
  • Release date: October 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789954012