title: Neo4j graph modelling performance and querability, property to a node or as separate node plus relationship
body: <p>I am teaching myself graph modelling and use Neo4j 2.2.3 database with NodeJs and Express framework. </p>
  
  <p>I have skimmed through the free neo4j graph database book and learned how to model a scenario, when to use relationship and when to create nodes, etc. </p>
  
  <p>I have modelled a vehicle selling scenario, with following structure</p>
  
  <p>NODES</p>
  
  <pre><code>(:VEHICLE{mileage:xxx, manufacture_year: xxxx, price: xxxx})
  (:VFUEL_TYPE{type:xxxx}) x 2 (one for diesel and one for petrol)
  (:VCOLOR{color:xxxx}) x 8 (red, green, blue, .... yellow) 
  (:VGEARBOX{type:xxx}) x 2 (AUTO, MANUAL) 
  </code></pre>
  
  <p>RELATIONSHIPS </p>
  
  <pre><code>(vehicleNode)-[:VHAVE_COLOR]-&gt;(colorNode - either of the colors)
  (vehicleNode)-[:VGEARBOX_IS]-&gt;(gearboxNode - either manual or auto)
  (vehicleNode)-[:VCONSUMES_FUEL_TYPE]-&gt;(fuelNode - either diesel or petrol)
  </code></pre>
  
  <p>Assuming we have the above structure and so on for the rest of the features. 
   <a href="https://i.stack.imgur.com/tHZqJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tHZqJ.png" alt="enter image description here"></a></p>
  
  <p>As shown in the above screenshot (136 &amp; 137 are VEHICLE nodes), majority of the features of a vehicle is created as separate nodes and shared among vehicles with common feature with relationships.</p>
  
  <p>Could you please advise whether roles (labels) like color, body type, driving side (left drive or right drive), gearbox and others should be seperate nodes or properties of vehicle node? Which option is more performance friendly, and easy to query? </p>
  
  <p>I want to write a JS code that allows querying the graph with above structure with one or many search criteria. If majority of those features are properties of VEHICLE node then querying would not be difficult: <br> </p>
  
  <pre><code>MATCH (v:VEHICLE) WHERE v.gearbox = "MANUAL" AND v.fuel_type = "PETROL" AND v.price &gt; x AND v.price &lt; y AND .... RETURN v; 
  </code></pre>
  
  <p>However with existing graph model that I have it is tricky to search, specially when there are multiple criteria that are not necessarily a properties of VEHICLE node but separate nodes and linked via relationship. </p>
  
  <p>Any ideas and advise in regards to existing structure of the graph to make it more query-able as well as performance friendly would be much appreciated. If we imagine a scenario with 1000 VEHICLE nodes that would generate 15000 relationship, sounds a bit scary and if it hits a million VEHICLE then at most 15 million relationships. Please comment if I am heading in the wrong direction. </p>
  
  <p>Thank you for your time.</p>