M001: MongoDB Basics

김하영·2022년 9월 20일
0

1~3 장은 실무에서 몽고 DB 쓰면서 알고 있던 내용!

4장

  • Query Operators : Comparison ( 쿼리 연산자 : 비교 )
  1. UpdateOperators
  • Inc / set / unset
  1. Query Operators
  • Comparison Operators

  • eq / ne / lt / gt / lte / gte

  • Logic Operators

  • And / or / nor / not


  • $nor은 여러 개의 조건을 모두 만족하지 않는 다큐먼트를 찾는다.
    조건1, 조건2 등등을 모두 만족하지 않아야한다.

  • { $nor: [{ 조건1 }, { 조건2 }, ...] }

  • $not은 뒤의 조건을 만족하지 않는 필드를 찾는다. $nor의 단일 버전.

  • Expressive Operators

  • expr : 두 값을 비교하는 연산자

  • Array Operators

  • find() 시, size / all

  • Array Operators and Projection

  • 1로 정의된 필드만 출력 / 0 으로 정의하면 미출력

  • elemMatch

  • Querying Arrays and Sub-Documents

  • . 으로 sub-Documents 접근 가능!

5장

  • Aggregation Framework

  • 순서대로 filter 을 통과한다!

  • agg framework > MQL

  • pipline stages in order

  • $ (syntax) : $group ( $sum 이랑 같이 많이 사용됨)

  • 근데 spring-data 에서 aggregation 쓰면 성능 안좋다 했는데 그때 몽고 설명할 때, 또 이제 괜찮다 한 기억이...?
    ---> find 로 할 수 있는 거는 find 를 쓰고, aggregation 필요하면 쓸 수 밖에 없다!

  • sort() & limit()

  • 1 (오름) / -1 (내림)

  • sort().limit() 을 하던 limit().sort() 를 하던 똑같다!

  • index

  • data modeling

  • upsert

  • true : Coditional updates

  • false : Update an existing document / insert an new document

6장

  • data explorer features

  • atals 기능 괜찮네~ java 코드로 바꿔주기 괜찮네~

  • compass : MongoDB's Graphical User Interface Product

( 영어로 설명해서.. 몽고 db + 영어 공부하는 느낌.. 내용은 간단하다! )

profile
Back-end Developer

0개의 댓글