In a real life almost any project deals with the tree structures.
Different kinds of taxonomies, site structures etc require modelling
of hierarhy relations. In this article I will illustrate using first
three of five typical approaches of operateting with hierarchy data
on example of the MongoDB database. Those approaches are:
Model Tree Structures with Child References
Model Tree Structures with Parent References
Model Tree Structures with an Array of Ancestors
Model Tree Structures with Materialized Paths
Model Tree Structures with Nested Sets
The 2nd part of the article is available here and all the code is on GitHub
This blog is called myNoSQL and it is written by me, Alex Popescu, a software architect with a passion for open source and communities.
It records my readings, learnings, and opinions on NoSQL databases, polyglot persistence, and distributed systems -- subjects that I'm passionate about.
The opinions expressed here are my own, and no other party necessarily agrees with them.
If you feel I'm biased, I probably am.