Abstract
Relational databases (RDBs) serve as the backbone of modern data warehousing but often obscure latent semantic relationships within rigid schemas. This paper introduces RDB2Graph, a two-phase framework designed to transform standard RDBs into semantically rich directed graphs. By separating the conversion into an initial "intra-tuple" mapping phase and a subsequent "inter-vertex" relationship phase, RDB2Graph enables the capture of complex, implicit connections—such as chronological event sequences—that traditional mapping tools often overlook.
Introduction
While graph data mining is a powerful tool for uncovering patterns in social or biochemical domains, its application to relational databases is hindered by the "relationship-poor" nature of raw RDB schemas. Existing standards, such as the W3C’s RDB to RDF Mapping Language (R2RML), face significant challenges in combining multiple attributes into single vertices and representing relationships not explicitly defined by foreign keys. RDB2Graph addresses these gaps by providing a flexible framework for injecting domain logic into the transformation process.
Methodology: The Two-Phase Conversion
The core of RDB2Graph is a decoupled conversion process that allows for granular control over how data is modeled.
Phase I: Tuples to Edges
In the first phase, the framework focuses on discovering relationships within individual rows (tuples). Users define rules to map specific attributes to source and target vertices. A critical innovation here is the use of key aliases, which allow the system to recognize that different column names (e.g., p_id and patient_no) refer to the same semantic entity, ensuring they are consolidated into a single vertex in the resulting graph.
Phase II: Vertices to Edges
The second phase represents the framework's most significant contribution. It analyzes the vertices generated in Phase I to establish new relationships based on logical rules. For example, a rule can link two "hospital visit" vertices if they share a common Patient ID and occur sequentially in time. This allows the graph to represent a "flow" or trajectory that was never explicitly defined in the original relational structure.
Implementation and Performance
The framework is implemented in a tool called SRCGraphModeler (SGM). To manage the computational demands of large-scale RDBs, SGM converts mapping rules into PL/SQL procedures that execute directly on the database server (e.g., Oracle 11g). This server-side execution minimizes the overhead associated with moving massive datasets to external applications, ensuring practical scalability.
Case Study: Medical Record Analysis
The utility of RDB2Graph was demonstrated using a dataset of medical records for diabetes patients. By converting flat relational tables into a graph model, the authors were able to apply graph analysis techniques to identify correlations between specific medications and patient symptoms. This approach provided a more intuitive and semantically rich view of patient histories compared to traditional query methods.
Conclusion and Future Work
RDB2Graph successfully bridges the gap between relational storage and graph-based analysis by modeling "nearest later date" relationships and other complex semantics. Future research will focus on quantifying the impact of the transformation on information content and semi-automating the discovery of conversion rules to reduce the reliance on manual user definitions.
Summary updated