
In this lesson, we will show you how to install MongoDB on Mac OS.
Mac OS Catalina makes the root directory read-only. But by default, MongoDB stores its log and data files in /data/db. This means we need to set a new log and data storage location.
In this lesson, we will download the mongoDB package and install it.
In this lesson, we will do a challenge to test if you have fully understood how to install MongoDB.
In this lesson, we will show you how to use MongoDB Atlas and Compass.
In this lesson, we will learn the basic concepts of daemon, process, process ID and shell.
In this lesson, we will learn how to define and use the mongoDB config file.
In this lesson, we will take a brief look at how MongoDB manages and stores data. We will compare it with MySQL which is a SQL database that uses a fixed schema.
In this lesson, we will learn how to use Mongo shell.
Commonly used mongo shell methods.
Native shell methods that help us operate the system without leaving mongo shell.
Get to know the connection object and the DB object.
In this lesson, we will try the DB and connection on mongo shell. We will also show you what happens if we assign an illegal value to the global variable DB.
In this lesson, we will explore what happens if we start a mongo shell without selecting a database.
In this lesson, we will learn how to define the .mongorc.js file.
To make sure you can understand what we are about to learn, you must have a proper understanding of how an object inherits properties and methods from its constructor's prototype.
In this lesson, we will show you how to use shell scripts.
In this lesson, we will learn rules we must follow when picking names for databases, collections and fields.
Starting from this lesson, we will learn how to perform CRUD operations.
We will learn how to insert new documents.
In this lesson, we will learn how to insert one document at a time.
In this lesson, we will learn how to insert several documents at a time.
In this lesson, we will learn how to use the insertMany method and how it handles errors.
In this lesson, we will learn how to insert documents using the insert command.
The query object stores retrieved documents.
Query operators help us set more complicated query conditions to help us find the documents we need.
In this lesson, we will learn how to work with nested arrays. E.g. { arr : [1,2,3] }
In this lesson, we will learn how to work with nested documents.
In this lesson, we will work with nested documents.
In this lesson, we will show you how to update documents.
In this lesson, we will show you how to work with date-type values in query and update operations.
In this lesson, we will show you how to update array elements. The main challenge is how to locate the target elements.
In this lesson, we will show you how to add new array elements and control their position in the target array.
In this lesson, we will learn how to only insert unique elements into an array.
In this lesson, we will learn how to delete documents.
In this lesson, we will give you a brief introduction on what indexes are and how they can help improve the query efficiency.
In this lesson, we will give you a brief introduction on index-related methods.
In this lesson, we will create our first single-field index and use it in a query. We will also learn how to "examine" a query operation to see if it has used any indexes or not.
In this lesson, we will show you how to create a sparse index.
In this lesson, we will show you how to create a TTL index and use it to expire documents.
We will learn what text indexes are and how to use them.
In this lesson, we will create a text index and perform a keyword search using it.
We will learn what a capped collection is and how to create it.
We will learn how to create and use a capped collection.
We will learn how to monitor changes made to a capped collection using tailable cursor.
We will learn how to set up a validator to filter documents before inserting them into a collection.
We will create a validator and use it to filter documents.
In this lesson, we will learn how MongoDB guarantees data safety during accidents.
We will learn how MongoDB journaling works.
We will learn how to check the status of a collection and database.
We will learn how to manually release storage space occupied by deleted documents.
We will learn what aggregation is.
We will learn how to design a pipeline to analyze documents.
We will design an aggregation pipeline to calculate the total and average sales made by Tom.
Calculate the total and average value.
We will calculate the total and average sales of a specified salesperson.
We will learn the $round and $trunc operator.
Calculate the total price using the arithmetic operators.
We will learn how to use $expr in query objects. It enables us to find documents by comparing fields from the same document.
In this lesson, we will take a look at one of the most important and commonly used pipeline stages: the group stage.
In this lesson, we will learn four pipeline stages. They are sort, limit, skip and count. Basically their names have already told us what they can do. The cursor object also has four methods under the same names and do the same jobs.
The $unwind stage can help us retrieve array elements.
We will try the $bucket stage in solving a real-life problem.
In this lesson, we will learn a new stage: the facet stage.
It can process multiple aggregation pipelines within a single stage. The single stage is the key here. Pipelines set in the facet stage will all receive the same set of input documents.
So what is the point of using the facet stage. Why do we need to cram several pipelines into one stage?
Doing so enables us to reuse previous aggregation stages. The server does not have to run the same task repeatedly.
In this lesson, we will show you how to keep aggregation results for future reuse.
The merge stage is a new feature introduced in version 4.2. It also writes aggregation results to a specified collection and it has to be the last stage as well.
Using the out or merge stage, we can permanently store the results of an aggregation pipeline.
These results will be stored in an independent collection known as the result collection.
But there is no link between the result and the source collection. So if we make changes to the source collection, the result collection won’t reflect those changes.
Besides, the aggregation results are conclusions of a data analysis. So these documents are for reading purposes only. There is no need to create a full-fledged collection to store them.
This is why view is a much better solution.
Starting from this lesson, we will take a look at another type of aggregation: map reduce.
Since we already have the aggregation pipeline, why do we need the map reduce function?
{}
Map-reduce is a data processing paradigm.
We use it to condense large volumes of data into useful aggregated results.
Large volume is the key here. Map-reduce is actually a special group stage that is very good at handling large volumes of data.
Starting from this lesson, we will learn how to use replica set.
Replica means running the same data set using several mongod processes. Every mongod process has the same dataset.
Replica gives us data redundancy and makes our data set disaster-proof. Losing one or even several servers won’t ruin everything.
Replica also gives us higher data availability. If one server went down, other servers can still offer data services to clients.
In this lesson, we will show you how a replica set works.
In this lesson, we will show you how to set up a replica set.
In this lesson, we will set up our first replica set from scratch.
In this lesson, we will take a close look at the oplog collection and its documents. The oplog documents shown in this lesson come from the replica set we created in the last lesson.
In this lesson, we will talk about the replication lag.
In this lesson, we will take a look at problems caused by the replication delay.
How does a replica set inject data into a newly joined member?
In this lesson, we will talk about the replication set election.
In this lesson, we will take a look at another self-restoration feature: rewrite.
MongoDB must respond to every write operation made by the client side, whether this write operation has succeeded or failed.
We use write concern to define the standard of a successful write operation.
In this lesson, we will show you how to set custom writeConcern names. Using custom writeConcern names, we can require a write operation to be replicated to specified set members.
In this lesson, we will show you how to set custom writeConcern names. Using custom writeConcern names, we can require a write operation to be replicated to specified set members.
Use the read preference to select which set member to read from.
I know of your past fondness for the SQL varietals, but I can wholeheartedly endorse a new breed of NON-SQLs--MongoDB.
MongoDB is one of the most popular non-SQL databases. Its dynamic schema offers great storage flexibility, enabling your project to deal with ever-changing demands.
Only basic JavaScript knowledge is needed to start this course. If you know how to use a JavaScript object, then you are good to go!
We will start with basic MongoDB concepts and operations, including how MongoDB manages data, CRUD operations, creating validators and indexes, etc.
Then you will learn how to monitor the real-time status of MongoDB collections and databases.
We will also learn advanced topics like aggregation, replica, and sharding.
In the end, we will learn Mongoose and the native nodeJS MongoDB driver.
We want this course to be a serious course that can truly help you master MongoDB and take you to the next level. Therefore, we do not shy away from difficult and complicated topics. But we also believe a good course should make your MongoDB study easy. So we took a two-step approach. We will explain the theory first. After you have developed a basic impression, we will apply what we have learned in real-life examples.