Realizing Bidirectional Virtual Knowledge Graphs Using Ontop

Romuald Esdras Wandji and Diego Calvanese

Proc. of the 14th Int. Joint Conf. on Knowledge Graphs (IJCKG). Lecture Notes in Computer Science. 2025.

The Virtual Knowledge Graph (VKG) paradigm enables querying heterogeneous relational databases through a unified semantic layer comprising an ontology and declarative mappings (typically in R2RML). While querying is well-supported, propagating updates from the virtual RDF graph (ABox) back to the source databases remains a challenge. This paper addresses the problem of translating updates (expressed in SPARQL Update) applied over the ABox into equivalent SQL updates over the underlying databases, specifically within the Ontop VKG system. Key difficulties arise from the non-injectivity inherent in R2RML mappings, where a single ABox update can correspond to multiple source update possibilities, and the potential for these source updates to cause unintended side effects---additional insertions or deletions in the ABox beyond the user's original intent. While relying on Ontop's query rewriting engine, our method employs lineage computation to identify source tuples for deletion and a strategy for handling existential variables during insertion. It generates candidate SQL translations, analyzes their potential side effects on the virtual ABox, and selects the ones that minimize these unintended consequences. This work represents a step toward closing the Linked Data Life Cycle loop, allowing changes in the knowledge graph to be reflected in the corresponding source.


@inproceedings{IJCKG-2025-update,
   title = "Realizing Bidirectional Virtual Knowledge Graphs Using Ontop",
   year = "2025",
   author = "Romuald Esdras Wandji and Diego Calvanese",
   booktitle = "Proc. of the 14th Int. Joint Conf. on Knowledge Graphs
(IJCKG)",
   publisher = "Springer",
   series = "Lecture Notes in Computer Science",
}
pdf