How to Model Family Relationships

Curious if anyone can share best model to capture family relationships?

For my application I have to assume that I wont have a complete genealogy for an entire population, but instead may have portions of a population. Given this constraint, is creating a RELATIVE_OF relationship between persons and creating an attribute to describe the relationship (Child|Spouse|etc) an okay approach?


Check out the Facebook group Graphs for Genealogists. It is Neo4j based. Graphs For Genealogists « Genealogy Software Reviews

1 Like

Hi @HealthDataGuy,

Great Question. You definitely can take that approach. Something to consider is how you will be using the graph. When you are looking to create efficient queries you want the values that are part of your query to be at the node or relationship level. For example if you want to find a "Child" attribute relationship, you will have to navigate through all the RELATIVE_OF relationships and then check to see if the attribute "Child" is in the relationship property. It is often more efficient to make SPOUSE_OF, CHILD_OF relationships to expedite the query.

The art of the Data Model is about taking into account your most frequent use cases and optimizing the model to support efficient use. Let us know if you have any additional questions.


1 Like