What type of NoSQL database is best suited for storing hierarchical data?

What type of NoSQL database is best suited for storing hierarchical data?

Say, for example, I want to store forum posts with a tree structure:

original post + re: original post + re: original post + re2: original post + re3: original post + re2: original post 
+47
database nosql hierarchical-data tree
Jan 22 2018-11-22T00:
source share
11 answers

This is a graph database. It can be used as a tree database.

http://neo4j.com/

+6
Apr 01 '15 at 12:18
source share
β€” -

MongoDB and CouchDB offer solutions, but not built-in functions. See This SO question representing a hierarchy in a relational database , as most of the other NoSQL solutions I've seen are similar in this regard; where you need to write your own algorithms for recounting this information, as nodes are added, deleted and moved. Generally speaking, you decide between fast read times (for example, a nested set ) or fast write times ( adjacency list ). See the SO question above for more options on these lines. a flat table approach best suits your question.

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

+26
Jan 23 '11 at 17:28
source share

You may need a document-oriented database such as MongoDB or CouchDB .

See examples of various methods that allow you to store hierarchical data in MongoDB: http://www.mongodb.org/display/DOCS/Trees+in+MongoDB

+17
Jan 22 '11 at 14:57
source share

Faced with the same problem, I decided to create my own (very simple) solution using Lua + Redis https://github.com/qbolec/Redis-Tree/

+3
Mar 17 '13 at 12:51
source share
+2
Mar 03 '11 at 13:15
source share

Exist-db implemented a hierarchical data model for saving xml

+2
Apr 13 2018-11-11T00:
source share

Graphical databases probably also solve this problem. If neo4j is not enough for you in terms of scaling, consider Titan , which is based on various back-end hashes, including HBase, and should scale very well. It is not as mature as neo4j, but it is a very promising project.

+2
Apr 13 '14 at 16:01
source share

LDAP, obviously. OpenLDAP will do a short job.

+2
Jun 19 '14 at 12:53 on
source share

Check out MarkLogic . You can download the demo from the website. It is a database for unstructured data and falls under the classification of NoSQL databases. I know that unstructured data is a pretty busy term, but just treat it as data that doesn’t fit very well in RDBMS rows and columns (like hierarchical data).

0
Mar 04 2018-11-11T00:
source share

I just spent the weekend in the training course using MUMUPS db as source code for a complete javascript application development platform. Quality goods! I would recommend the GT.M MUMPS distribution under the GPL. Or try http://sourceforge.net/projects/mumps/?source=recommended for vanilla MUMPS. Check out http://robtweed.wordpress.com/ for the ewd.js js framework and more information on MUMPS.

0
Jun 11 '14 at 20:51 on
source share

There is no answer for you. SQLServer 2008 !!!! This is great for recursive queries. Or you can go the old-fashioned route and store hierarchy data in a separate table to avoid recursion.

I think relational databases work very well with tree data. Both in query performance and ease of use. With one caveat .... you will be inserting into the indexed table and possibly several other indexed tables every time someone makes a message. Inserting performance can be a problem on the facebook forum.

-2
Jan 22 '11 at 14:04
source share



All Articles