I am designing an extended family tree using Neo4j. During the design of the relationships I came up with two approaches:
CREATE (p:Person)-[:PARENT_OF]->(s:Person) CREATE (p:Person)-[:STEPPARENT_OF]->(s:Person) CREATE (p:Person)-[:MARRIED_TO]->(s:Person)
With this approach I am creating different relationships for every case (keep in mind that there will be a lot of cases = a lot of relationships)
CREATE (p:Person)-[r:PARENT_OF {type:'natural'}]->(s:Person) CREATE (p:Person)-[r:PARENT_OF {type:'step'}]->(s:Person) CREATE (p:Person)-[r:SPOUSE_OF {type:'marriage'}]->(s:Person)
With this approach there will be less relationships but the design is a little bit messy.
I would like to know which approach will be better and why?