filmov
tv
MongoDB Aggregation Framework: The Ultimate Guide (2024)
Показать описание
MongoDB Aggregation Framework: The Ultimate Guide (2024)
00:00 Aggregation Framework In MongoDB
03:44 Using aggregate() method- Aggregation Example 1
11:13 Using distinct() and count()
17:12 Sorting documents
in this whole section on aggregation framework in mongodb we are going to learn and discuss about aggregation framework in mongodb so aggregation framework in mongodb is very much similar to what we have in sql or rdbms like we perform the count method to get the number of count the number of documents in the number of record in the among like rdbms database theme as we perform the count to get the number of documents in the mongodb and we use the group by in sql same as here also we'll be using group operator to get the result by grouping the data based on some operation so let's get started so what what is aggregation framework in mongodb so what aggregation does actually it's process the data not process the data records and records or documents in the mongodb and after processing it gives the result how it gives the result like it groups the values or document based on them from like conditions provided so we will be grouping the data based on some like age or number of students or number of likes if you are using a blog data so it will group the data based on some specific value in a collection and then what we do it performs some operation like when we group the data based on like number of likes and then we do some we perform some operations on the group data so that's what mongodb or any aggregation framework does it process the data it group the data together and then perform some operation on the group data and mongodb as i earlier said mongodb aggregation framework is equivalent to count and group by in rdbms resql so next thing is irrigation methods in mongodb so we have aggregate method in mongodb to perform aggregation on a document or on a collection of documents so what this aggregate method is in this aggregate method we provide the inside this method we provide the operation to be performed like will pass different operators which will perform a specific operation in this aggregate method so uh in the next slide we will be seeing what are those operations which we are going to perform in aggregate method so various operations in aggregate methods are like sum which will give the sum of like if you are going to uh get the based on salary so it will give a sum of all the salaries are average it will give the average value of the salary like if you want to perform operation on a employee buy data and you want to get the average uh salary of the employees then we can pass on this average operator or average method and then we have min so that we can get the minimum value in likewise we have max value so we can get the max and we have first so we can get the first document our first record in the document and then we have last and likewise we have many other like like post pop all these uh operations we can do in aggregate methods so we'll see all of these and many more in the subsequent tutorials so these are this is the basic overview of the aggregate framework in mongodb
THANKS FOR WATCHING AND DON'T FORGET TO LIKE, COMMENT, SUBSCRIBE, AND HIT THE BELL ICON TO WATCH THE LATEST VIDEO!
#edudreams #mongodb #nosql
00:00 Aggregation Framework In MongoDB
03:44 Using aggregate() method- Aggregation Example 1
11:13 Using distinct() and count()
17:12 Sorting documents
in this whole section on aggregation framework in mongodb we are going to learn and discuss about aggregation framework in mongodb so aggregation framework in mongodb is very much similar to what we have in sql or rdbms like we perform the count method to get the number of count the number of documents in the number of record in the among like rdbms database theme as we perform the count to get the number of documents in the mongodb and we use the group by in sql same as here also we'll be using group operator to get the result by grouping the data based on some operation so let's get started so what what is aggregation framework in mongodb so what aggregation does actually it's process the data not process the data records and records or documents in the mongodb and after processing it gives the result how it gives the result like it groups the values or document based on them from like conditions provided so we will be grouping the data based on some like age or number of students or number of likes if you are using a blog data so it will group the data based on some specific value in a collection and then what we do it performs some operation like when we group the data based on like number of likes and then we do some we perform some operations on the group data so that's what mongodb or any aggregation framework does it process the data it group the data together and then perform some operation on the group data and mongodb as i earlier said mongodb aggregation framework is equivalent to count and group by in rdbms resql so next thing is irrigation methods in mongodb so we have aggregate method in mongodb to perform aggregation on a document or on a collection of documents so what this aggregate method is in this aggregate method we provide the inside this method we provide the operation to be performed like will pass different operators which will perform a specific operation in this aggregate method so uh in the next slide we will be seeing what are those operations which we are going to perform in aggregate method so various operations in aggregate methods are like sum which will give the sum of like if you are going to uh get the based on salary so it will give a sum of all the salaries are average it will give the average value of the salary like if you want to perform operation on a employee buy data and you want to get the average uh salary of the employees then we can pass on this average operator or average method and then we have min so that we can get the minimum value in likewise we have max value so we can get the max and we have first so we can get the first document our first record in the document and then we have last and likewise we have many other like like post pop all these uh operations we can do in aggregate methods so we'll see all of these and many more in the subsequent tutorials so these are this is the basic overview of the aggregate framework in mongodb
THANKS FOR WATCHING AND DON'T FORGET TO LIKE, COMMENT, SUBSCRIBE, AND HIT THE BELL ICON TO WATCH THE LATEST VIDEO!
#edudreams #mongodb #nosql