SPARQL - Where are we? Current state, theory and practice

After the data and ontology layers of the Semantic Web stack have achieved considerable stability, the query layer, realized by SPARQL, is the next item on W3C’s agenda. Short before its completion, we will take the opportunity to reflect on the current state of the language, its applications, recent results on theoretical foundations, and also future challenges. This tutorial will teach SPARQL along two complementary streams: On the one hand, we will provide a practical introduction for newcomers, giving examples from various application domains, providing formal underpinnings and guiding attendees through the jungle of existing implementations, including those which reach beyond the current specification to query more expressive semantic web languages. On the other hand, we will go further into the theoretical foundations of SPARQL, presenting recent results of SPARQL’s complexity, formalization in terms of database theory, as well as its exact semantic relation to the other building blocks in the SW stack, namely, RDF Schema, OWL and the rules layer. 1 Motivation and Objectives After the data and ontology layers of the Semantic Web stack have achieved considerable stability through standard recommendations such as RDF and OWL, the query layer is the next item to be completed on W3C’s agenda. This layer is realized by the SPARQL Protocol and RDF Query Language (SPARQL) currently under development by W3C’s Data Acceess working group (DAWG). Although the SPARQL specification is not yet 100% stable, people are taking up this specification at tremendous pace, driven by the strong need for a long awaited standard in querying the Semantic Web and being able of making use of the advantages of RDF together with common metadata-vocabularies at large scale. This is just the right moment to reflect on the current state of the language and its applications. The contributions of this tutorial will be along two complementary main streams: On the one hand we will provide a practical introduction to SPARQL for newcomers, giving examples from various application domains, providing formal underpinnings and guiding attendees through the jungle of existing implementations, including those which reach beyond the current specification to query more expressive semantic web languages. Thus, participants will get a clear sense of the language as it is specified and as it exists in implementations. On the other hand, we will go further going into the theoretical foundations of SPARQL, presenting recent results of SPARQL’s complexity, and its exact semantics relation to the other building blocks in the SW stack, namely, RDF Schema, OWL and the upcoming rules layer. Finally, we will bring these two streams together, identifying the current limitations and challenges around SPARQL, pointing to possible extensions and emerging application fields. After the tutorial, attendees new to SPARQL should be able to formulate queries, understand the differences and overlaps of SPARQL with traditional Database query languages and have sufficient insight to understand issues in existing SPARQL engines that might affect their applications. The theoretical background given in the afternoon session will provide deeper understanding of SPARQL’s underlying semantics and complexity. Moreover, we will provide a detailed picture of SPARQL’s position in the space of related Semantic Web standards. Finally, we will give an outlook to emerging research challenges and possible future directions. 2 Outline The tutorial will be divided in two main parts: The morning part covering primarily the practical side of SPARQL, and an afternoon part going more into depth towards the foundational aspects of SPARQL and discussing Semantic Web data access in the bigger context of related standards. More specifically, the tutorial will be organized in six units, where Units 1-3 mark the morning part and Units 4-6 the afternoon part, as follows. Unit 1 – SPARQL Basics (90min) The first Unit is tailored to give a gentle introduction to all the features of SPARQL, starting from simple queries towards more complex less used, but interesting features of the language. In this session we aim to guide new users, but also users already roughly familiar with SPARQL, through all major features of the language. Moreover, we will provide interesting insights in design rationale and requirements which guided the inclusion of these features in the process of the working group. Unit 2 – SPARQL Semantics (45min) In this Unit we will present the algebra underlying and defining a formal semantics for SPARQL. The formal semantics presented here will be exemplified by several examples from the first unit and practical users of the language will get sufficient insight to understand the formal underpinnings of SPARQL. Here, we will restrict ourselves to only the level of detail necessary to understand implementation aspects covered in Unit 3. More in-depth considerations on theoretical foundations will be covered in Unit 4. Unit 3 – SPARQL Implementations and Applications (45min) First, presenting some basic implementation strategies for SPARQL, we will present several actual implementations and their actual deployment in use cases. The focus in this Unit is to give practitioners hints on tools and available implementations, APIs which they can use off-the-shelf or optimize in order to develop Semantic Web applications on top of SPARQL. This will include examining implementations that go beyond the current specification to evaluate SPARQL queries against RDFS and OWL datasets. Unit 4 – SPARQL Foundations (90min). In this session of the tutorial, we address the database foundations of SPARQL covering: I) Formal aspects of querying RDF data. II) Formal Semantics of SPARQL: algebraic syntax, compositional semantics for a core fragment (continuation of Unit 2). III) Complexity of SPARQL: covering the computational complexity of evaluating a query for several fragments of the language, identifying the main sources of complexity. IV) Ad-hoc optimization procedures: well-designed queries, reordering and normal forms, and optimization based on normal forms. Unit 5 – SPARQL and its neighbour components in the Semantic Web stack (90min). The definitions in the current specification of SPARQL focus mainly on RDF simple entailment. In this unit, we show how they can be extended towards coverage of the ontology layer in terms of RDFS and OWL entailment. As it turns out, this extension is not straightforward and a complete coverage of SPARQL imposes new challenges on OWL Reasoners. Next, we will study the emerging Semantic Web rules layer and its relation to SPARQL. On the one hand, will see that a large part of SPARQL can be mapped to extended Datalog, a deductive rule based query. On the other hand, we will discuss the use of SPARQL itself as a declarative rules language on top of RDF and OWL. As it turns out, the challenges arising in such a combination are closely related to those combining deductive non-monotonic rules languages with Ontologies. Unit 6 – SPARQL Extensions and Outlook (45min). In the last unit of this tutorial, we will discuss further practical extensions of the current standard from simple extensions which simply did not find their way yet in the first version of the specification, to other extensions which seemingly easy will require significant more investigation and raise new research problems. One aim of this unit is to spark further ideas on solving open issues by providing a down-to earth analysis of current limitations of the language. European Semantic Web Conference 2007 Tutorial SPARQL – Where are we? Current state, theory and practice Unit 1: SPARQL Basics