1.

Which of the following pattern is more straightforward to use?(a) Materialized Paths(b) Array of Ancestors(c) Nested Sets(d) None of the mentionedI got this question in unit test.I'm obligated to ask this question of Model Tree Structures topic in portion Data Models of MongoDB

Answer»

The CORRECT answer is (b) Array of Ancestors

For explanation I would say: The Array of Ancestors pattern STORES each tree node in a document; in ADDITION to the tree node, document stores in an array the ID(s) of the node’s ancestors or path.



Discussion

No Comment Found

Related InterviewSolutions