Pattern-Based Graph Modeling of Genealogy
Teduh Dirgahayu · 2024
Genealogy, the study of family lineages and histories, traditionally relies on constructing family trees to visualise the connections between ancestors and descendants. These family trees can be effectively modeled using graphs, where nodes represent individuals and edges represent their relationships. A well-defined schema is essential to ensure the integrity and structure of these graphs. This paper presents a novel pattern-based method for constructing a graph schema of genealogy optimised for implementation in graph databases. This research is conducted in three steps: (i) identifying and modeling the pattern, (ii) implementing this pattern within the Neo4j graph database, and (iii) validating the implementation through specific genealogical queries. This research identifies the core family as a foundational pattern for schema development and four distinct variations of the core family, i.e. a complete family, a family of a male and a female person without any children, a family of children without identified parents, and a family of children alongside one parent only. The schema is defined in a graph that borrows some concepts and notations from the UML class diagram. Pattern validation is achieved through a series of queries to retrieve an individual's descendants, ancestors, and siblings. The successful execution of these queries underscores the schema's sufficiency and potential to streamline genealogical research within graph databases.