Menu

Efficient Handling of SPARQL OPTIONAL for OBDA

calendar icon Nov 22, 2018 2879 views
split view icon
video icon
presentation icon
video with chapters icon
video thumbnail
Pause
Mute
speed icon
speed icon
0.25
0.5
0.75
1
1.25
1.5
1.75
2

OPTIONAL is a key feature in SPARQL for dealing with missing information. While this operator is being used extensively, it is also known for its complexity, which can make it challenge to evaluate queries with OPTIONAL efficiently. In this paper, we tackle this challenge in the standard Ontology-Based Data Access (OBDA) setting, where the data is stored in a SQL relational database and is exposed as a virtual RDF graph by the means of an R2RML mapping. We start with a succinct translation of a fragment of SPARQL into Relational Algebra (RA) that fully respects bag semantics and three-valued logic. This translation relies on extensive use of the LEFT JOIN operator and coalesce function. We then propose a number of optimisation techniques for reducing the size and improving the structure of generated SQL queries. Our optimisations capture interactions between JOIN, LEFT JOIN, coalesce and database integrity constraints such as attribute nullability and uniqueness, and foreign key constraints. Finally, we empirically verify effectiveness of our techniques over several OBDA benchmarks.

RELATED CATEGORIES

MORE VIDEOS FROM THE SAME CATEGORIES

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International license.