Skip to content

Commit abc59c0

Browse files
Merge pull request #8 from Meg528/patch-10
Update 1-aggregation-intro.mdx
2 parents 93d38ac + 434205c commit abc59c0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/50-aggregation/1-aggregation-intro.mdx

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# 📘 Intro to Aggregation Pipelines
22

3-
### What is an Aggregation Pipeline?
3+
### What is an aggregation pipeline?
44

55
The Aggregation Pipeline in MongoDB is a powerful framework for data processing and transformation. It allows you to perform operations like filtering, grouping, sorting, and reshaping data, similar to SQL queries but in a more flexible and scalable way.
66

77
In SQL, you achieve complex queries using `SELECT`, `WHERE`, `GROUP BY`, `HAVING`, and `JOIN` statements. In MongoDB, aggregation pipelines allow you to achieve the same results by passing data through multiple **stages**, each performing a specific transformation.
88

99
---
1010

11-
### Why Use Aggregation?
11+
### Why use aggregation?
1212

13-
- **Efficient Processing:** Aggregation pipelines process data within the database engine, reducing the need for client-side computations.
14-
- **Scalability:** Designed to handle large datasets efficiently.
15-
- **Powerful Transformations:** Enables complex data transformations, similar to `GROUP BY`, `JOIN`, and computed fields in SQL.
13+
- **Efficient processing:** Aggregation pipelines process data within the database engine, reducing the need for client-side computations.
14+
- **Scalability:** They're designed to handle large datasets efficiently.
15+
- **Powerful transformations:** They enable complex data transformations, similar to `GROUP BY`, `JOIN`, and computed fields in SQL.
1616

1717
---
1818

@@ -29,7 +29,7 @@ In SQL, you achieve complex queries using `SELECT`, `WHERE`, `GROUP BY`, `HAVING
2929

3030
---
3131

32-
### Basic Structure of an Aggregation Pipeline
32+
### Basic structure of an aggregation pipeline
3333

3434
An aggregation pipeline consists of multiple **stages**, where each stage processes and transforms the data before passing it to the next stage.
3535

@@ -46,9 +46,9 @@ Each stage uses a specific **operator** (like `$match`, `$project`, or `$group`)
4646

4747
---
4848

49-
### Example: Aggregation Pipeline Overview
49+
### Example: Aggregation pipeline overview
5050

51-
#### SQL Query:
51+
#### SQL query:
5252

5353
```sql
5454
SELECT title, available
@@ -57,7 +57,7 @@ WHERE available > 5
5757
ORDER BY available DESC;
5858
```
5959

60-
#### Equivalent MongoDB Aggregation:
60+
#### Equivalent MongoDB aggregation:
6161

6262
```js
6363
db.books.aggregate([

0 commit comments

Comments
 (0)