cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

BROTHER relation in famely tree project

I read about some family tree projects by neo4j , as I want to search more side way than up and down so after connecting the parents to family or marriage node and connecting the children with CHILD relation , to add BRO/SIS _OF relation between them (as base for looking for nieces and cousins )
would it work not to connect each of them to all other, but to use chain (A) -(BRO/SIS _OF) --> (B) ,(B) -(BRO/SIS _OF)-->(C), (C)- (BRO/SIS _OF) -->(D)
without creating explicit relation between A and D?

1 REPLY 1

llpree
Graph Buddy

If you have a correct tree structure, you don't need to "jump around", just define the path that meets the question. I.e., I don't need to model in the graph a "grandfather" connection with me and him. It's the path that crosses my father. Breadth vs. Depth searches/paths give you sister, cousins and so on. It's one of the facets of graphs over Cartesian storage systems that's so elegant and powerful. The only challenge for governance is to keep the relationships clear and simple and use the paths to define those crazy 2nd cousin, twice removed. Remembering it's a path and not an attribute is key. HTH.