English

Efficient Handling of SPARQL OPTIONAL for OBDA (Extended Version)

Databases 2018-06-19 v2

Abstract

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

Keywords

Cite

@article{arxiv.1806.05918,
  title  = {Efficient Handling of SPARQL OPTIONAL for OBDA (Extended Version)},
  author = {Guohui Xiao and Roman Kontchakov and Benjamin Cogrel and Diego Calvanese and Elena Botoeva},
  journal= {arXiv preprint arXiv:1806.05918},
  year   = {2018}
}

Comments

technical report for ISWC 2018 paper

R2 v1 2026-06-23T02:31:09.902Z