From the course: MongoDB Node.js Developer Associate Cert Prep

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Introduction to MongoDB aggregation

Introduction to MongoDB aggregation

- Hi, folks. In this video we'll introduce and explore the MongoDB aggregation framework that's used to build multi-stage queries. By the end of the lesson, you'll be able to identify the components of an aggregation pipeline. In the context of databases, aggregation is the analysis and summary of data. An aggregation stage is an aggregation operation that's performed on the data and does not permanently alter the source data. MongoDB took this concept a step further by creating an aggregation pipeline, in which the developer specifies the aggregation operations one at a time, in order. We can run a single aggregation stage to get the information that we need. But what makes aggregation in MongoDB unique is that we can string together aggregation stages to create a pipeline. A pipeline consists of multiple stages where data can be filtered, sorted, grouped, and transformed. Documents that are output from one stage…

Contents