SPARQL Query Rewriting with Paths
SPARQL Query Rewriting with Paths
Master of Science in Informatics at Grenoble
Artificial Intelligence and the Web (AIW)
Abdullah Abbas
23 June 2014
Supervisors:
Dr. Jérôme Euzenat, INRIA
Dr. Nabil Layaida, INRIA
Dr. Pierre Genevès, CNRS
Jury:
Prof. Catherine Berrut
Prof. Éric Gaussier
Dr. Noha Ibrahim
Dr. Jean-Marc Vincent
Dr. Pierre Genevès
Dr. Jean-Yves Vion-Dury
1/30
SPARQL Query Rewriting with Paths
RDF (Resource Description Framework)
RDF Triple
<subject> <predicate> <object>
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
2/30
SPARQL Query Rewriting with Paths
RDF (Resource Description Framework)
RDF Triple
<subject> <predicate> <object>
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
p1
“Alice”named
2/30
SPARQL Query Rewriting with Paths
RDF (Resource Description Framework)
RDF Graph
<subject> <predicate> <object>
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
2/30
SPARQL Query Rewriting with Paths
SPARQL Query
RDF Graph
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
3/30
SPARQL Query Rewriting with Paths
SPARQL Query
RDF Graph
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
3/30
SPARQL Query Rewriting with Paths
SPARQL Query
RDF Graph
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
?p
?name
tennis
named
likes
named
likes
named
likes
3/30
SPARQL Query Rewriting with Paths
SPARQL Query
RDF Graph
{
exp:p1 exp:named "Alice".
exp:p1 exp:likes exp:tennis.
exp:p2 exp:named "Bob".
exp:p2 exp:likes exp:soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
?p
?name
tennis
named
likes
named
likes
named
likes
3/30
SPARQL Query Rewriting with Paths
Motivation:
Query evaluation with projection is NP-Complete.
4/30
SPARQL Query Rewriting with Paths
Motivation:
Query evaluation with projection is NP-Complete.
Purpose:
Our purpose is to suppress projection in SPARQL queries.
4/30
SPARQL Query Rewriting with Paths
Motivation:
Query evaluation with projection is NP-Complete.
Purpose:
Our purpose is to suppress projection in SPARQL queries.
How?
We rewrite SPARQL queries in order to eliminate
non-distinguished variables.
4/30
SPARQL Query Rewriting with Paths
Example
Consider the following SPARQL query:
SELECT ?book
WHERE
{
?book rdf:type exp:book.
?book exp:author ?author.
?author exp:name "Donald Knuth".
?library exp:sells ?book.
?library exp:in ?city.
?city exp:name "Paris"
}
5/30
SPARQL Query Rewriting with Paths
Example
Transformation!
SELECT ?book
WHERE
{
?book rdf:type exp:book.
?book exp:author/exp:name "Donald Knuth".
?book ^exp:sells/exp:in/exp:name "Paris"
}
6/30
SPARQL Query Rewriting with Paths
Example
Consider the following SPARQL query:
SELECT ?book
WHERE
{
?book rdf:type exp:book.
?book exp:author ?author.
?author exp:name "Donald Knuth".
?library exp:sells ?book.
?library exp:in ?city.
?city exp:name "Paris"
}
Transformation!
SELECT ?book
WHERE
{
?book rdf:type exp:book.
?book exp:author/exp:name "Donald Knuth".
?book ^exp:sells/exp:in/exp:name "Paris"
}
7/30
SPARQL Query Rewriting with Paths
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
8/30
SPARQL Query Rewriting with Paths
SPARQL
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
9/30
SPARQL Query Rewriting with Paths
SPARQL
Fragments
SPARQL Query (AND, UNION, OPTIONAL, FILTER)
Basic SPARQL Query
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
.
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
10/30
SPARQL Query Rewriting with Paths
SPARQL
Fragments
SPARQL Query (AND, UNION, OPTIONAL, FILTER)
AND
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
.
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
11/30
SPARQL Query Rewriting with Paths
SPARQL
Fragments
SPARQL Query (AND, UNION, OPTIONAL, FILTER)
AND
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
.
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
UNION
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
UNION
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
11/30
SPARQL Query Rewriting with Paths
SPARQL
Fragments
SPARQL Query (AND, UNION, OPTIONAL, FILTER)
OPTIONAL
SELECT ?name, ?other
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
OPTIONAL
{
?p exp:likes ?other.
?p exp:named ?name.
}
12/30
SPARQL Query Rewriting with Paths
SPARQL
Fragments
SPARQL Query (AND, UNION, OPTIONAL, FILTER)
OPTIONAL
SELECT ?name, ?other
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
}
OPTIONAL
{
?p exp:likes ?other.
?p exp:named ?name.
}
FILTER
SELECT ?name
WHERE
{
?p exp:likes exp:tennis.
?p exp:named ?name.
?p exp:age ?age
FILTER (?age<20)
}
12/30
SPARQL Query Rewriting with Paths
SPARQL
Paths
Paths
In SPARQL 1.1 called property path patterns.
Syntax Form Example
ˆp Bob ^likes Alice ≡ Alice likes Bob
p1/p2 Alice likes/in Paris
p1|p2 Grenoble train|bus Lyon
p∗ Alice parent* Bob
p+ Alice parent+ Bob
p? Alice likes? ?x
!p
(p)
13/30
SPARQL Query Rewriting with Paths
Related Works
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
14/30
SPARQL Query Rewriting with Paths
Related Works
Related Works I
SPARQL Query Optimization
Michael Schmidt, Michael Meier, Georg Lausen. Foundations of
SPARQL Query Optimization. In Proc. ICDT, New York (NY, US), pp4-33,
2010
Jorge Pérez, Marcelo Arenas, Claudio Gutierrez. Semantics and
complexity of SPARQL. ACM Transactions on Database Systems
34(3):16, 2009
F. Alkhateeb, J. Baget and J. Euzenat, ’Constrained Regular
Expressions in SPARQL’, iss -6360, p. 23, 2007.
Description Logics
D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini and R. Rosati,
’Tractable Reasoning and Efficient Query Answering in Description
Logics: The DL-Lite Family’, Journal of Automated Reasoning, vol 39,
iss 3, pp. 385-429, 2007.
15/30
SPARQL Query Rewriting with Paths
Related Works
Related Works II
SPARQL Static Analysis
Melisachew Wudage Chekol. Static analysis of semantic web queries.
Thése d’informatique, Université de Grenoble, 2012
16/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
17/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) =
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) =
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) =
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) = αx(P) ∪ ¯αx(P)
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) = δx(αx(P)) ∪ ¯αx(P)
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P)
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P)
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
SPARQL Query Rewriting
PART 1: We define a variable eliminating function:
ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P)
1 We get the property path patterns that contain ?x.
2 We adjust the position of ?x to become in subject position
for all of the property path patterns.
3 We define a supplementary transformation function (ζ ).
4 AND, UNION, OPTIONAL, and FILTER are conserved in
position.
PART 2: We apply the variable eliminating function to
each non-distinguished variable in a query.
Transformation complexity: O(n3
)
18/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Non-Eliminatable Variables
CASE 1: Free variable
Variable that only has relations with itself.
CASE 2: Variable appearing in a FILTER
If eliminated, the filter constraint will loose reference to
the variable.
19/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Non-Eliminatable Variables
CASE 1: Free variable
Variable that only has relations with itself.
CASE 2: Variable appearing in a FILTER
If eliminated, the filter constraint will loose reference to
the variable.
19/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 1
Single Property Path Pattern
?x P1 O1
20/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 1
Single Property Path Pattern
?x P1 O1
can be rewritten as:
O1 ^P1/P1 O1
20/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 2
Double Property Path Patterns
{
?x P1 O1.
?x P2 O2
}
21/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 2
Double Property Path Patterns
{
?x P1 O1.
?x P2 O2
}
can be rewritten as:
{
O1 ^P1/P2 O2
}
21/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Suggestion:
Using property path expression
O1 ^P1/P2/^P2/P3 O3
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Suggestion:
Using property path expression
O1 ^P1/P2/^P2/P3 O3
xO1
O2
O3
P1
P2
P3
y
P2
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Path 1
Path 2
Suggestion:
Using conjunction of paths
{
O1 ^P1/P2 O1.
O1 ^P1/P3 O3
}
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Path 1
Path 2
Suggestion:
Using conjunction of paths
{
O1 ^P1/P2 O1.
O1 ^P1/P3 O3
}
x
O1
O2
O3
P1
P2
P3
yP1
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Path 1
Path 3 Path 2
Adopted transformation:
Cycle
{
O1 ^P1/P2 O1.
O2 ^P2/P3 O3.
O3 ^P3/P1 O1
}
22/30
SPARQL Query Rewriting with Paths
SPARQL Query Rewriting
Suplementary tranformation rule 3
Multiple Property Path Patterns
{
?x P1 O1.
?x P2 O2.
?x P3 O3
}
x
O1 O2
O3
P1 P2
P3
Path 1
Path 3 Path 2
Adopted transformation:
Cycle
{
O1 ^P1/P2 O1.
O2 ^P2/P3 O3.
O3 ^P3/P1 O1
}
x
O1 O2
O3
P1
P2
P3
yz
P1
P2
P3
x
O1 O2
O3
P1
P2
P3
y
P1
P2
x
O1 O2
O3
P1
P2
P3
y
P1
P3
x
O1 O2
O3
P2
P3
y
P1
P2
P3
22/30
SPARQL Query Rewriting with Paths
Constrained Datasets
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
23/30
SPARQL Query Rewriting with Paths
Constrained Datasets
Constrained Datasets
Desired result:
x
O1 O2
O3
P1 P2
P3
Path 1
Path 3 Path 2
Undesired results:
x
O1 O2
O3
P1
P2
P3
yz
P1
P2
P3
x
O1 O2
O3
P1
P2
P3
y
P1
P2
x
O1 O2
O3
P1
P2
P3
y
P1
P3
x
O1 O2
O3
P2
P3
y
P1
P2
P3
Constraint 1: Acyclic graph
Constraint 2: Functionality of properties
24/30
SPARQL Query Rewriting with Paths
Constrained Datasets
Constrained Datasets
Desired result:
x
O1 O2
O3
P1 P2
P3
Path 1
Path 3 Path 2
Undesired results:
x
O1 O2
O3
P1
P2
P3
yz
P1
P2
P3
x
O1 O2
O3
P1
P2
P3
y
P1
P2
x
O1 O2
O3
P1
P2
P3
y
P1
P3
x
O1 O2
O3
P2
P3
y
P1
P2
P3
Constraint 1: Acyclic graph
Constraint 2: Functionality of properties
24/30
SPARQL Query Rewriting with Paths
Constrained Datasets
Constrained Datasets
Desired result:
x
O1 O2
O3
P1 P2
P3
Path 1
Path 3 Path 2
Undesired results:
x
O1 O2
O3
P1
P2
P3
yz
P1
P2
P3
x
O1 O2
O3
P1
P2
P3
y
P1
P2
x
O1 O2
O3
P1
P2
P3
y
P1
P3
x
O1 O2
O3
P2
P3
y
P1
P2
P3
Constraint 1: Acyclic graph
Constraint 2: Functionality of properties
24/30
SPARQL Query Rewriting with Paths
Dealing with Non-Constrained Datasets
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
25/30
SPARQL Query Rewriting with Paths
Dealing with Non-Constrained Datasets
Dealing with Non-Constrained Datasets
𝜁 𝑥(𝜁 𝑦(𝑃))
26/30
SPARQL Query Rewriting with Paths
Dealing with Non-Constrained Datasets
Dealing with Non-Constrained Datasets
𝜁 𝑥(𝜁 𝑦(𝑃))
26/30
SPARQL Query Rewriting with Paths
Conclusion
Table of Contents
1 SPARQL
Fragments
Paths
2 Related Works
3 SPARQL Query Rewriting
4 Constrained Datasets
5 Dealing with Non-Constrained Datasets
6 Conclusion
27/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Conclusion
Motivation: Non-distinguished variable elimination
reduces the computation complexity.
Finding: Non-distinguished variable elimination is not
always possible.
Contribution 1: We proposed a query transformation
function that eliminates non-distinguished variables
where such elimination is possible.
Our transformation function is always complete but not
always sound.
Contribution 2: We defined constraints that makes our
transformation complete and sound.
Contribution 3: We proposed an alternative solution for
dealing with non-constrained datasets.
28/30
SPARQL Query Rewriting with Paths
Conclusion
Further Perspectives
Static analysis of SPARQL queries (containment,
equivalence):
The completeness of our transformation function in
general, and its soundness and completeness in specific
environments are basic ideas, over which we can build
further SPARQL query analysis.
The impact of ontologies on our transformation and how
to take advantage of them
29/30
SPARQL Query Rewriting with Paths
Conclusion
Further Perspectives
Static analysis of SPARQL queries (containment,
equivalence):
The completeness of our transformation function in
general, and its soundness and completeness in specific
environments are basic ideas, over which we can build
further SPARQL query analysis.
The impact of ontologies on our transformation and how
to take advantage of them
29/30
SPARQL Query Rewriting with Paths
Conclusion
Thank You
30/30

[Master Thesis]: SPARQL Query Rewriting with Paths

  • 1.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting with Paths Master of Science in Informatics at Grenoble Artificial Intelligence and the Web (AIW) Abdullah Abbas 23 June 2014 Supervisors: Dr. Jérôme Euzenat, INRIA Dr. Nabil Layaida, INRIA Dr. Pierre Genevès, CNRS Jury: Prof. Catherine Berrut Prof. Éric Gaussier Dr. Noha Ibrahim Dr. Jean-Marc Vincent Dr. Pierre Genevès Dr. Jean-Yves Vion-Dury 1/30
  • 2.
    SPARQL Query Rewritingwith Paths RDF (Resource Description Framework) RDF Triple <subject> <predicate> <object> { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } 2/30
  • 3.
    SPARQL Query Rewritingwith Paths RDF (Resource Description Framework) RDF Triple <subject> <predicate> <object> { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } p1 “Alice”named 2/30
  • 4.
    SPARQL Query Rewritingwith Paths RDF (Resource Description Framework) RDF Graph <subject> <predicate> <object> { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 2/30
  • 5.
    SPARQL Query Rewritingwith Paths SPARQL Query RDF Graph { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 3/30
  • 6.
    SPARQL Query Rewritingwith Paths SPARQL Query RDF Graph { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } SPARQL query SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 3/30
  • 7.
    SPARQL Query Rewritingwith Paths SPARQL Query RDF Graph { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } SPARQL query SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } p1 “Alice” tennis p2 “Bob” soccer ?p ?name tennis named likes named likes named likes 3/30
  • 8.
    SPARQL Query Rewritingwith Paths SPARQL Query RDF Graph { exp:p1 exp:named "Alice". exp:p1 exp:likes exp:tennis. exp:p2 exp:named "Bob". exp:p2 exp:likes exp:soccer. } SPARQL query SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } p1 “Alice” tennis p2 “Bob” soccer ?p ?name tennis named likes named likes named likes 3/30
  • 9.
    SPARQL Query Rewritingwith Paths Motivation: Query evaluation with projection is NP-Complete. 4/30
  • 10.
    SPARQL Query Rewritingwith Paths Motivation: Query evaluation with projection is NP-Complete. Purpose: Our purpose is to suppress projection in SPARQL queries. 4/30
  • 11.
    SPARQL Query Rewritingwith Paths Motivation: Query evaluation with projection is NP-Complete. Purpose: Our purpose is to suppress projection in SPARQL queries. How? We rewrite SPARQL queries in order to eliminate non-distinguished variables. 4/30
  • 12.
    SPARQL Query Rewritingwith Paths Example Consider the following SPARQL query: SELECT ?book WHERE { ?book rdf:type exp:book. ?book exp:author ?author. ?author exp:name "Donald Knuth". ?library exp:sells ?book. ?library exp:in ?city. ?city exp:name "Paris" } 5/30
  • 13.
    SPARQL Query Rewritingwith Paths Example Transformation! SELECT ?book WHERE { ?book rdf:type exp:book. ?book exp:author/exp:name "Donald Knuth". ?book ^exp:sells/exp:in/exp:name "Paris" } 6/30
  • 14.
    SPARQL Query Rewritingwith Paths Example Consider the following SPARQL query: SELECT ?book WHERE { ?book rdf:type exp:book. ?book exp:author ?author. ?author exp:name "Donald Knuth". ?library exp:sells ?book. ?library exp:in ?city. ?city exp:name "Paris" } Transformation! SELECT ?book WHERE { ?book rdf:type exp:book. ?book exp:author/exp:name "Donald Knuth". ?book ^exp:sells/exp:in/exp:name "Paris" } 7/30
  • 15.
    SPARQL Query Rewritingwith Paths Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 8/30
  • 16.
    SPARQL Query Rewritingwith Paths SPARQL Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 9/30
  • 17.
    SPARQL Query Rewritingwith Paths SPARQL Fragments SPARQL Query (AND, UNION, OPTIONAL, FILTER) Basic SPARQL Query SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } . { ?p exp:likes exp:tennis. ?p exp:named ?name. } 10/30
  • 18.
    SPARQL Query Rewritingwith Paths SPARQL Fragments SPARQL Query (AND, UNION, OPTIONAL, FILTER) AND SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } . { ?p exp:likes exp:tennis. ?p exp:named ?name. } 11/30
  • 19.
    SPARQL Query Rewritingwith Paths SPARQL Fragments SPARQL Query (AND, UNION, OPTIONAL, FILTER) AND SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } . { ?p exp:likes exp:tennis. ?p exp:named ?name. } UNION SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } UNION { ?p exp:likes exp:tennis. ?p exp:named ?name. } 11/30
  • 20.
    SPARQL Query Rewritingwith Paths SPARQL Fragments SPARQL Query (AND, UNION, OPTIONAL, FILTER) OPTIONAL SELECT ?name, ?other WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } OPTIONAL { ?p exp:likes ?other. ?p exp:named ?name. } 12/30
  • 21.
    SPARQL Query Rewritingwith Paths SPARQL Fragments SPARQL Query (AND, UNION, OPTIONAL, FILTER) OPTIONAL SELECT ?name, ?other WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. } OPTIONAL { ?p exp:likes ?other. ?p exp:named ?name. } FILTER SELECT ?name WHERE { ?p exp:likes exp:tennis. ?p exp:named ?name. ?p exp:age ?age FILTER (?age<20) } 12/30
  • 22.
    SPARQL Query Rewritingwith Paths SPARQL Paths Paths In SPARQL 1.1 called property path patterns. Syntax Form Example ˆp Bob ^likes Alice ≡ Alice likes Bob p1/p2 Alice likes/in Paris p1|p2 Grenoble train|bus Lyon p∗ Alice parent* Bob p+ Alice parent+ Bob p? Alice likes? ?x !p (p) 13/30
  • 23.
    SPARQL Query Rewritingwith Paths Related Works Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 14/30
  • 24.
    SPARQL Query Rewritingwith Paths Related Works Related Works I SPARQL Query Optimization Michael Schmidt, Michael Meier, Georg Lausen. Foundations of SPARQL Query Optimization. In Proc. ICDT, New York (NY, US), pp4-33, 2010 Jorge Pérez, Marcelo Arenas, Claudio Gutierrez. Semantics and complexity of SPARQL. ACM Transactions on Database Systems 34(3):16, 2009 F. Alkhateeb, J. Baget and J. Euzenat, ’Constrained Regular Expressions in SPARQL’, iss -6360, p. 23, 2007. Description Logics D. Calvanese, G. De Giacomo, D. Lembo, M. Lenzerini and R. Rosati, ’Tractable Reasoning and Efficient Query Answering in Description Logics: The DL-Lite Family’, Journal of Automated Reasoning, vol 39, iss 3, pp. 385-429, 2007. 15/30
  • 25.
    SPARQL Query Rewritingwith Paths Related Works Related Works II SPARQL Static Analysis Melisachew Wudage Chekol. Static analysis of semantic web queries. Thése d’informatique, Université de Grenoble, 2012 16/30
  • 26.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 17/30
  • 27.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 28.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 29.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 30.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = αx(P) ∪ ¯αx(P) 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 31.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = δx(αx(P)) ∪ ¯αx(P) 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 32.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P) 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 33.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P) 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. 18/30
  • 34.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting SPARQL Query Rewriting PART 1: We define a variable eliminating function: ζx(P) = ζ (δx(αx(P))) ∪ ¯αx(P) 1 We get the property path patterns that contain ?x. 2 We adjust the position of ?x to become in subject position for all of the property path patterns. 3 We define a supplementary transformation function (ζ ). 4 AND, UNION, OPTIONAL, and FILTER are conserved in position. PART 2: We apply the variable eliminating function to each non-distinguished variable in a query. Transformation complexity: O(n3 ) 18/30
  • 35.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Non-Eliminatable Variables CASE 1: Free variable Variable that only has relations with itself. CASE 2: Variable appearing in a FILTER If eliminated, the filter constraint will loose reference to the variable. 19/30
  • 36.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Non-Eliminatable Variables CASE 1: Free variable Variable that only has relations with itself. CASE 2: Variable appearing in a FILTER If eliminated, the filter constraint will loose reference to the variable. 19/30
  • 37.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 1 Single Property Path Pattern ?x P1 O1 20/30
  • 38.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 1 Single Property Path Pattern ?x P1 O1 can be rewritten as: O1 ^P1/P1 O1 20/30
  • 39.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 2 Double Property Path Patterns { ?x P1 O1. ?x P2 O2 } 21/30
  • 40.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 2 Double Property Path Patterns { ?x P1 O1. ?x P2 O2 } can be rewritten as: { O1 ^P1/P2 O2 } 21/30
  • 41.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } 22/30
  • 42.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 22/30
  • 43.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Suggestion: Using property path expression O1 ^P1/P2/^P2/P3 O3 22/30
  • 44.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Suggestion: Using property path expression O1 ^P1/P2/^P2/P3 O3 xO1 O2 O3 P1 P2 P3 y P2 22/30
  • 45.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Path 1 Path 2 Suggestion: Using conjunction of paths { O1 ^P1/P2 O1. O1 ^P1/P3 O3 } 22/30
  • 46.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Path 1 Path 2 Suggestion: Using conjunction of paths { O1 ^P1/P2 O1. O1 ^P1/P3 O3 } x O1 O2 O3 P1 P2 P3 yP1 22/30
  • 47.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Path 1 Path 3 Path 2 Adopted transformation: Cycle { O1 ^P1/P2 O1. O2 ^P2/P3 O3. O3 ^P3/P1 O1 } 22/30
  • 48.
    SPARQL Query Rewritingwith Paths SPARQL Query Rewriting Suplementary tranformation rule 3 Multiple Property Path Patterns { ?x P1 O1. ?x P2 O2. ?x P3 O3 } x O1 O2 O3 P1 P2 P3 Path 1 Path 3 Path 2 Adopted transformation: Cycle { O1 ^P1/P2 O1. O2 ^P2/P3 O3. O3 ^P3/P1 O1 } x O1 O2 O3 P1 P2 P3 yz P1 P2 P3 x O1 O2 O3 P1 P2 P3 y P1 P2 x O1 O2 O3 P1 P2 P3 y P1 P3 x O1 O2 O3 P2 P3 y P1 P2 P3 22/30
  • 49.
    SPARQL Query Rewritingwith Paths Constrained Datasets Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 23/30
  • 50.
    SPARQL Query Rewritingwith Paths Constrained Datasets Constrained Datasets Desired result: x O1 O2 O3 P1 P2 P3 Path 1 Path 3 Path 2 Undesired results: x O1 O2 O3 P1 P2 P3 yz P1 P2 P3 x O1 O2 O3 P1 P2 P3 y P1 P2 x O1 O2 O3 P1 P2 P3 y P1 P3 x O1 O2 O3 P2 P3 y P1 P2 P3 Constraint 1: Acyclic graph Constraint 2: Functionality of properties 24/30
  • 51.
    SPARQL Query Rewritingwith Paths Constrained Datasets Constrained Datasets Desired result: x O1 O2 O3 P1 P2 P3 Path 1 Path 3 Path 2 Undesired results: x O1 O2 O3 P1 P2 P3 yz P1 P2 P3 x O1 O2 O3 P1 P2 P3 y P1 P2 x O1 O2 O3 P1 P2 P3 y P1 P3 x O1 O2 O3 P2 P3 y P1 P2 P3 Constraint 1: Acyclic graph Constraint 2: Functionality of properties 24/30
  • 52.
    SPARQL Query Rewritingwith Paths Constrained Datasets Constrained Datasets Desired result: x O1 O2 O3 P1 P2 P3 Path 1 Path 3 Path 2 Undesired results: x O1 O2 O3 P1 P2 P3 yz P1 P2 P3 x O1 O2 O3 P1 P2 P3 y P1 P2 x O1 O2 O3 P1 P2 P3 y P1 P3 x O1 O2 O3 P2 P3 y P1 P2 P3 Constraint 1: Acyclic graph Constraint 2: Functionality of properties 24/30
  • 53.
    SPARQL Query Rewritingwith Paths Dealing with Non-Constrained Datasets Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 25/30
  • 54.
    SPARQL Query Rewritingwith Paths Dealing with Non-Constrained Datasets Dealing with Non-Constrained Datasets 𝜁 𝑥(𝜁 𝑦(𝑃)) 26/30
  • 55.
    SPARQL Query Rewritingwith Paths Dealing with Non-Constrained Datasets Dealing with Non-Constrained Datasets 𝜁 𝑥(𝜁 𝑦(𝑃)) 26/30
  • 56.
    SPARQL Query Rewritingwith Paths Conclusion Table of Contents 1 SPARQL Fragments Paths 2 Related Works 3 SPARQL Query Rewriting 4 Constrained Datasets 5 Dealing with Non-Constrained Datasets 6 Conclusion 27/30
  • 57.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 58.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 59.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 60.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 61.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 62.
    SPARQL Query Rewritingwith Paths Conclusion Conclusion Motivation: Non-distinguished variable elimination reduces the computation complexity. Finding: Non-distinguished variable elimination is not always possible. Contribution 1: We proposed a query transformation function that eliminates non-distinguished variables where such elimination is possible. Our transformation function is always complete but not always sound. Contribution 2: We defined constraints that makes our transformation complete and sound. Contribution 3: We proposed an alternative solution for dealing with non-constrained datasets. 28/30
  • 63.
    SPARQL Query Rewritingwith Paths Conclusion Further Perspectives Static analysis of SPARQL queries (containment, equivalence): The completeness of our transformation function in general, and its soundness and completeness in specific environments are basic ideas, over which we can build further SPARQL query analysis. The impact of ontologies on our transformation and how to take advantage of them 29/30
  • 64.
    SPARQL Query Rewritingwith Paths Conclusion Further Perspectives Static analysis of SPARQL queries (containment, equivalence): The completeness of our transformation function in general, and its soundness and completeness in specific environments are basic ideas, over which we can build further SPARQL query analysis. The impact of ontologies on our transformation and how to take advantage of them 29/30
  • 65.
    SPARQL Query Rewritingwith Paths Conclusion Thank You 30/30