title: AWS Neptune DB vs. Dynamo DB for entity lineage
body: <p>I'm trying to evaluate what might work best for the following use-case:</p>
  
  <p>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:</p>
  
  <ol>
  <li>deep trees (the highest ancestor can be far away) vs. shallow trees (the highest ancestor is usually not far away)</li>
  <li>broad traversal paths (a vertex can have many parents) vs. narrow traversal paths (a vertex usually does not have many parents)</li>
  <li>any other important conditions that I've missed</li>
  </ol>
  
  <p>Using this graph as an example:</p>
  
  <p><a href="https://i.stack.imgur.com/9Qg1n.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9Qg1n.png" alt="graph_db_compare"></a></p>
  
  <p>In a regular DynamoDB-like database, this would be represented as:</p>
  
  <pre><code>-------------------
  entity | parents  |
  -------------------
  A      | []       |
  -------------------
  B      | [A]      |
  -------------------
  C      | [A]      |
  -------------------
  D      | [A]      |
  -------------------
  E      | [B, C, D]|
  -------------------
  F      | [C, D]   |
  -------------------
  </code></pre>
  
  <p>A pre-existing condition is:</p>
  
  <p>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?</p>