Mongo DB(몽고 DB) 키워드로 공부하기 4
- 명령어 정리 Aggregation, Join
2023.04.19 - [Book & Lecture/Database] - Mongo DB 3 - Replication 및 Write&Read concerns
Aggregation 명령어
group
unwind
..
100% (durable)
$addToSet
array of unique expression values
$avg
average of numerical values
$first/$last value from the first or last document for each group $max/$min
highest or lowest expression value for each group
$mergeObjects document combined by input documents for each group $push
array of expression values for each group
$stdDevSamp
sample standard deviation of the input values
$sum
sum of numerical values
Join ($lookup)
mongoDB
SQL join !
More grouping ! $bucket
lookup
$bucketAuto
$facet
$sortByCount : pipeline [ $group {} , $sort {} ]
..
$set
Add extra fields without $projecting all of them $out
Write results to a new collection
$merge
Update an existing collection
$replaceRoot
Create a whole new shape of top-level document $sample
Choose a random set of docs from the input
'Book & Lecture > Database' 카테고리의 다른 글
Mongo DB 5(Finished) - Modeling (0) | 2024.05.12 |
---|---|
Mongo DB 3 - Replication 및 Write&Read concerns (0) | 2023.04.21 |
Mongo DB 2 - 인덱싱(index) (0) | 2023.04.20 |
Mongo DB 1 - 개요/CRUD함수/Array/정렬 (0) | 2023.04.19 |