Hi Guys,


We currently thinking of how we can get type safety when we do queries, one 
thing we do is have a category nodes, so e.g.

Here is a sample query



IEnumerable<User> list = 
g.v(0).outE[[label:'HOSTS']].inV[[Key:'MyCompanyName']].inE[[label:'IS_COMPANY']].inV



So the part highlighted in bold leverages the category.



However, we could also remove the category node (Agencies) and then just have 
more explicit relationships e.g.

IEnumerable<User> list = 
g.v(0).outE[[label:'HOSTS_AGENCY']].inV[[Key:'MyCompanyName']].





Notice, here we now have a relationship where from the name we can see that the 
types coming back will always be an Agency. This means relationship names have 
information about it's target Node type, making the amount of relationships 
proportional to the number of node types.



What are the advantages/disadvantages of both approaches, which achieve the 
same result?



Regards
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to