What type of NoSQL database is best suited to store hierarchical data? What type of NoSQL database is best suited to store hierarchical data? database database

What type of NoSQL database is best suited to store hierarchical data?


MongoDB and CouchDB offer solutions, but not built in functionality. See this SO question on representing hierarchy in a relational database as most other NoSQL solutions I've seen are similar in this regard; where you have to write your own algorithms for recalculating that information as nodes are added, deleted and moved. Generally speaking you're making a decision between fast read times (e.g. nested set) or fast write times (adjacency list). See aforementioned SO question for more options along these lines - the flat table approach appears most aligned with your question.

One standard that does abstract away these considerations is the Java Content Repository (JCR), both Apache JackRabbit and JBoss eXo are implementations. Note, behind the scenes both are still doing some sort of algorithmic calculations to maintain hierarchy as described above. In addition, the JCR also handles permissions, file storage, and several other aspects - so it may be overkill for your project.


This is graph database.Can be used as tree database.

http://neo4j.com/


What you possibly need is a document-oriented database like MongoDB or CouchDB.

See examples of different techniques which allow you to store hierarchical data in MongoDB:http://www.mongodb.org/display/DOCS/Trees+in+MongoDB