MongoDB is a leading non-relational database. It is used by many well known, large companies like: Google, Facebook, eBay, UPS and many more.
Learn from a professional
I’m a certified MongoDB developer and certified MongoDB administrator.
You can verify my certificates using a link from the promo video. Here are the license numbers:
- developer: 463-864-356
- administrator: 106-358-385
I’ve been working with MongoDB for quite some time, and I can say that I know MongoDB very well.
Although this course was not designed for the needs of the certification process, its content, especially quizzes, can be a tremendous help in preparing to pass the MongoDB developer certificate. Read more about quizzes below.
Live course with support
This course will be upgraded based on your feedback as this course is for you and your thoughts, problems and questions are very important for me.
I will help you a much as I can.
This course is designed to make you a real, professional MongoDB developer with deep understanding of many different MongoDB features. After this course you will know everything you need, to work with MongoDB comfortably. This course is a MongoDB complete training.
So that you can follow all the queries executed during this course, I have attached a file that contains all the collections I’ve used. So you will be able to repeat every query and check everything in practice. You will be able to perform your own queries.
For many sections you will find Quizzes. These quizzes contain about 150 questions in total. These quizzes are designed to be hard. They are not there to make you feel good because you know the answer to every single question. They are there to remind you of some things, to draw your attention to certain cases and to make you a better developer at the end. And this is the goal of this course.
For two sections: CRUD and Aggregation you will find some homework. You will need to write some queries, to master your skills. For each homework you will find solutions, so you can compare your queries or just take a peep to help yourself out.
In some cases we will compare MongoDB to relational databases, to see the differences. This, I think, will be quite useful if you have a background in relational databases.
But you don’t have to be familiar with relational databases at all to learn MongoDB
This course is based on MongoDB 3.2. It is the newest stable release, ready for production.
Current version: 1.0.2 02.03.2017 Better voice for lectures from 20 to 28
1.0.1 31.01.2017 Improved sound for sections 2, 3 and 4
Work in progress
Closed captions 17.04.2017 done for lectures from 1 to 33 (25%)
Introduction to MongoDB
In this lecture we will discuss what MongoDB database is. We will also discuss the three very popular terms which try to describe MongoDB.
In this lecture we will be talking about the two main advantages of MongoDB.
In this lecture we will be talking about MongoDB's limitations. Don't worry, we will learn how to deal with them during this course.
In this lecture we will be talking about the components of MongoDB. We will focus on two most important of them:
In this lecture we will be talking about different MongoDB editions and versions. We will choose the MongoDB edition for us.
MongoDB can be installed on many different operating systems. We will see the full list and we will choose two operating systems for us.
In this video we will be installing MongoDB on Ubuntu 14.04 LTS. If you want to install MongoDB on Windows, skip this lecture and go to lecture 9.
In this video we will be installing MongoDB on Windows. After this video you will be ready for action!
MongoDB server and clients
In this lecture we will be talking about how to:
- connect to
the MongoDB server.
We will discuss the most important options for mongod and mongo.
In this lecture we will be talking about mongo. This is the default client, shipped with the MongoDB installation. After this video You will understand this client.
In this lecture we will be talking about Robomongo. This is a third party client that can be used to interact with the database. We will be using this client in section 10.
In this short video we will explain what the data structures in MongoDB are. We will compare them with data structures used by relational databases.
In this video we will interact with the MongoDB server in order to become more familiar with databases, collections and documents. We will become more familiar with the data representation before we discuss them in more detail.
In this lecture we will discuss MongoDB documents in detail. We will be talking about text and binary representations of documents. We will be able to understand the difference between JSON and BSON. We will also discuss important BSON data types.
In this lecture we will discuss MongoDB collections in detail. We will focus mostly on polimorphism and how to create collections.
As know we understand the data representation used by MongoDB, we know what databases, collections and documents are, time to interact with them.
In this video we will be talking about the resources prepared for this course. We will import all the collections used during this course, so You will be able to repeat every query and check everything in practice.
In this video we will briefly discuss the methods used to perform CRUD operations. All of them will explained in detail in the next lectures.
In this video we will discuss the insert() method, which is used to insert new documents into a collection.
In this video we will be talking about inserting single documents into the database. We will also discuss primary keys.
In this lecture we will be talking about how to insert many documents at the same time.
In this lecture we will be talking about some very important restrictions that affect documents in MongoDB.
In this video we will discuss the find() and findOne() methods, which are used to retrieve documents from the database.
The find() method returns always a cursor. In this video we will learn what a cursor is and how it works.
In this video we will be talking about basic operators used for creating matching criteria. These operators are:
In this video we will be talking about logical operators. These operators are used to create more complex matching criterias. We will discuss:
As polymorphism allows us to store unstructured data we must know how to deal with this. In this video we will discuss two operators:
As this is completely normal to have documents embedded within other documents, we will discuss in this video how to create conditions for embedded documents.
In this video will be talking about a specific query operator, which is $where. We will discuss whether we should avoid it, and if so, why and how to do this.
Documents can contain arrays. In this video we will be learning how to create conditions for arrays. This lecture covers these operators:
In this lecture, we will be talking about projection, so the ability to limit returned data.
In this video we will continue learning projection, but in this lecture we will focus on projection operators:
It is very common that we want to retrieve sorted data from the database. In this video we will be learning how to do this.
In this lecture we will be talking about sorting unstructured data. As polimorphism allows us to store any documents we want to, in the same collection, some documents can have values of different types in the same field or not have such a field at all.
In this lecture we will be talking about limiting the number of returned documents. This lecture covers two cursor methods:
In this video we will discuss the update() method, which is used to change existing documents.
In this short lecture we will be learning how to replace the whole document in a collection.
In this video we will be talking about how to modify the selected fields of a document. We will discuss these operators:
In this lecture we will be talking modifying numbers. We will discuss these operators:
In this video we will be learning how to add new elements to an array. We will discuss these operators:
In this lecture we will be learning how to remove specific elements from an array. We will discuss these operators:
In this lecture, we will be talking about modifying specific elements in arrays. We will be doing this using:
- a number that specifies the position in an array
- the special operator: $
In this video we will be talking about upserting documents. We will learn what upserting is, and what fields upserted documents contain.
In this video we will be learning how to modify multiple documents, as by default MongoDB modifies only single documents.
In this video we will discuss the remove() method, which is used to change delete documents.
In this video we will be learning how to delete documents from a collection. We will also learn how to delete the whole collection.
In this video we will be learning about new methods to insert, modify and delete documents, introduced in version 3.2. We will discuss:
In this lecture we will be talking about performing bulk operations, in other words, the ability to execute many operations using a single query. We will see how to do this, and we will learn why bulk operations rock!
In this video we will learn what indexes are and what they are used for. We will learn how they speed up our queries.
In this lecture we will be learning about how to create, list and delete indexes in MongoDB. We will discuss these methods:
In this lecture we will discuss single field indexes in detail. To check how our indexes are used by our queries we will use the cursor.explain() method. We will learn how to interpret the results returned by this method. As MongoDB automatically chooses an index for our query, we will learn how to choose an index ourselves.
In this video we will be learning how indexes are used to sort our data. We will also discuss when this is possible and when it is not.
In this video we will be learning about the characteristics of indexes, using examples.
We will observe in action how indexes improve performance. We will also see what happend during index creation and what is the difference between creating indexes in the foreground and in the background.
In this video we will be learning how to create compound indexes and when these indexes are used. We will learn what index prefixes are.
In this video we will be talking about using compound indexes for sorting. We will learn when a compound index can be used for sorting and when it cannot.
In this video we will be learning about two special types of single and compound indexes:
- unique indexes
- sparse indexes
We will discuss how to create such indexes and what the consequences of creating such indexes are.
Multikey index is not a separate type of index. In this leacture we will be learning what is and how it restricts the form of stored documents.
Covered queries are very fast! We will be learning when we can and how to write a covered query.
In this lecture we will briefly discuss special types of indexes. They will be explained in detail in the next section.
Special MongoDB features
In this lecture we will be talking about full text search. We will learn what is full text search and what we must do in order to use it. We will discuss the $text operator. We will also learn about two key concepts:
- stop words
As text contains capital letters and in many languages also diacritic characters, in this video we will be learning how to take them into account when writing our queries.
In this lecture we will be learning how to create and use compound text indexes.
In this lecture we will be learning how to sort results, returned by text search. We will be learning how MongoDB calculates a score for every document and how we can influence this process.
In this lecture we will discuss restrictions and performance considerations for text indexes. We will discuss size of a text index and a useful strategy called partitioning.
In this video we will be talking about two different surfaces supported by MongoDB:
We will learn what is the difference beween these two.
We will also discuss different data representations that are used to represent geographical coordinates including legacy and GeoJson coordinates.
In this video we will discuss 2d support (flat surface). We will larn how to create queries using the $near and $geoWithin operators. We will see how to specify maximum and minimum distance for our searches.
We will also learn when not to use this type of surface and why.
In this video we will be talking about 2dsphere indexes (spherical surface). We will write some queries using coordinates of simple points and real capitals.
In this video we will be talking what are the three main types of collections. We will also mention validation.
In this video we will be talking about manual collection creation. This is important as TTL collections and capped collections can be created only manually. We will see how to use the createCollection() method. We will use it to create a collection without primary key.
In this lecture we will be talking about capped collections. We will learn how to create and configure a new capped collection. We will discuss how capped collections work. We will learn how to check if a collection is capped. We will also discuss some of the restrictions.
In this lecture we will be talking about TTL collections. We will learn how to create apropriate index from a TTL collection using expireAfterSecond parameter. We will observe in action how this works and what is the maximum delay. We will also be talking about restrictions.
In this video we will introduce document validation which is a new functionality. We will learn what validation means and how to define validation for our collections.
In this lecture we will be talking how to define validation rules for our documents using the validator option for the createCollection() method. We will also learn which operators we cannot use to create validation rules.
In this video we will be talking about the validationLevel option, which is used to specify how strictly validation rules are applied to our documents. We will discuss all three levels:
We will see the difference in practice.
In this video we will be talking about the validationAction option, which is used to specify what happens when validation rules are violated.
In this video we will discuss what data aggregation is. We will learn how to use the aggregate() method. We will learn how to define an aggregation pipeline and what it is. We will see the list of available aggregation stages.
In this lecture we will be talking about the the $match stage, which is responsible for filtering documents
in the pipeline.
In this lecture we will be talking about the $project stage, which is similar to the projection parameter for the find() method. We will learn simple projections but we will also learn how to modify documents using this stage.
In this lecture we will be talking about the $redact stage, which is used to change the shape of documents. We will use it in practice.
In this lecture we will be talking about the $group stage, which groups similar documents together, and then executes some operations on documents in every group separately. We will discuss what accumulators are. We will see in action these accumulators:
In this lecture we will be talking about the $sample stage, which randomly selects a specified number of documents.
In this lecture we will be talking about three stages:
We will discuss the restrictions for the $sort stage and how to deal with them.