SlideShare a Scribd company logo
SPARQL Query Containment with ShEx Constraints
SPARQL Query Containment with
ShEx Constraints
21st European Conference on Advances in Databases and
Information Systems (ADBIS 2017)
Abdullah Abbas
Pierre Genevès
Cécile Roisin
Nabil Layaïda
24 - 27 September 2017
1/32
SPARQL Query Containment with ShEx Constraints
RDF (Resource Description Framework)
RDF Triple
<subject> <predicate> <object>
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
2/32
SPARQL Query Containment with ShEx Constraints
RDF (Resource Description Framework)
RDF Triple
<subject> <predicate> <object>
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
p1
“Alice”named
2/32
SPARQL Query Containment with ShEx Constraints
RDF (Resource Description Framework)
RDF Graph
<subject> <predicate> <object>
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
2/32
SPARQL Query Containment with ShEx Constraints
SPARQL Query
RDF Graph
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
3/32
SPARQL Query Containment with ShEx Constraints
SPARQL Query
RDF Graph
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
named
likes
named
likes
3/32
SPARQL Query Containment with ShEx Constraints
SPARQL Query
RDF Graph
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
?p
?name
tennis
named
likes
named
likes
named
likes
3/32
SPARQL Query Containment with ShEx Constraints
SPARQL Query
RDF Graph
{
:p1 :named "Alice".
:p1 :likes :tennis.
:p2 :named "Bob".
:p2 :likes :soccer.
}
SPARQL query
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
p1
“Alice”
tennis
p2
“Bob”
soccer
?p
?name
tennis
named
likes
named
likes
named
likes
3/32
SPARQL Query Containment with ShEx Constraints
Supported SPARQL Fragments
Basic SPARQL Query
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
4/32
SPARQL Query Containment with ShEx Constraints
Supported SPARQL Fragments
Basic SPARQL Query
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
UNION
SELECT ?name
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
UNION
{
?p :likes :tennis.
?p :named ?name.
}
4/32
SPARQL Query Containment with ShEx Constraints
Supported SPARQL Fragments
OPTIONAL
SELECT ?name, ?other
WHERE
{
?p :likes :tennis.
?p :named ?name.
}
OPTIONAL
{
?p :likes ?other.
?p :named ?name.
}
5/32
SPARQL Query Containment with ShEx Constraints
ShEx Constraints
ShEx Constraints
<Person> {
:named xsd:string ;
:likes @<Sport>
}
<Sport> {
:category xsd:string
}
RDF Graph 1 (Not valid)
{
:p1 :named "Bob".
:p1 :likes :soccer.
}
RDF Graph 2 (Valid)
{
:p2 :named "Bob".
:p2 :likes :soccer.
:soccer :category "team sports"
}
6/32
SPARQL Query Containment with ShEx Constraints
Motivation:
SPARQL query containment is well studied in the
literature.
Query containment is useful for query planning and
optimization.
7/32
SPARQL Query Containment with ShEx Constraints
Motivation:
SPARQL query containment is well studied in the
literature.
Query containment is useful for query planning and
optimization.
RDF documents in real life applications are constrained.
ShEx is an emerging schema language (FHIR, WebIndex).
Containment without constraints → False negatives
7/32
SPARQL Query Containment with ShEx Constraints
Motivation:
SPARQL query containment is well studied in the
literature.
Query containment is useful for query planning and
optimization.
RDF documents in real life applications are constrained.
ShEx is an emerging schema language (FHIR, WebIndex).
Containment without constraints → False negatives
Purpose:
SPARQL query containment in the presence of ShEx
constraints.
7/32
SPARQL Query Containment with ShEx Constraints
Motivation:
SPARQL query containment is well studied in the
literature.
Query containment is useful for query planning and
optimization.
RDF documents in real life applications are constrained.
ShEx is an emerging schema language (FHIR, WebIndex).
Containment without constraints → False negatives
Purpose:
SPARQL query containment in the presence of ShEx
constraints.
How?
We benefit from existing containment solvers, and ShEx
validators. We apply novel query transformations that does
not increase the complexity of containment.
7/32
SPARQL Query Containment with ShEx Constraints
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
8/32
SPARQL Query Containment with ShEx Constraints
Introduction
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
9/32
SPARQL Query Containment with ShEx Constraints
Introduction
Containment Overview
Containment Overview
Query 1 Query 2
For any dataset, the results of Query 1 are contained in the
results of Query 2.
10/32
SPARQL Query Containment with ShEx Constraints
Introduction
Containment Overview
Containment Overview
Query 1 Query 2
For any dataset, the results of Query 1 are contained in the
results of Query 2.
Containment Solver:
Q1
Q2
Containment
Solver
(𝑸 𝟏 ⊑ 𝑸 𝟐)
(𝑸 𝟏 ⋢ 𝑸 𝟐)
No
Yes
Input queries Results
10/32
SPARQL Query Containment with ShEx Constraints
Introduction
Containment Overview
Containment Overview
Query 1 Query 2
For any dataset, the results of Query 1 are contained in the
results of Query 2.
Example:
RDF Data (Big)
SELECT* {
?x name ?name.
?x role manager. }
Query 1
SELECT * {
?x name ?name.
?x role ?role. }
Query 2 Query 2 Results
Query 1 Results
10/32
SPARQL Query Containment with ShEx Constraints
Introduction
Containment Overview
Containment Overview
Query 1 Query 2
For any dataset, the results of Query 1 are contained in the
results of Query 2.
Example:
RDF Data (Big)
SELECT* {
?x name ?name.
?x role manager. }
Query 1
SELECT * {
?x name ?name.
?x role ?role. }
Query 2 Query 2 Results
Query 1 Results
10/32
SPARQL Query Containment with ShEx Constraints
Introduction
ShEx (Shape Expressions)
ShEx (Shape Expressions)
What is ShEx?
ShEx is an RDF constraint language.
Validate RDF documents
ShEx uses logical operators to define constraints inductively:
e ::= | Σ × Γ | e∗ | e[m;n] | (e|e ) | (e e )
11/32
SPARQL Query Containment with ShEx Constraints
Introduction
ShEx (Shape Expressions)
ShEx (Shape Expressions)
ShEx is an RDF constraint language.
Validate RDF documents
Definition (ShEx Expression)
Given a set of edge labels (Σ), and a set of types (Γ), then
Σ × Γ is a shape expression. ShEx uses logical operators to
define constraints inductively:
e ::= | Σ × Γ | e∗ | e[m;n] | (e|e ) | (e e )
Definition (ShEx Schema)
A ShEx schema is a tuple S = (Σ, Γ, δ), where δ is a type
definition function that maps elements of Γ to shape
expressions e over Σ × Γ.
12/32
SPARQL Query Containment with ShEx Constraints
Introduction
ShEx (Shape Expressions)
Containment with ShEx Definition
Containment with ShEx: Query 1 S Query 2
For any dataset valid with respect to the ShEx schema S, the
results of Query 1 are contained in the results of Query 2.
Containment Solver:
Q1
Q2
Containment
Solver
(𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐)
(𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐)
No
Yes
Input queries & schema Results
Schema (S)
13/32
SPARQL Query Containment with ShEx Constraints
Introduction
ShEx (Shape Expressions)
Containment with ShEx Definition
Containment with ShEx: Query 1 S Query 2
For any dataset valid with respect to the ShEx schema S, the
results of Query 1 are contained in the results of Query 2.
Containment Solver:
Q1
Q2
Containment
Solver
(𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐)
(𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐)
No
Yes
Input queries & schema Results
Schema (S)
Why query containment with ShEx?
More containment cases can be inferred.
13/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
14/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (Conjunctive)
Query 1
SELECT * WHERE {
?p :named ?name .
?p :likes "tennis". }
Query 2
SELECT * WHERE {
?p :named ?name .
?p :plays "soccer" }
Query 1 Query 2
15/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (Conjunctive)
Query 1 (No results)
SELECT * WHERE {
?p :named ?name .
?p :likes "tennis". }
Query 2
SELECT * WHERE {
?p :named ?name .
?p :plays "soccer" }
Query 1 Query 2
More Containment with ShEx?
ShEx Schema (S)
<Person> {
:named xsd:string ;
:plays xsd:string }
Query 1 S Query 2
15/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
SPARQL (with OPTIONALs)
OPTIONAL patterns in queries are more interesting for
query static analysis with constraints:
Semantics: Only get extended results if available.
16/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
SPARQL (with OPTIONALs)
ShEx Schema (S)
<Product> {
:name xsd:string ;
:expiryDate xsd:date ;
:producer @<Company> + ;
:feature xsd:string }
Query 1
{ ?x :producer :p1 . ?x :feature "feature 1" }
OPTIONAL
{ ?x :feature "feature 2" . ?x :expiryDate ?d }
Query 2
{ ?x :producer ?y . ?x :feature "feature 1"}
17/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
SPARQL (with OPTIONALs)
ShEx Schema (S)
<Product> {
:name xsd:string ;
:expiryDate xsd:date ;
:producer @<Company> + ;
:feature xsd:string }
Query 1
{ ?x :producer :p1 . ?x :feature "feature 1" }
OPTIONAL
{ ?x :feature "feature 2" . ?x :expiryDate ?d }
Query 2
{ ?x :producer ?y . ?x :feature "feature 1"}
Results: Query 1 S Query 2
17/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
SPARQL (with OPTIONALs)
Complex OPTIONAL Query
{ :product1 :label ?productLabel . }
OPTIONAL {
?offer :product :product1 .
?offer :price ?price .
?offer :vendor ?vendor } .
OPTIONAL {
?review :reviewFor :product1 .
?review :rating ?rating .
}
18/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
SPARQL (with OPTIONALs)
Complex OPTIONAL Query
{ :product1 :label ?productLabel . }
OPTIONAL {
?offer :product :product1 .
?offer :price ?price .
?offer :vendor ?vendor } .
OPTIONAL {
?review :reviewFor :product1 .
OPTIONAL {
?review :reviewer ?reviewer .
OPTIONAL { ?reviewer :name ?revName }} .
?review :rating ?rating .
OPTIONAL {
?rating :nbOfRaters ?n }
}
18/32
SPARQL Query Containment with ShEx Constraints
Containment Examples with ShEx Constraints
SPARQL (with OPTIONALs)
Well-designed OPTIONAL Fragment
Definition:
For every subpattern q = (q1 OPT q2) of q and every variable
x occurring in q, it holds that: if x occurs inside q2 and outside
q , then x also occurs inside q1.
Containment of the w.d. OPT fragment is studied. A sound and
complete procedure is available [Leterlier et al., 2012].
+ UNION at top level.
Representation as pattern trees:
((P1 OPT (P11 OPT P111 OPT P112)) OPT P12) OPT P13
P1
P11 P12 P13
P111 P112 19/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
20/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Procedure Overview
Procedure Overview
Components:
ShEx validator
Containment Solver
Q1
S'
Q'1
SPARQL
Containment Solver
Query
SPARQL Containment
(𝑸′ 𝟏⊑ 𝑸′
𝟐)?
(𝑸 𝟏⊑ 𝑺 𝑸 𝟐)?
SPARQL Containment
with ShEx
≡
P1
𝓡𝓓𝓕
(P1 )
𝓡𝓓𝓕(𝑷n)
(variables  IRIs)
Validate parts of the
transformed pattern
tree and eliminate
the non-valid nodes.
P'1
Q2 Q'2P2
𝓡𝓓𝓕
(P2 )
Validate parts of the
transformed pattern
tree and eliminate
the non-valid nodes.
P'2
Pattern Tree
Pattern Tree
(new)
Results:
Query
Query Transformation
Schema
S 𝓜𝓘𝓝0(𝑺)
Minimals discarding
schema transformation
21/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Query Transformation
Query Transformation
1- Original Query Pattern (P)
{
?x :producer :p1 .
?x :feature "feature 1"
}
OPTIONAL
{
?x :feature "feature 2" .
?x :expiryDate ?d
}
22/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Query Transformation
Query Transformation
2- RDF(P)
{
:x :producer :p1 .
:x :feature "feature 1"
}
OPTIONAL
{
:x :feature "feature 2" .
:x :expiryDate :d
}
22/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Query Transformation
Query Transformation
3- Validate Against Schema S (Part 1)
{
:x :producer :p1 .
:x :feature "feature 1"
}
OPTIONAL
{
:x :feature "feature 2" .
:x :expiryDate :d
}
Not Valid? → Query is equivalent to the empty query!
Valid? → Validate Against Schema S (Part 1 and 2)
22/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Query Transformation
Query Transformation
3- Validate Against Schema S (Part 1 and 2)
{
:x :producer :p1 .
:x :feature "feature 1" .
}
OPTIONAL
{
:x :feature "feature 2" .
:x :expiryDate :d
}
Not Valid? → Eliminate (Part 2) only!
Valid? → Keep the query as it is!
22/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
ShEx Schema Transformation
ShEx Schema Transformation
Minimal cardinality constraints should be ignored since the
query is not a complete representation of the data.
Example
Assume a ShEx constraint: At least three skills for each person.
Assume a query pattern: {:p1 :skill ?x}
The presence of only one triple is not a violation, the RDF data may
still have three skills for :p1.
Thus minimal cardinality constraints must be ignored.
MIN0(.) is a transformation function that takes a ShEx
document and returns another ShEx document ignoring all
minimal cardinalities.
23/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Containment Procedure Summary
Containment Procedure Summary
Step 1: (Transformation)
Eliminate pattern tree nodes that are not valid.
Minimal cardinalities are not considered.
Query 1 Query 2
Step 2: (Containment)
Check the new modified queries for containment.
24/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Containment Procedure Summary
Containment Procedure Summary
Step 1: (Transformation)
Eliminate pattern tree nodes that are not valid.
Minimal cardinalities are not considered.
Query 1 Query 2
Step 2: (Containment)
Check the new modified queries for containment.
Results:
T(Query 1) T(Query 2) ≡ Query 1 S Query 2
24/32
SPARQL Query Containment with ShEx Constraints
Containment Procedure Definition
Complexity
Implementation and Theoretical Complexity
Implementation
Queries and ShEx documents transformation implemented using java.
ShEx validator, available from [Boneva et al., 2014] (NP-c)
Containment Solver, available from [Pichler and Skritek, 2014]. (ΠP
2-c)
Complexity of SPARQL containment with ShEx
SPARQL Fragment Without(ShEx) With(ShEx)
BGP [Chandra, 1977] NP-c NP-c
AND-OPT [Pichler, 2014] NP-c NP-c
AND-OPT-(UNION) [Pichler, 2014] ΠP
2-c ΠP
2-c
25/32
SPARQL Query Containment with ShEx Constraints
Alternative Method
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
26/32
SPARQL Query Containment with ShEx Constraints
Alternative Method
Alternative Method
We reduce query containment with ShEx into:
FOL (First Order Logic) formula satisfiability.
FOL with only two variable is a decidable FOL fragment
with NEXP-c satisfiability complexity.
It supports SPARQL fragment extensions.
Q1
Q2
Queries encoding
function
Schema encoding
function
Schema (S)
FOLAutomated
Theorem Prover
(𝜻)
𝓐(𝑸 𝟏)⋀¬𝓐(𝑸 𝟐)
axioms
conjecture
FOL
(𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐)
(𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐)
Result
FOL Problem
satisfiable
FOL Problem
unsatisfiable
27/32
SPARQL Query Containment with ShEx Constraints
Alternative Method
Alternative Method
We reduce query containment with ShEx into:
FOL (First Order Logic) formula satisfiability.
FOL with only two variable is a decidable FOL fragment
with NEXP-c satisfiability complexity.
It supports SPARQL fragment extensions.
Method 1 Method 2 (FOL)
SPARQL Fragment Without/With(ShEx) Without/With(ShEx)
BGP NP-Complete NEXP
AND-OPT NP-Complete NEXP
AND-OPT-(UNION) ΠP
2-Complete NEXP
AND-OPT-(UNION)-Minus  [not supported] NEXP
AND-OPT-(UNION)-FILTER  [not supported] NEXP
AND-OPT-(UNION)-PP  [not supported] NEXP
AND-OPT-(UNION)-MINUS-FILTER-PP  [not supported] NEXP
27/32
SPARQL Query Containment with ShEx Constraints
Alternative Method
Alternative Method
We reduce query containment with ShEx into:
FOL (First Order Logic) formula satisfiability.
FOL with only two variable is a decidable FOL fragment
with NEXP-c satisfiability complexity.
It supports SPARQL fragment extensions.
Method 1 Method 2 (FOL)
SPARQL Fragment Without/With(ShEx) Without/With(ShEx)
BGP NP-Complete NEXP
AND-OPT NP-Complete NEXP
AND-OPT-(UNION) ΠP
2-Complete NEXP
AND-OPT-(UNION)-Minus  [not supported] NEXP
AND-OPT-(UNION)-FILTER  [not supported] NEXP
AND-OPT-(UNION)-PP  [not supported] NEXP
AND-OPT-(UNION)-MINUS-FILTER-PP  [not supported] NEXP
Method 2 is more complex but supports more fragments
27/32
SPARQL Query Containment with ShEx Constraints
Alternative Method
Implementations Tests
2 implementations:
Method 1 (Validation+Containment)
Method 2 (FOL)
Test Queries from the Berlin SPARQL Benchmark
Hand-crafted ShEx schemas
Execution Time (with Method 1) ≈ 800 ms
Execution Time (with Method 2) ≈ 400 ms
Available implementations of FOL automated theorem provers
are highly optimized and efficient!
28/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Table of Contents
1 Introduction
Containment Overview
ShEx (Shape Expressions)
2 Containment Examples with ShEx Constraints
SPARQL (Conjunctive)
SPARQL (with OPTIONALs)
3 Containment Procedure Definition
Procedure Overview
Query Transformation
ShEx Schema Transformation
Containment Procedure Summary
Complexity
4 Alternative Method
5 Conclusion
29/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Conclusion
Motivation: SPARQL query containment with ShEx
constraints is important (due to constrained databases).
With ShEx more containment cases can be inferred.
30/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Conclusion
Motivation: SPARQL query containment with ShEx
constraints is important (due to constrained databases).
With ShEx more containment cases can be inferred.
Contribution 1: We defined a sound and complete
procedure for SPARQL query containment with ShEx
constraints.
30/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Conclusion
Motivation: SPARQL query containment with ShEx
constraints is important (due to constrained databases).
With ShEx more containment cases can be inferred.
Contribution 1: We defined a sound and complete
procedure for SPARQL query containment with ShEx
constraints.
Contribution 2: We provided the complexity bounds of
the problem considered. (ΠP
2-c for AND-OPT-(UNION))
30/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Conclusion
Motivation: SPARQL query containment with ShEx
constraints is important (due to constrained databases).
With ShEx more containment cases can be inferred.
Contribution 1: We defined a sound and complete
procedure for SPARQL query containment with ShEx
constraints.
Contribution 2: We provided the complexity bounds of
the problem considered. (ΠP
2-c for AND-OPT-(UNION))
Contribution 3: We implemented the procedure in a
java framework using an existing ShEx validator and an
existing containment solver.
30/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Conclusion
Motivation: SPARQL query containment with ShEx
constraints is important (due to constrained databases).
With ShEx more containment cases can be inferred.
Contribution 1: We defined a sound and complete
procedure for SPARQL query containment with ShEx
constraints.
Contribution 2: We provided the complexity bounds of
the problem considered. (ΠP
2-c for AND-OPT-(UNION))
Contribution 3: We implemented the procedure in a
java framework using an existing ShEx validator and an
existing containment solver.
Contribution 4: Alternative method for extending the
SPARQL fragment (reducing to FOL satisfiability).
30/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Further Perspectives
In Application:
There exist many FOL automated theorem provers that
participate annually in competitions.
Only 1 containment solver for the AND-OPT-(UNION)
fragment is available. [Pichler and Skritek, 2014]
Using available FOL automated theorem provers allowed
for more efficient problem solving implementations (even
for small fragments).
Perspective:
It is clear that there exists a space to make better
implementations of the containment solver and/or of
the ShEx validator.
31/32
SPARQL Query Containment with ShEx Constraints
Conclusion
Thank You
32/32

More Related Content

What's hot

SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
LeeFeigenbaum
 
SPARTIQULATION - Verbalizing SPARQL queries
SPARTIQULATION - Verbalizing SPARQL queriesSPARTIQULATION - Verbalizing SPARQL queries
SPARTIQULATION - Verbalizing SPARQL queries
Basil Ell
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPath
torp42
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
Jose Emilio Labra Gayo
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
Jose Emilio Labra Gayo
 
SHACL by example
SHACL by exampleSHACL by example
SHACL by example
Jose Emilio Labra Gayo
 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five Slides
Holger Knublauch
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
andyseaborne
 
SHACL Overview
SHACL OverviewSHACL Overview
SHACL Overview
Irene Polikoff
 
RDF briefing
RDF briefingRDF briefing
RDF briefing
Frank van Harmelen
 
Shape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation languageShape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation language
Jose Emilio Labra Gayo
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1
andreas_schultz
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
andyseaborne
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
Mariano Rodriguez-Muro
 
Twinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query ToolTwinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query Tool
Leigh Dodds
 
SPARQL Query Verbalization for Explaining Semantic Search Engine Queries
SPARQL Query Verbalization for Explaining Semantic Search Engine QueriesSPARQL Query Verbalization for Explaining Semantic Search Engine Queries
SPARQL Query Verbalization for Explaining Semantic Search Engine Queries
Basil Ell
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
LeeFeigenbaum
 
SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic Web
Jan Beeck
 

What's hot (18)

SPARQL 1.1 Status
SPARQL 1.1 StatusSPARQL 1.1 Status
SPARQL 1.1 Status
 
SPARTIQULATION - Verbalizing SPARQL queries
SPARTIQULATION - Verbalizing SPARQL queriesSPARTIQULATION - Verbalizing SPARQL queries
SPARTIQULATION - Verbalizing SPARQL queries
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPath
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
SHACL by example
SHACL by exampleSHACL by example
SHACL by example
 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five Slides
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
 
SHACL Overview
SHACL OverviewSHACL Overview
SHACL Overview
 
RDF briefing
RDF briefingRDF briefing
RDF briefing
 
Shape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation languageShape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation language
 
Data translation with SPARQL 1.1
Data translation with SPARQL 1.1Data translation with SPARQL 1.1
Data translation with SPARQL 1.1
 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
 
4 sw architectures and sparql
4 sw architectures and sparql4 sw architectures and sparql
4 sw architectures and sparql
 
Twinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query ToolTwinkle: A SPARQL Query Tool
Twinkle: A SPARQL Query Tool
 
SPARQL Query Verbalization for Explaining Semantic Search Engine Queries
SPARQL Query Verbalization for Explaining Semantic Search Engine QueriesSPARQL Query Verbalization for Explaining Semantic Search Engine Queries
SPARQL Query Verbalization for Explaining Semantic Search Engine Queries
 
SPARQL Cheat Sheet
SPARQL Cheat SheetSPARQL Cheat Sheet
SPARQL Cheat Sheet
 
SPARQL in the Semantic Web
SPARQL in the Semantic WebSPARQL in the Semantic Web
SPARQL in the Semantic Web
 

Similar to SPARQL Query Containment with ShEx Constraints

Selectivity Estimation for SPARQL Triple Patterns with Shape Expressions
Selectivity Estimation for SPARQL Triple Patterns with Shape ExpressionsSelectivity Estimation for SPARQL Triple Patterns with Shape Expressions
Selectivity Estimation for SPARQL Triple Patterns with Shape Expressions
Abdullah Abbas
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
Emanuele Della Valle
 
ShEx vs SHACL
ShEx vs SHACLShEx vs SHACL
ShEx vs SHACL
Jose Emilio Labra Gayo
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
Thomas Francart
 
Sparql
SparqlSparql
final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)
Ankit Rathi
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playout
MediaMixerCommunity
 
[Master Thesis]: SPARQL Query Rewriting with Paths
[Master Thesis]: SPARQL Query Rewriting with Paths[Master Thesis]: SPARQL Query Rewriting with Paths
[Master Thesis]: SPARQL Query Rewriting with Paths
Abdullah Abbas
 
Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the web
Mahdi Atawneh
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
Department of Informatics, University of Oslo
 
KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016
Dr.-Ing. Thomas Hartmann
 
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Dr.-Ing. Thomas Hartmann
 
AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101
Cambridge Semantics
 
Federation and Navigation in SPARQL 1.1
Federation and Navigation in SPARQL 1.1Federation and Navigation in SPARQL 1.1
Federation and Navigation in SPARQL 1.1
net2-project
 
Semantics and optimisation of the SPARQL1.1 federation extension
Semantics and optimisation of the SPARQL1.1 federation extensionSemantics and optimisation of the SPARQL1.1 federation extension
Semantics and optimisation of the SPARQL1.1 federation extension
Oscar Corcho
 
Sem facet paper
Sem facet paperSem facet paper
Sem facet paper
DBOnto
 
SemFacet paper
SemFacet paperSemFacet paper
SemFacet paper
DBOnto
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
STIinnsbruck
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
EUCLID project
 
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Biswanath Dutta
 

Similar to SPARQL Query Containment with ShEx Constraints (20)

Selectivity Estimation for SPARQL Triple Patterns with Shape Expressions
Selectivity Estimation for SPARQL Triple Patterns with Shape ExpressionsSelectivity Estimation for SPARQL Triple Patterns with Shape Expressions
Selectivity Estimation for SPARQL Triple Patterns with Shape Expressions
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
 
ShEx vs SHACL
ShEx vs SHACLShEx vs SHACL
ShEx vs SHACL
 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
 
Sparql
SparqlSparql
Sparql
 
final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)final_copy_camera_ready_paper (7)
final_copy_camera_ready_paper (7)
 
Re-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playoutRe-using Media on the Web: Media fragment re-mixing and playout
Re-using Media on the Web: Media fragment re-mixing and playout
 
[Master Thesis]: SPARQL Query Rewriting with Paths
[Master Thesis]: SPARQL Query Rewriting with Paths[Master Thesis]: SPARQL Query Rewriting with Paths
[Master Thesis]: SPARQL Query Rewriting with Paths
 
Optimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the webOptimized index structures for querying rdf from the web
Optimized index structures for querying rdf from the web
 
Optimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdfOptimizing SPARQL Queries with SHACL.pdf
Optimizing SPARQL Queries with SHACL.pdf
 
KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016
 
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
 
AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101AnzoGraph DB - SPARQL 101
AnzoGraph DB - SPARQL 101
 
Federation and Navigation in SPARQL 1.1
Federation and Navigation in SPARQL 1.1Federation and Navigation in SPARQL 1.1
Federation and Navigation in SPARQL 1.1
 
Semantics and optimisation of the SPARQL1.1 federation extension
Semantics and optimisation of the SPARQL1.1 federation extensionSemantics and optimisation of the SPARQL1.1 federation extension
Semantics and optimisation of the SPARQL1.1 federation extension
 
Sem facet paper
Sem facet paperSem facet paper
Sem facet paper
 
SemFacet paper
SemFacet paperSemFacet paper
SemFacet paper
 
Sparql service-description
Sparql service-descriptionSparql service-description
Sparql service-description
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
Tutorial on SPARQL: SPARQL Protocol and RDF Query Language
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 

SPARQL Query Containment with ShEx Constraints

  • 1. SPARQL Query Containment with ShEx Constraints SPARQL Query Containment with ShEx Constraints 21st European Conference on Advances in Databases and Information Systems (ADBIS 2017) Abdullah Abbas Pierre Genevès Cécile Roisin Nabil Layaïda 24 - 27 September 2017 1/32
  • 2. SPARQL Query Containment with ShEx Constraints RDF (Resource Description Framework) RDF Triple <subject> <predicate> <object> { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } 2/32
  • 3. SPARQL Query Containment with ShEx Constraints RDF (Resource Description Framework) RDF Triple <subject> <predicate> <object> { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } p1 “Alice”named 2/32
  • 4. SPARQL Query Containment with ShEx Constraints RDF (Resource Description Framework) RDF Graph <subject> <predicate> <object> { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 2/32
  • 5. SPARQL Query Containment with ShEx Constraints SPARQL Query RDF Graph { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 3/32
  • 6. SPARQL Query Containment with ShEx Constraints SPARQL Query RDF Graph { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } SPARQL query SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } p1 “Alice” tennis p2 “Bob” soccer named likes named likes 3/32
  • 7. SPARQL Query Containment with ShEx Constraints SPARQL Query RDF Graph { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } SPARQL query SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } p1 “Alice” tennis p2 “Bob” soccer ?p ?name tennis named likes named likes named likes 3/32
  • 8. SPARQL Query Containment with ShEx Constraints SPARQL Query RDF Graph { :p1 :named "Alice". :p1 :likes :tennis. :p2 :named "Bob". :p2 :likes :soccer. } SPARQL query SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } p1 “Alice” tennis p2 “Bob” soccer ?p ?name tennis named likes named likes named likes 3/32
  • 9. SPARQL Query Containment with ShEx Constraints Supported SPARQL Fragments Basic SPARQL Query SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } 4/32
  • 10. SPARQL Query Containment with ShEx Constraints Supported SPARQL Fragments Basic SPARQL Query SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } UNION SELECT ?name WHERE { ?p :likes :tennis. ?p :named ?name. } UNION { ?p :likes :tennis. ?p :named ?name. } 4/32
  • 11. SPARQL Query Containment with ShEx Constraints Supported SPARQL Fragments OPTIONAL SELECT ?name, ?other WHERE { ?p :likes :tennis. ?p :named ?name. } OPTIONAL { ?p :likes ?other. ?p :named ?name. } 5/32
  • 12. SPARQL Query Containment with ShEx Constraints ShEx Constraints ShEx Constraints <Person> { :named xsd:string ; :likes @<Sport> } <Sport> { :category xsd:string } RDF Graph 1 (Not valid) { :p1 :named "Bob". :p1 :likes :soccer. } RDF Graph 2 (Valid) { :p2 :named "Bob". :p2 :likes :soccer. :soccer :category "team sports" } 6/32
  • 13. SPARQL Query Containment with ShEx Constraints Motivation: SPARQL query containment is well studied in the literature. Query containment is useful for query planning and optimization. 7/32
  • 14. SPARQL Query Containment with ShEx Constraints Motivation: SPARQL query containment is well studied in the literature. Query containment is useful for query planning and optimization. RDF documents in real life applications are constrained. ShEx is an emerging schema language (FHIR, WebIndex). Containment without constraints → False negatives 7/32
  • 15. SPARQL Query Containment with ShEx Constraints Motivation: SPARQL query containment is well studied in the literature. Query containment is useful for query planning and optimization. RDF documents in real life applications are constrained. ShEx is an emerging schema language (FHIR, WebIndex). Containment without constraints → False negatives Purpose: SPARQL query containment in the presence of ShEx constraints. 7/32
  • 16. SPARQL Query Containment with ShEx Constraints Motivation: SPARQL query containment is well studied in the literature. Query containment is useful for query planning and optimization. RDF documents in real life applications are constrained. ShEx is an emerging schema language (FHIR, WebIndex). Containment without constraints → False negatives Purpose: SPARQL query containment in the presence of ShEx constraints. How? We benefit from existing containment solvers, and ShEx validators. We apply novel query transformations that does not increase the complexity of containment. 7/32
  • 17. SPARQL Query Containment with ShEx Constraints Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 8/32
  • 18. SPARQL Query Containment with ShEx Constraints Introduction Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 9/32
  • 19. SPARQL Query Containment with ShEx Constraints Introduction Containment Overview Containment Overview Query 1 Query 2 For any dataset, the results of Query 1 are contained in the results of Query 2. 10/32
  • 20. SPARQL Query Containment with ShEx Constraints Introduction Containment Overview Containment Overview Query 1 Query 2 For any dataset, the results of Query 1 are contained in the results of Query 2. Containment Solver: Q1 Q2 Containment Solver (𝑸 𝟏 ⊑ 𝑸 𝟐) (𝑸 𝟏 ⋢ 𝑸 𝟐) No Yes Input queries Results 10/32
  • 21. SPARQL Query Containment with ShEx Constraints Introduction Containment Overview Containment Overview Query 1 Query 2 For any dataset, the results of Query 1 are contained in the results of Query 2. Example: RDF Data (Big) SELECT* { ?x name ?name. ?x role manager. } Query 1 SELECT * { ?x name ?name. ?x role ?role. } Query 2 Query 2 Results Query 1 Results 10/32
  • 22. SPARQL Query Containment with ShEx Constraints Introduction Containment Overview Containment Overview Query 1 Query 2 For any dataset, the results of Query 1 are contained in the results of Query 2. Example: RDF Data (Big) SELECT* { ?x name ?name. ?x role manager. } Query 1 SELECT * { ?x name ?name. ?x role ?role. } Query 2 Query 2 Results Query 1 Results 10/32
  • 23. SPARQL Query Containment with ShEx Constraints Introduction ShEx (Shape Expressions) ShEx (Shape Expressions) What is ShEx? ShEx is an RDF constraint language. Validate RDF documents ShEx uses logical operators to define constraints inductively: e ::= | Σ × Γ | e∗ | e[m;n] | (e|e ) | (e e ) 11/32
  • 24. SPARQL Query Containment with ShEx Constraints Introduction ShEx (Shape Expressions) ShEx (Shape Expressions) ShEx is an RDF constraint language. Validate RDF documents Definition (ShEx Expression) Given a set of edge labels (Σ), and a set of types (Γ), then Σ × Γ is a shape expression. ShEx uses logical operators to define constraints inductively: e ::= | Σ × Γ | e∗ | e[m;n] | (e|e ) | (e e ) Definition (ShEx Schema) A ShEx schema is a tuple S = (Σ, Γ, δ), where δ is a type definition function that maps elements of Γ to shape expressions e over Σ × Γ. 12/32
  • 25. SPARQL Query Containment with ShEx Constraints Introduction ShEx (Shape Expressions) Containment with ShEx Definition Containment with ShEx: Query 1 S Query 2 For any dataset valid with respect to the ShEx schema S, the results of Query 1 are contained in the results of Query 2. Containment Solver: Q1 Q2 Containment Solver (𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐) (𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐) No Yes Input queries & schema Results Schema (S) 13/32
  • 26. SPARQL Query Containment with ShEx Constraints Introduction ShEx (Shape Expressions) Containment with ShEx Definition Containment with ShEx: Query 1 S Query 2 For any dataset valid with respect to the ShEx schema S, the results of Query 1 are contained in the results of Query 2. Containment Solver: Q1 Q2 Containment Solver (𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐) (𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐) No Yes Input queries & schema Results Schema (S) Why query containment with ShEx? More containment cases can be inferred. 13/32
  • 27. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 14/32
  • 28. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (Conjunctive) Query 1 SELECT * WHERE { ?p :named ?name . ?p :likes "tennis". } Query 2 SELECT * WHERE { ?p :named ?name . ?p :plays "soccer" } Query 1 Query 2 15/32
  • 29. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (Conjunctive) Query 1 (No results) SELECT * WHERE { ?p :named ?name . ?p :likes "tennis". } Query 2 SELECT * WHERE { ?p :named ?name . ?p :plays "soccer" } Query 1 Query 2 More Containment with ShEx? ShEx Schema (S) <Person> { :named xsd:string ; :plays xsd:string } Query 1 S Query 2 15/32
  • 30. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) SPARQL (with OPTIONALs) OPTIONAL patterns in queries are more interesting for query static analysis with constraints: Semantics: Only get extended results if available. 16/32
  • 31. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) SPARQL (with OPTIONALs) ShEx Schema (S) <Product> { :name xsd:string ; :expiryDate xsd:date ; :producer @<Company> + ; :feature xsd:string } Query 1 { ?x :producer :p1 . ?x :feature "feature 1" } OPTIONAL { ?x :feature "feature 2" . ?x :expiryDate ?d } Query 2 { ?x :producer ?y . ?x :feature "feature 1"} 17/32
  • 32. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) SPARQL (with OPTIONALs) ShEx Schema (S) <Product> { :name xsd:string ; :expiryDate xsd:date ; :producer @<Company> + ; :feature xsd:string } Query 1 { ?x :producer :p1 . ?x :feature "feature 1" } OPTIONAL { ?x :feature "feature 2" . ?x :expiryDate ?d } Query 2 { ?x :producer ?y . ?x :feature "feature 1"} Results: Query 1 S Query 2 17/32
  • 33. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) SPARQL (with OPTIONALs) Complex OPTIONAL Query { :product1 :label ?productLabel . } OPTIONAL { ?offer :product :product1 . ?offer :price ?price . ?offer :vendor ?vendor } . OPTIONAL { ?review :reviewFor :product1 . ?review :rating ?rating . } 18/32
  • 34. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) SPARQL (with OPTIONALs) Complex OPTIONAL Query { :product1 :label ?productLabel . } OPTIONAL { ?offer :product :product1 . ?offer :price ?price . ?offer :vendor ?vendor } . OPTIONAL { ?review :reviewFor :product1 . OPTIONAL { ?review :reviewer ?reviewer . OPTIONAL { ?reviewer :name ?revName }} . ?review :rating ?rating . OPTIONAL { ?rating :nbOfRaters ?n } } 18/32
  • 35. SPARQL Query Containment with ShEx Constraints Containment Examples with ShEx Constraints SPARQL (with OPTIONALs) Well-designed OPTIONAL Fragment Definition: For every subpattern q = (q1 OPT q2) of q and every variable x occurring in q, it holds that: if x occurs inside q2 and outside q , then x also occurs inside q1. Containment of the w.d. OPT fragment is studied. A sound and complete procedure is available [Leterlier et al., 2012]. + UNION at top level. Representation as pattern trees: ((P1 OPT (P11 OPT P111 OPT P112)) OPT P12) OPT P13 P1 P11 P12 P13 P111 P112 19/32
  • 36. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 20/32
  • 37. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Procedure Overview Procedure Overview Components: ShEx validator Containment Solver Q1 S' Q'1 SPARQL Containment Solver Query SPARQL Containment (𝑸′ 𝟏⊑ 𝑸′ 𝟐)? (𝑸 𝟏⊑ 𝑺 𝑸 𝟐)? SPARQL Containment with ShEx ≡ P1 𝓡𝓓𝓕 (P1 ) 𝓡𝓓𝓕(𝑷n) (variables  IRIs) Validate parts of the transformed pattern tree and eliminate the non-valid nodes. P'1 Q2 Q'2P2 𝓡𝓓𝓕 (P2 ) Validate parts of the transformed pattern tree and eliminate the non-valid nodes. P'2 Pattern Tree Pattern Tree (new) Results: Query Query Transformation Schema S 𝓜𝓘𝓝0(𝑺) Minimals discarding schema transformation 21/32
  • 38. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Query Transformation Query Transformation 1- Original Query Pattern (P) { ?x :producer :p1 . ?x :feature "feature 1" } OPTIONAL { ?x :feature "feature 2" . ?x :expiryDate ?d } 22/32
  • 39. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Query Transformation Query Transformation 2- RDF(P) { :x :producer :p1 . :x :feature "feature 1" } OPTIONAL { :x :feature "feature 2" . :x :expiryDate :d } 22/32
  • 40. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Query Transformation Query Transformation 3- Validate Against Schema S (Part 1) { :x :producer :p1 . :x :feature "feature 1" } OPTIONAL { :x :feature "feature 2" . :x :expiryDate :d } Not Valid? → Query is equivalent to the empty query! Valid? → Validate Against Schema S (Part 1 and 2) 22/32
  • 41. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Query Transformation Query Transformation 3- Validate Against Schema S (Part 1 and 2) { :x :producer :p1 . :x :feature "feature 1" . } OPTIONAL { :x :feature "feature 2" . :x :expiryDate :d } Not Valid? → Eliminate (Part 2) only! Valid? → Keep the query as it is! 22/32
  • 42. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition ShEx Schema Transformation ShEx Schema Transformation Minimal cardinality constraints should be ignored since the query is not a complete representation of the data. Example Assume a ShEx constraint: At least three skills for each person. Assume a query pattern: {:p1 :skill ?x} The presence of only one triple is not a violation, the RDF data may still have three skills for :p1. Thus minimal cardinality constraints must be ignored. MIN0(.) is a transformation function that takes a ShEx document and returns another ShEx document ignoring all minimal cardinalities. 23/32
  • 43. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Containment Procedure Summary Containment Procedure Summary Step 1: (Transformation) Eliminate pattern tree nodes that are not valid. Minimal cardinalities are not considered. Query 1 Query 2 Step 2: (Containment) Check the new modified queries for containment. 24/32
  • 44. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Containment Procedure Summary Containment Procedure Summary Step 1: (Transformation) Eliminate pattern tree nodes that are not valid. Minimal cardinalities are not considered. Query 1 Query 2 Step 2: (Containment) Check the new modified queries for containment. Results: T(Query 1) T(Query 2) ≡ Query 1 S Query 2 24/32
  • 45. SPARQL Query Containment with ShEx Constraints Containment Procedure Definition Complexity Implementation and Theoretical Complexity Implementation Queries and ShEx documents transformation implemented using java. ShEx validator, available from [Boneva et al., 2014] (NP-c) Containment Solver, available from [Pichler and Skritek, 2014]. (ΠP 2-c) Complexity of SPARQL containment with ShEx SPARQL Fragment Without(ShEx) With(ShEx) BGP [Chandra, 1977] NP-c NP-c AND-OPT [Pichler, 2014] NP-c NP-c AND-OPT-(UNION) [Pichler, 2014] ΠP 2-c ΠP 2-c 25/32
  • 46. SPARQL Query Containment with ShEx Constraints Alternative Method Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 26/32
  • 47. SPARQL Query Containment with ShEx Constraints Alternative Method Alternative Method We reduce query containment with ShEx into: FOL (First Order Logic) formula satisfiability. FOL with only two variable is a decidable FOL fragment with NEXP-c satisfiability complexity. It supports SPARQL fragment extensions. Q1 Q2 Queries encoding function Schema encoding function Schema (S) FOLAutomated Theorem Prover (𝜻) 𝓐(𝑸 𝟏)⋀¬𝓐(𝑸 𝟐) axioms conjecture FOL (𝑸 𝟏 ⊑ 𝑺 𝑸 𝟐) (𝑸 𝟏 ⋢ 𝑺 𝑸 𝟐) Result FOL Problem satisfiable FOL Problem unsatisfiable 27/32
  • 48. SPARQL Query Containment with ShEx Constraints Alternative Method Alternative Method We reduce query containment with ShEx into: FOL (First Order Logic) formula satisfiability. FOL with only two variable is a decidable FOL fragment with NEXP-c satisfiability complexity. It supports SPARQL fragment extensions. Method 1 Method 2 (FOL) SPARQL Fragment Without/With(ShEx) Without/With(ShEx) BGP NP-Complete NEXP AND-OPT NP-Complete NEXP AND-OPT-(UNION) ΠP 2-Complete NEXP AND-OPT-(UNION)-Minus [not supported] NEXP AND-OPT-(UNION)-FILTER [not supported] NEXP AND-OPT-(UNION)-PP [not supported] NEXP AND-OPT-(UNION)-MINUS-FILTER-PP [not supported] NEXP 27/32
  • 49. SPARQL Query Containment with ShEx Constraints Alternative Method Alternative Method We reduce query containment with ShEx into: FOL (First Order Logic) formula satisfiability. FOL with only two variable is a decidable FOL fragment with NEXP-c satisfiability complexity. It supports SPARQL fragment extensions. Method 1 Method 2 (FOL) SPARQL Fragment Without/With(ShEx) Without/With(ShEx) BGP NP-Complete NEXP AND-OPT NP-Complete NEXP AND-OPT-(UNION) ΠP 2-Complete NEXP AND-OPT-(UNION)-Minus [not supported] NEXP AND-OPT-(UNION)-FILTER [not supported] NEXP AND-OPT-(UNION)-PP [not supported] NEXP AND-OPT-(UNION)-MINUS-FILTER-PP [not supported] NEXP Method 2 is more complex but supports more fragments 27/32
  • 50. SPARQL Query Containment with ShEx Constraints Alternative Method Implementations Tests 2 implementations: Method 1 (Validation+Containment) Method 2 (FOL) Test Queries from the Berlin SPARQL Benchmark Hand-crafted ShEx schemas Execution Time (with Method 1) ≈ 800 ms Execution Time (with Method 2) ≈ 400 ms Available implementations of FOL automated theorem provers are highly optimized and efficient! 28/32
  • 51. SPARQL Query Containment with ShEx Constraints Conclusion Table of Contents 1 Introduction Containment Overview ShEx (Shape Expressions) 2 Containment Examples with ShEx Constraints SPARQL (Conjunctive) SPARQL (with OPTIONALs) 3 Containment Procedure Definition Procedure Overview Query Transformation ShEx Schema Transformation Containment Procedure Summary Complexity 4 Alternative Method 5 Conclusion 29/32
  • 52. SPARQL Query Containment with ShEx Constraints Conclusion Conclusion Motivation: SPARQL query containment with ShEx constraints is important (due to constrained databases). With ShEx more containment cases can be inferred. 30/32
  • 53. SPARQL Query Containment with ShEx Constraints Conclusion Conclusion Motivation: SPARQL query containment with ShEx constraints is important (due to constrained databases). With ShEx more containment cases can be inferred. Contribution 1: We defined a sound and complete procedure for SPARQL query containment with ShEx constraints. 30/32
  • 54. SPARQL Query Containment with ShEx Constraints Conclusion Conclusion Motivation: SPARQL query containment with ShEx constraints is important (due to constrained databases). With ShEx more containment cases can be inferred. Contribution 1: We defined a sound and complete procedure for SPARQL query containment with ShEx constraints. Contribution 2: We provided the complexity bounds of the problem considered. (ΠP 2-c for AND-OPT-(UNION)) 30/32
  • 55. SPARQL Query Containment with ShEx Constraints Conclusion Conclusion Motivation: SPARQL query containment with ShEx constraints is important (due to constrained databases). With ShEx more containment cases can be inferred. Contribution 1: We defined a sound and complete procedure for SPARQL query containment with ShEx constraints. Contribution 2: We provided the complexity bounds of the problem considered. (ΠP 2-c for AND-OPT-(UNION)) Contribution 3: We implemented the procedure in a java framework using an existing ShEx validator and an existing containment solver. 30/32
  • 56. SPARQL Query Containment with ShEx Constraints Conclusion Conclusion Motivation: SPARQL query containment with ShEx constraints is important (due to constrained databases). With ShEx more containment cases can be inferred. Contribution 1: We defined a sound and complete procedure for SPARQL query containment with ShEx constraints. Contribution 2: We provided the complexity bounds of the problem considered. (ΠP 2-c for AND-OPT-(UNION)) Contribution 3: We implemented the procedure in a java framework using an existing ShEx validator and an existing containment solver. Contribution 4: Alternative method for extending the SPARQL fragment (reducing to FOL satisfiability). 30/32
  • 57. SPARQL Query Containment with ShEx Constraints Conclusion Further Perspectives In Application: There exist many FOL automated theorem provers that participate annually in competitions. Only 1 containment solver for the AND-OPT-(UNION) fragment is available. [Pichler and Skritek, 2014] Using available FOL automated theorem provers allowed for more efficient problem solving implementations (even for small fragments). Perspective: It is clear that there exists a space to make better implementations of the containment solver and/or of the ShEx validator. 31/32
  • 58. SPARQL Query Containment with ShEx Constraints Conclusion Thank You 32/32