I'm trying to evaluate what might work best for the following use-case:
There exists a set of entities that can be represented as a graph. Each vertex in the graph represents an entity, and each (uni-directional edge) represents a child-to-parent relationship. An entity may have multiple parents, and a parent may have multiple child entities. Usually, there is a "master" entity to which all entities can trace back. No entity can be removed. The requirement is that it should be easy to trace all the ancestors of any entity. The following are some conditions on the basis of which I'd like to evalute:
- deep trees (the highest ancestor can be far away) vs. shallow trees (the highest ancestor is usually not far away)
- broad traversal paths (a vertex can have many parents) vs. narrow traversal paths (a vertex usually does not have many parents)
- any other important conditions that I've missed
Using this graph as an example:
In a regular DynamoDB-like database, this would be represented as:
-------------------
entity | parents |
-------------------
A | [] |
-------------------
B | [A] |
-------------------
C | [A] |
-------------------
D | [A] |
-------------------
E | [B, C, D]|
-------------------
F | [C, D] |
-------------------
A pre-existing condition is:
I'm far more familiar with DynamoDB, but have only very basic familiarity with NeptuneDB or any graph database, and therefore DynamoDB requires lesser up-front time investement. On other hand, NeptuneDB is of course better suited for relationship-graph storage, but under what conditions is it worth the technical overhead?