title: using ArangoDb / OrientDb for hierarchical data model and document search: is the right solution?
body: <p>i'm developing a document management software and i'm evaluation a noSql database for storage and search data.</p>
  
  <p>Summary the software act like a file system when items are organized in directory and subdirectory.</p>
  
  <p>Each item of the tree can have n properties used for filter and sort.</p>
  
  <p>Items can also be eventually connected each other with some kind of other relations (other than parent-child).</p>
  
  <p>Items count could be relative large (some millions) and the killer features of the application has to be 
  costant performance in retrieve data (with filters and sort by properties) indipendently from database grow.</p>
  
  <p>I need 3 key feature:</p>
  
  <ul>
  <li><p>Get direct childs of a folder. result must be pageable, sortable and filterable for each document property</p></li>
  <li><p>Get all childs of a folder (all items of the subtree). result must be pageable, sortable and filterable for each document property</p></li>
  <li><p>Get all parents of a folder</p></li>
  </ul>
  
  <p>I'm a newbie in noSql and actually i use a rdbms (Sql Server) but i hit with performance issue and all limits caused by a fixed schema for document properties.
  I'm evaluating OrangoDb or OrientDb because i think that it's feature (document oriented and graph oriented) could be the best solution for my design needs.</p>
  
  <p>Can you help me, giving me a suggestion for design the database and the query for this 3 task?</p>
  
  <p>Nb. i need that the result of the query return a dataset with a column for each property:</p>
  
  <pre><code>Es. doc1: p1: v1, p2: v2
      doc2: p1: v1, p3: v3
  
  result:
      name | p1 | p2 | p3
      doc1   v1   v2   null
      doc2   v1   null v3
  </code></pre>
  
  <p>I'm thinking design an item as:</p>
  
  <pre><code>{ 
    "_id": "_myItemId",
    "name`enter code here`" : "Item1",
    "itemType": "root / folder / file"   
    "parentItemId": "",
    "properties" : [ 
      { name: "Property1", formatType: 0, formatMask: "", value: "Value1" }, 
      { name: "Property2", formatType: 0, formatMask: "", value: "Value2" }, 
      { name: "Property3", formatType: 0, formatMask: "", value: "Value3" }  
    ] 
  }
  </code></pre>
  
  <p>do you have any suggestions for a design able to solve the 3 key features described above?</p>
  
  <p>Thanks</p>