Semantics and complexity of SPARQL

SPARQL is the standard language for querying RDF data. In this article, we address systematically the formal study of the database aspects of SPARQL, concentrating in its graph pattern matching facility. We provide a compositional semantics for the core part of SPARQL, and study the complexity of the evaluation of several fragments of the language. Among other complexity results, we show that the evaluation of general SPARQL patterns is PSPACE-complete. We identify a large class of SPARQL patterns, defined by imposing a simple and natural syntactic restriction, where the query evaluation problem can be solved more efficiently. This restriction gives rise to the class of well-designed patterns. We show that the evaluation problem is coNP-complete for well-designed patterns. Moreover, we provide several rewriting rules for well-designed patterns whose application may have a considerable impact in the cost of evaluating SPARQL queries.

[1]  Raphael Volz,et al.  A Comparison of RDF Query Languages , 2004, SEMWEB.

[2]  Richard Cyganiak,et al.  A relational algebra for SPARQL , 2005 .

[3]  Tomasz Imielinski,et al.  Incomplete Information in Relational Databases , 1984, JACM.

[4]  Marcelo Arenas,et al.  Semantics and Complexity of SPARQL , 2006, International Semantic Web Conference.

[5]  Jeff Z. Pan,et al.  Resource Description Framework , 2020, Definitions.

[6]  Alberto O. Mendelzon,et al.  Foundations of semantic web databases , 2004, PODS.

[7]  Nigel Shadbolt,et al.  SPARQL Query Processing with Conventional Relational Database Systems , 2005, WISE Workshops.

[8]  Edward L. Robertson Triadic Relations: An Algebra for the Semantic Web , 2004, SWDB.

[9]  Arnon Rosenthal,et al.  Outerjoin simplification and reordering for query optimization , 1997, TODS.

[10]  Carlo Zaniolo Database relations with null values , 1982, PODS '82.

[11]  Mihalis Yannakakis,et al.  Algorithms for Acyclic Database Schemes , 1981, VLDB.

[12]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[13]  Catriel Beeri,et al.  On the Desirability of Acyclic Database Schemes , 1983, JACM.

[14]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[15]  Jeremy J. Carroll,et al.  Resource description framework (rdf) concepts and abstract syntax , 2003 .

[16]  Claudio Gutiérrez,et al.  The Expressive Power of SPARQL , 2008, SEMWEB.

[17]  Martin J. Dürst,et al.  Internationalized Resource Identifiers (IRIs) , 2005, RFC.

[18]  Michael Schmidt,et al.  Foundations of SPARQL query optimization , 2008, ICDT '10.

[19]  Marcelo Arenas,et al.  On the Semantics of SPARQL , 2009, Semantic Web Information Management.

[20]  V. Rich Personal communication , 1989, Nature.

[21]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[22]  Georg Gottlob,et al.  The complexity of acyclic conjunctive queries , 2001, JACM.

[23]  Flavius Frasincar,et al.  RAL: An Algebra for Querying RDF , 2002, Proceedings of the Third International Conference on Web Information Systems Engineering, 2002. WISE 2002..

[24]  Vassilis Christophides,et al.  Containment and Minimization of RDF/S Query Patterns , 2005, SEMWEB.

[25]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[26]  Andy Seaborne,et al.  SPARQL - Where are we? Current state, theory and practice , 2007 .

[27]  Balakrishna R. Iyer,et al.  Hypergraph based reorderings of outer join queries with complex predicates , 1995, SIGMOD '95.

[28]  Serge Abiteboul,et al.  On the Representation and Querying of Sets of Possible Worlds , 1991, Theor. Comput. Sci..

[29]  Axel Polleres,et al.  From SPARQL to rules (and back) , 2007, WWW '07.

[30]  Amarnath Gupta,et al.  A Semantic-aware RDF Query Algebra , 2005 .

[31]  Tim Furche,et al.  RDF Querying: Language Constructs and Evaluation Methods Compared , 2006, Reasoning Web.

[32]  Jos de Bruijn,et al.  Logical Reconstruction of Normative RDF , 2005, OWLED.

[33]  E. Prud hommeaux,et al.  SPARQL query language for RDF , 2011 .

[34]  Gerhard Weikum,et al.  ACM Transactions on Database Systems , 2005 .

[35]  Carlo Zaniolo,et al.  Database relations with null values , 1982, J. Comput. Syst. Sci..

[36]  Khalid Ali,et al.  Proof , 2006, BMJ : British Medical Journal.

[37]  Serge Abiteboul,et al.  On the representation and querying of sets of possible worlds , 1987, SIGMOD '87.

[38]  Vassilis Christophides,et al.  RQL: a declarative query language for RDF , 2002, WWW.

[39]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .