Getting Started
What is MongoDB?
Install / Config
C.R.U.D. Ops
Data Modeling
Database Mgmt
Data Modeling
Tree structures: Child References
What are "child" references?
.
A special property "children"
Stores an array of _ids of the document one level below in the tree
Why use child references?
.
Used to navigate tree-structured or hierarchical data
How do you implement child references in MongoDB?
.
When you save a document, include a "children" property
which stores an array _ids one level below
Can you have both parent and child references?
.
Yes, as shown in the example
+
o
-