Skip to main content
QUICK REVIEW

[Paper Review] On tractable query evaluation for SPARQL

Stefan Mengel, Sebastian Skritek|arXiv (Cornell University)|Dec 24, 2017
Semantic Web and OntologiesComputer Science2 references4 citations
TL;DR

This paper provides a comprehensive characterization of tractable classes for SPARQL queries with the OPTIONAL operator using parameterized complexity, focusing on well-designed and weakly well-designed pattern trees. It identifies FPT algorithms for query evaluation in the absence of projection and offers a complete classification for simple well-designed queries with projection, establishing precise tractability conditions based on query structure and Gaifman graph properties.

ABSTRACT

Despite much work within the last decade on foundational properties of SPARQL - the standard query language for RDF data - rather little is known about the exact limits of tractability for this language. In particular, this is the case for SPARQL queries that contain the OPTIONAL-operator, even though it is one of the most intensively studied features of SPARQL. The aim of our work is to provide a more thorough picture of tractable classes of SPARQL queries. In general, SPARQL query evaluation is PSPACE-complete in combined complexity, and it remains PSPACE-hard already for queries containing only the OPTIONAL-operator. To amend this situation, research has focused on "well-designed SPARQL queries" and their recent generalization "weakly well-designed SPARQL queries". For these two fragments the evaluation problem is coNP-complete in the absence of projection and SigmaP2-complete otherwise. Moreover, they have been shown to contain most SPARQL queries asked in practical settings. In this paper, we study tractable classes of weakly well-designed queries in parameterized complexity considering the equivalent formulation as pattern trees. We give a complete characterization of the tractable classes in the case without projection. Moreover, we show a characterization of all tractable classes of simple well-designed pattern trees in the presence of projection.

Motivation & Objective

  • To address the lack of systematic understanding of tractable SPARQL query classes, especially those involving the OPTIONAL operator.
  • To close the gap in knowledge about the exact limits of tractability for SPARQL queries beyond well-designed fragments.
  • To provide a fine-grained complexity analysis using parameterized complexity, focusing on query size as a parameter.
  • To characterize tractable classes of weakly well-designed SPARQL queries with and without projection.
  • To establish connections between query structure, Gaifman graphs, and tractability, particularly for simple well-designed pattern trees.

Proposed method

  • The authors model SPARQL queries as pattern trees (PTs), with a focus on well-designed (wdPTs) and weakly well-designed (wwdPTs) variants.
  • They employ parameterized complexity, defining tractability as membership in the class FPT, where preprocessing depends only on the query size.
  • For projection-free queries, they derive a complete characterization of tractable classes based on structural properties of the pattern tree.
  • For queries with projection, they provide a characterization of tractable classes within the subclass of simple well-designed pattern trees.
  • They use reductions from quantified conjunctive queries and leverage results from core theory in [CD2012] to establish hardness and tractability conditions.
  • The proposed Algorithm 1 evaluates queries in FPT time by analyzing relevant nodes and query structure, particularly the Gaifman graph.

Experimental results

Research questions

  • RQ1What structural properties of SPARQL queries with OPTIONAL lead to tractable evaluation in parameterized complexity?
  • RQ2How do the limits of tractability differ between projection-free and projection-inclusive SPARQL queries?
  • RQ3Can a complete characterization of tractable classes be given for simple well-designed pattern trees with projection?
  • RQ4To what extent do Gaifman graph properties determine the tractability of SPARQL query evaluation?
  • RQ5What are the inherent barriers to extending tractability results to non-simple well-designed pattern trees with projection?

Key findings

  • The evaluation problem for weakly well-designed pattern trees without projection is in FPT, and a complete characterization of tractable classes is provided.
  • For simple well-designed pattern trees with projection, the paper gives a full characterization of tractable classes based on structural constraints of the query.
  • The tractability of query evaluation is determined by the Gaifman graph structure and the distribution of variables across optional patterns.
  • The results show that the complexity of query evaluation remains FPT as long as the underlying pattern tree satisfies specific structural conditions, even in the presence of projection.
  • The characterization is limited to simple well-designed pattern trees due to unresolved issues in core theory for non-simple queries and quantified conjunctive queries.
  • Algorithm 1 provides an FPT evaluation algorithm that works directly on well-designed pattern trees, even when relations are duplicated, and applies to real-world SPARQL queries.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.