MongoDB - The Complete Developer's Guide

Video description

In the evolving world of tech, MongoDB paired with Node.js stands out as a powerful combination for robust data storage and management. These two giants, when integrated, provide developers with an unmatched toolkit, revolutionizing database operations to be scalable, flexible, and efficient.

This course carefully guides you through the nuances of integrating MongoDB with Node.js, starting with the essentials of moving from shell operations to leveraging drivers. Discover the world of storing intricate product details in the database, mastering the art of handling 128bit decimals for precision, and fetching the exact piece of information you need. But it doesn't stop there. Delve into more advanced topics like user authentication with Stitch, crafting specific data access rules, and even adding products with ease. This course offers a step-by-step walkthrough, ensuring that by the end, you're well-equipped to handle real-world scenarios with confidence.

Embarking on this learning journey will not only equip you with technical knowledge but will also shape your perspective on efficient database management. With each section, you'll find yourself becoming more adept, with lessons building upon one another, culminating in a comprehensive roundup. Embark on this transformative journey with us and redefine your technical prowess.

What You Will Learn

  • Grasp MongoDB's data organization and document database concepts
  • Master CRUD operations in MongoDB
  • Craft efficient, tailored data retrieval queries
  • Learn MongoDB integration with Node.js, pagination, and user authentication
  • Understand the structure of the aggregation framework
  • Learn to work with numeric and geospatial data

Audience

This course is meticulously crafted for developers and data scientists poised to work with MongoDB or those already familiar with it. If you have an interest in diving into the realm of NoSQL databases, this course is tailor-made for you. Catering to both novices and seasoned MongoDB users, it's designed to provide a comprehensive exploration of MongoDB's core features. As for prerequisites, there's no need for prior knowledge in any form of databases. However, a general understanding of web or mobile development can be advantageous, though it's not compulsory.

About The Author

Maximilian Schwarzmüller: Maximilian Schwarzmüller: A professional web developer and instructor, he has never stopped learning new programming skills and languages since the age of 13. In his early days, he started creating websites simply for fun. This passion has remained and shaped his decision to work as a freelance web developer and consultant. Although he started web development on the backend (PHP with Laravel and NodeJS), he has progressed to becoming a front-end developer using modern frameworks such as React, Angular, and VueJS 2 in many projects.

The most rewarding experience for him is to see how people find new and better jobs, build exciting web applications, acquire amazing projects, or simply enjoy their hobby with the help of his content.

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. Assignment 1: Time to Practice - The Basics CRUD Operations
    19. [Solution] Assignment 1: Time to Practice - The Basics CRUD Operations
    20. 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. Assignment 2: Time to Practice - Create Operations
    9. [Solution] Assignment 2: Time to Practice - Create Operations
    10. Importing Data
    11. Wrap Up
  7. Chapter 7 : Read Operations - A Closer 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. Assignment 3: Time to Practice - Read Operations
    17. [Solution] Assignment 3: Time to Practice - Read Operations
    18. Diving Deeper into Querying Arrays
    19. Using Array Query Selectors - "$size"
    20. Using Array Query Selectors - "$all"
    21. Using Array Query Selectors - "$elemMatch"
    22. Assignment 4: Time to Practice - Array Query Selectors
    23. [Solution] Assignment 4: Time to Practice - Array Query Selectors
    24. Understanding Cursors
    25. Applying Cursors
    26. Sorting Cursor Results
    27. Skipping and Limiting Cursor Results
    28. Using Projection to Share Our Results
    29. Using Projection in Arrays
    30. 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. Assignment 5: Time to Practice - Update Operations
    10. [Solution] Assignment 5: Time to Practice - Update Operations
    11. Updating Matched Array Elements
    12. Updating All Array Elements
    13. Finding and Updating Specific Fields
    14. Adding Elements to Arrays
    15. Removing Elements from Arrays
    16. Understanding "$addToSet"
    17. 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. Assignment 6: Time to Practice - Geospatial Data
    10. [Solution] Assignment 6: Time to Practice - Geospatial Data
    11. 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. Assignment 7: Time to Practice - The Aggregation Framework
    8. [Solution] Assignment 7: Time to Practice - The Aggregation Framework
    9. Working with $project
    10. Turning the Location into a GeoJSON Object
    11. Transforming the Birthdate
    12. Using Shortcuts for Transformations
    13. Understanding the $isoWeekYear Operator
    14. $group Versus $project
    15. Pushing Elements into Newly Created Arrays
    16. Understanding the $unwind Stage
    17. Eliminating Duplicate Values
    18. Using Projection with Arrays
    19. Getting the Length of an Array
    20. Using the $filter Operator
    21. Applying Multiple Operations to Our Array
    22. Understanding $bucket
    23. Diving into Additional Stages
    24. Writing Pipeline Results into a New Collection
    25. Working with the $geoNear Stage
    26. 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. Assignment 8: Time to Practice – Security
    9. [Solution] Assignment 8: Time to Practice - Security
    10. Adding SSL Transport Encryption
    11. Encryption at REST
    12. 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): Maximilian Schwarzmüller
  • Release date: October 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789954012