-
[MongoDB] embedded documents & arrays공부/MongoDB 2022. 1. 9. 23:18
embedded document
MongoDB에서는 field의 value가 또 하나의 document 형식을 가질 수 있다.
limits :
- 최대 100 levels of nesting
- document 1개의 최대 용량: 16MB
status라는 embedded document를 추가함
embedded document 접근 방법
찾고자하는 value의 path를 " "로 감싸줘야함
array
어떠한 데이터 형식이든 추가 가능 (strings, number, json 등)
hobbies라는 array를 추가함. embedded document가 아님 ❗
array 접근 방법
'공부 > MongoDB' 카테고리의 다른 글
[MongoDB] embedded documents / references 활용 추천 (0) 2022.01.17 [MongoDB] data types (0) 2022.01.11 [MongoDB] projection (0) 2022.01.09 [MongoDB] find( ) (0) 2022.01.09 [MongoDB] CRUD Operations (0) 2022.01.09