Link Roundup: Hierarchical Data in Document Databases
Specifically MongoDB, but also for CouchDB. I needed a simple way to store a hierarchy, and here’s some links:
- The “classic” sitepoint article: storing hierarchical data in a database
- From Oracle, some information about materialized paths, also in SQL
- The best overview so far, Sean Cribb’s Modeling a Tree in a Document Database
- A question and answer on StackOverflow, which links to this thread on the MongoDB google group
- An entry on the CouchDB wiki, and a related article about trees in CouchDB
- My simple mongo_mapper-based solution, which is naive and not robust but gets the job done for now. My solution uses some cues from the dm-is-nested-set API.