Mongo Shell Native Methods
Course Content
0 / 219 completedBuild Indexes for Arrays
The Sparse Index
The TTL Index
Introduction to the Text Index
The Text Index
Field Weight
Setting the Field Weight
Introduction to Index
Demonstration of Creating and Using Indexes
Index-related Methods
Introduction to Capped Collections
Working with a Capped Collection
Tailable Cursor
MongoDB Installation Demonstration
Installation Challenge Making Sure You Have Fully Understood Everything
Install MongoDB Introduction
MongoDB Atlas
Daemon, Process and Shell
MongoDB Config File
MongoDB Schema
MongoDB Shell Introduction Part 1
MongoDB Shell Introduction Part 2
Mongo Shell Native Methods
The DB object and the Connection Object
Try the DB and Connection Object on Mongo Shell
Starting a Mongo Shell without Selecting a Database the --nodb flag
The .mongorc.js file
A Brief Review of How Prototype Chain Works in JavaScript
Application of the .mongorc.js File
Shell Scripts and the Interactive Mode
What We Are About to Learn Next
Rules You Must Follow When Naming Databases, Collections and Fields
BSON Data Type
BSON Introduction
CRUD Study Preparation
Create
Try the insertMany Method
Insert Multiple Documents Together
Insert One Document at a Time
The Cursor Object
The Insert Command
Query Operators
Application of Collation in Making Queries
Try Query Operators
Collation Introduction
How to Work with Nested Array
How to Work with Nested Documents Part 1
The Cursor Object and Its Methods
How to Copy a Collection
How to Work with Nested Documents Part 2
Introduction to Update
Upsert the Combination of Insert and Update
How to Update Date-type Values
Demonstration of Updating Documents
Array-related Updates Part 1
The addToSet Operator No Duplicated Elements
Array-related Updates part 2
The Three Element Updaters $, $[], and $[identifier]
The Delete Operation
Introduction to Validator
Try the Validator
Manually Release Storage Space Back to OS
Journaling
Database and Collection Stats
Storage Engine and Checkpoint
Aggregation Introduction
Pipeline Stage and Operators
Try the Aggregation Pipeline
Design the Aggregation Pipeline
The $avg and $sum Operator
Try the $avg and $sum Operator
Rounding Average User Ratings
Challenge Calculating the Final Price Price, VAT, Discount and Shipping Fee
The $expr Operator Finding Profitable Products
The $round and $trunc Operator
The $group Stage
Other Commonly Used Aggregation Operators
Sort Documents Based on the TextScore During a Text Keyword Search
$unwind
$sort, $skip, $limit and $count
$sortByCount a Combination of $group, $sum and $$sort
Introduction to $bucket and $bucketAuto
Application of the $bucketAuto Stage
$facet Reuse Results of the Previous Stage
Application of the $bucket Stage
$arrayElemAt Retrieving Elements Based on Index
Challenge Find the Car with the Highest Mileage
The Left Join $lookUp
Application of the $lookUp stage Retrieving Products and Ratings Together
Using $lookUp the Other Way
Introduction to the Slightly Complicated $merge Stage
$out Keep Aggregation Results for Future Use
Try the $merge Stage
Introduction to MapReduce
View a Read-Only Copy of a Collection
Try the mapReduce Function
Introduction to a Replica Set
How to Set Up a Replica Set
Understanding How a Replica Set Works
Set Up Our First Replica Set
Oplog
The Replication Lag
Problems Caused by the Replication Lag
Initial Sync
Election and Catch-up
Retryable Writes
Rollback
Custom Write Concern Tags
Introduction to Commonly Used Replica Methods
Write Concern W, J, and wTimeout
Add and Remove a Delayed Set Member
Read Preference
Monotonic Read and Write
Try the Majority and Linearizable Read Concern
Read Concern
Causal Consistency
Introduction to Sharding
Chunks
Sharding Strategy
Shard Key
Components of a Sharded Cluster
Introduction of How to Set Up a New Sharded Cluster
Operating a Sharded Cluster Part One
Setting Up a New Sharded Cluster
Manually Move a Chunk to a Designated Shard
Operating a Sharded Cluster Part Two
Manually Merge Two Chunks into One
Manually Split a Chunk
How to Delete Documents from a Sharded Cluster
Updating Shard Key Field Values
What Happens If We Lost All Config Servers
Introduction to Shard Zones
Create and Delete a Zone for Shards
Limiting Chunk Migrations Using Zones
New Feature Brought by v4.4 Adding New Fields to the Shard Key Index
Flush the Routing Table
How the Balancer Migrates Chunks and How to Deal With Orphaned Documents
The ACID Properties
How to Use Transaction on Mongo Shell
Multi-document Transaction
Running a Transaction Operation on a Replica Set
Application Updating Shard Key Field Values
Role-based Access Control Demonstration
Introduction to User Access Control
Other Built-in Roles
Trying Other Built-in Roles
Custom Roles
Create a User Account with User-defined Roles
Create a Custom Role and User Account to Manage Passwords
Introduction to KeyFile
Enabling Internal Authentication on a Replica Set
Experimenting Role-based Access Control on a Replica Set
Authentication Mechanism
Enabling Internal Authentication in a Replica Set Without Down Time
Enabling Authentication for a Sharded Cluster
Rotating Keys
Change Stream Introduction
Filter Change Events
GridFS Introduction
Upload, List, Search and Download Files Using GridFS
Backup and Restore a Standalone Mongod Process
Backup and Restore a Replica Set
Reading Documents Using a NodeJS Driver
Inserting New Documents and Creating a Capped Collection
Deleting and Updating Documents
Set Up a NodeJS MongoDB Driver and Connect to MongoDB
Preparation for Creating a Transaction Program Using NodeJS
session.withTransaction()
Transaction
Declaring a variable using VAR and LET
LET
Temporal Dead Zone
Destructure Assignment Part 1
Destructure Assignment Part 2
Async Await Part 1
Async Await Part 2
Introduction to Mongoose
Quick Start
How to Deal With User-access Control
Why An Incorrect Program CAN Work
Switching from One Database to Another
Create Multiple Connections with Different Databases
Understanding the Relationship Between Models and Connection Objects
Mongoose Schema Basics
Mongoose Schema Demo
SubDocument and Nested Path
How to Work with Mongoose Date
Mongoose Schema Options Index
Mongoose Array
Mongoose Schema Options ID
Mongoose Schema Options Custom Collection Name and Capped Collection
Virtual Properties and Property Aliases
Schema Instance and Static Methods
Mongoose Query Part 2
Mongoose Query Part 1
Mongoose Aggregation Introduction
Mongoose LookUp
Mongoose Populate
Keeping Virtual Properties During a Conversion
Mongoose CRUD Review
Trigger the Validator Without Saving a Document
Populating Virtual Properties
Mongoose Validator Introduction
Setting Custom Validation Error Messages
Update Validator
Async Validator Error Message
THIS in a Validator Function
Custom Validator
Mongoose Middleware Introduction
Document Middleware
Validator Application Unique User Account Name
Query Middleware
Aggregation Middleware
Collection Middleware
The Execution Order of Middleware
Validator Middleware
Middleware Errors
Middleware Naming Collisions Document VS. Query
Mongoose Discriminator