WEBBOOK CHAPTER

MongoDB 8.2, 입문에서 시니어까지: 5장. Embed와 Reference

5장. Embed와 Reference

함께 읽고 함께 변경되며 크기가 제한된 OrderItem snapshot은 Order에 embed한다. 무한 성장 review/comment, 독립 lifecycle customer는 reference를 검토한다.

one-to-few, one-to-many, one-to-squillions 패턴을 access pattern으로 선택한다. duplication의 갱신 책임을 쓴다.