How to express inheritance in (Neo4j) graph database? -


If I have an object "player" that is a subcategory of "person", then how do I express it in the graph?

Here's an example: http://i.stack.imgur.com/adzDF Png

Use multiple labels:

  create. .. (: player: person {name: 'a player'}) ...  

Normally you specify all the labels above the heritage tree. By doing such a

  match (: person) return n  

will also return all the players.


Comments