Cooperative Techniques for SPARQL Query Relaxation in RDF Databases G´ eraud FOKOU St´ ephane JEAN Allel HADJALI Micka¨ el BARON LIAS/ENSMA and University of Poitiers, France ESWC 2015, June 2015, Portoroz, Slovenia G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 1/21
40
Embed
Cooperative Techniques for SPARQL Query Relaxation in RDF Databases: ESWC 2015
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Cooperative Techniques for SPARQL QueryRelaxation in RDF Databases
Geraud FOKOU Stephane JEAN Allel HADJALIMickael BARON
LIAS/ENSMA and University of Poitiers, France
ESWC 2015, June 2015, Portoroz, Slovenia
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 1/21
Motivation
A lot of Knowledge Bases (KBs) available on the web
Proposed relaxation process [Huang12, ...]I Based on similarity measure Sim(Q, relax(Q))I Execution from the most to the least similar relaxed queries
⇒ blind relaxation of the query (long execution time)
The need to know the causes of failure of an RDF query
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 3/21
Minimal Failing Subquery (MFS)
Definition
Let Q be a conjunction of triple patterns Q = t1 ∧ t2 ∧ t3 ∧ t4Q* is an MFS of Q iff:
Q* is a failing subquery of Q
No subquery of Q* is a failing query
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q : failing query
Q : successful query
MFSs
The need to find maximal non failing subquery ⇒ notion of XSS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 4/21
Minimal Failing Subquery (MFS)
Definition
Let Q be a conjunction of triple patterns Q = t1 ∧ t2 ∧ t3 ∧ t4Q* is an MFS of Q iff:
Q* is a failing subquery of Q
No subquery of Q* is a failing query
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q : failing query
Q : successful query
MFSs
The need to find maximal non failing subquery ⇒ notion of XSS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 4/21
MaXimal Succeeding Subquery (XSS)
Definition
Q* is an XSS of Q iff:
Q* is a successful subquery of Q
Q* is not included in any successful subquery of Q
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q : failing query
Q : successful query
XSSs
Problem: Computation of MFSs and XSSs of a failing RDF query
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 5/21
MaXimal Succeeding Subquery (XSS)
Definition
Q* is an XSS of Q iff:
Q* is a successful subquery of Q
Q* is not included in any successful subquery of Q
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q : failing query
Q : successful query
XSSs
Problem: Computation of MFSs and XSSs of a failing RDF query
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 5/21
Outline
• Problem Statement
• Lattice-Based Approach (LBA)
• Matrice-Based Approach (MBA)
• Experimental results
• Conclusion and Perspectives
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 6/21
LBA Approach: 1) Finding an MFS
Inspired by the work of Godfrey in RDBMSs [Godfrey97]
A 3 steps procedure
First step: Q∗ ← FindAnMFS(Q)• remove iteratively each triple pattern ti of Q (query Q ′)• if Q ′ ∧ Q∗ is successful, ti is an element of Q∗ (Proposition)• otherwise Q∗ is a subquery of Q ′ ∧ Q∗
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q′ = t2 ∧ t3 ∧ t4Q′ ∧ Q∗ = t2 ∧ t3 ∧ t4
⇒ Q∗ = ∅
remove t1
t1 /∈ MFS
Q′ = t3 ∧ t4Q′ ∧ Q∗ = t3 ∧ t4⇒ Q∗ = t2
remove t2
t2 ∈ MFS
Q′ = t4Q′ ∧ Q∗ = t2 ∧ t4⇒ Q∗ = t2 ∧ t3
remove t3
t3 ∈ MFS
Q′ = ∅Q′ ∧ Q∗ = t2 ∧ t3⇒ Q∗ = t2 ∧ t3
remove t4
t4 /∈ MFS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 7/21
LBA Approach: 1) Finding an MFS
Inspired by the work of Godfrey in RDBMSs [Godfrey97]
A 3 steps procedure
First step: Q∗ ← FindAnMFS(Q)• remove iteratively each triple pattern ti of Q (query Q ′)• if Q ′ ∧ Q∗ is successful, ti is an element of Q∗ (Proposition)• otherwise Q∗ is a subquery of Q ′ ∧ Q∗
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q′ = t2 ∧ t3 ∧ t4Q′ ∧ Q∗ = t2 ∧ t3 ∧ t4
⇒ Q∗ = ∅
remove t1
t1 /∈ MFS
Q′ = t3 ∧ t4Q′ ∧ Q∗ = t3 ∧ t4⇒ Q∗ = t2
remove t2
t2 ∈ MFS
Q′ = t4Q′ ∧ Q∗ = t2 ∧ t4⇒ Q∗ = t2 ∧ t3
remove t3
t3 ∈ MFS
Q′ = ∅Q′ ∧ Q∗ = t2 ∧ t3⇒ Q∗ = t2 ∧ t3
remove t4
t4 /∈ MFS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 7/21
LBA Approach: 1) Finding an MFS
Inspired by the work of Godfrey in RDBMSs [Godfrey97]
A 3 steps procedure
First step: Q∗ ← FindAnMFS(Q)• remove iteratively each triple pattern ti of Q (query Q ′)• if Q ′ ∧ Q∗ is successful, ti is an element of Q∗ (Proposition)• otherwise Q∗ is a subquery of Q ′ ∧ Q∗
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q′ = t2 ∧ t3 ∧ t4Q′ ∧ Q∗ = t2 ∧ t3 ∧ t4
⇒ Q∗ = ∅
remove t1
t1 /∈ MFS
Q′ = t3 ∧ t4Q′ ∧ Q∗ = t3 ∧ t4⇒ Q∗ = t2
remove t2
t2 ∈ MFS
Q′ = t4Q′ ∧ Q∗ = t2 ∧ t4⇒ Q∗ = t2 ∧ t3
remove t3
t3 ∈ MFS
Q′ = ∅Q′ ∧ Q∗ = t2 ∧ t3⇒ Q∗ = t2 ∧ t3
remove t4
t4 /∈ MFS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 7/21
LBA Approach: 1) Finding an MFS
Inspired by the work of Godfrey in RDBMSs [Godfrey97]
A 3 steps procedure
First step: Q∗ ← FindAnMFS(Q)• remove iteratively each triple pattern ti of Q (query Q ′)• if Q ′ ∧ Q∗ is successful, ti is an element of Q∗ (Proposition)• otherwise Q∗ is a subquery of Q ′ ∧ Q∗
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q′ = t2 ∧ t3 ∧ t4Q′ ∧ Q∗ = t2 ∧ t3 ∧ t4
⇒ Q∗ = ∅
remove t1
t1 /∈ MFS
Q′ = t3 ∧ t4Q′ ∧ Q∗ = t3 ∧ t4⇒ Q∗ = t2
remove t2
t2 ∈ MFS
Q′ = t4Q′ ∧ Q∗ = t2 ∧ t4⇒ Q∗ = t2 ∧ t3
remove t3
t3 ∈ MFS
Q′ = ∅Q′ ∧ Q∗ = t2 ∧ t3⇒ Q∗ = t2 ∧ t3
remove t4
t4 /∈ MFS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 7/21
LBA Approach: 1) Finding an MFS
Inspired by the work of Godfrey in RDBMSs [Godfrey97]
A 3 steps procedure
First step: Q∗ ← FindAnMFS(Q)• remove iteratively each triple pattern ti of Q (query Q ′)• if Q ′ ∧ Q∗ is successful, ti is an element of Q∗ (Proposition)• otherwise Q∗ is a subquery of Q ′ ∧ Q∗
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q′ = t2 ∧ t3 ∧ t4Q′ ∧ Q∗ = t2 ∧ t3 ∧ t4
⇒ Q∗ = ∅
remove t1
t1 /∈ MFS
Q′ = t3 ∧ t4Q′ ∧ Q∗ = t3 ∧ t4⇒ Q∗ = t2
remove t2
t2 ∈ MFS
Q′ = t4Q′ ∧ Q∗ = t2 ∧ t4⇒ Q∗ = t2 ∧ t3
remove t3
t3 ∈ MFS
Q′ = ∅Q′ ∧ Q∗ = t2 ∧ t3⇒ Q∗ = t2 ∧ t3
remove t4
t4 /∈ MFS
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 7/21
LBA Approach: 2) Computing Potential XSSs
Second step:
All queries that include Q∗ are failing⇒ they can be neither MFS nor XSS
Continue with the largest subqueries of Q that do not includeQ∗. If they are successful, they are XSSs.⇒ potential XSSs (PXSS): pxss(Q,Q∗) = {Q − ti | ti ∈ Q∗}Q∗ = t2 ∧ t3 ⇒ pxss(Q,Q∗) = {t1 ∧ t3 ∧ t4, t1 ∧ t2 ∧ t4}
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4t1 ∧ t2 ∧ t4t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q∗
pxss(Q,Q∗)
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 8/21
LBA Approach: 2) Computing Potential XSSs
Second step:
All queries that include Q∗ are failing⇒ they can be neither MFS nor XSS
Continue with the largest subqueries of Q that do not includeQ∗. If they are successful, they are XSSs.⇒ potential XSSs (PXSS): pxss(Q,Q∗) = {Q − ti | ti ∈ Q∗}Q∗ = t2 ∧ t3 ⇒ pxss(Q,Q∗) = {t1 ∧ t3 ∧ t4, t1 ∧ t2 ∧ t4}
∅
t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4 t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4t1 ∧ t2 ∧ t4t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
t1 ∧ t2 ∧ t3 ∧ t4
Q∗
pxss(Q,Q∗)
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 8/21
LBA Approach: 3) Finding all MFSs and XSSs
Third step:Naıve approach
Execute each PXSS PQIf PQ is successful, this is an XSSOtherwise apply recursively the LBA algorithm on PQ
Problem: the same MFS can be found several timesSolution: incremental computation of the PXSSs that do notinclude the identified MFSs
∅
t1t1 t2 t3 t4
t1 ∧ t2 t1 ∧ t3 t1 ∧ t4 t2 ∧ t3t2 ∧ t3 t2 ∧ t4t2 ∧ t4t2 ∧ t4 t3 ∧ t4t3 ∧ t4t3 ∧ t4
t1 ∧ t2 ∧ t3 t1 ∧ t2 ∧ t4t1 ∧ t2 ∧ t4 t1 ∧ t3 ∧ t4t1 ∧ t3 ∧ t4 t2 ∧ t3 ∧ t4
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 9/21
Outline
• Problem Statement
• Lattice-Based Approach (LBA)
• Matrice-Based Approach (MBA)
• Experimental results
• Conclusion and Perspectives
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 10/21
MBA Approach: Overview
Inspired by the work of Jannach in Recommender Systems
Based on the computation of a Matrixone row by potential solution µ(a mapping satisfying at least one triple pattern)one column by triple patternM[µ][ti ] = 1 ⇔ µ satisfies ti (else 0)
ts p o
Smith type ProfessorSmith research SWSmith teacherOf DBJane type LecturerJane research DBJane teacherOf DB
SELECT ?p ?a WHERE {?p age ?a (t1)?p type Lecturer (t2)?p research SW (t3)?p teacherOf DB } (t4)
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 11/21
MBA Approach: Relaxed Matrix Computation
Execution of each triple pattern tiComputation of t1 ./
∗ t2... ./∗ tn
where t1 ./∗ t2 = t1 ∪ t2 ∪ t1 ./ t2
the mappings that satisfies t1 or t2 or a combination of t1, t2
Problem: subqueries of Q can lead to Cartesian Product
⇒ Matrix of a huge size (exceeds the size of main memory)
Not the case of Star-shaped queries(a shared join variable in the subject position)
SELECT ?p ?a WHERE {?p age ?a (t1)?p type Lecturer (t2)?p research SW (t3)?p teacherOf DB } (t4)
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 12/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm NQexecute each triple patterntifor each value v of the join variableif v is already in the matrix, complete the row with a 1 for tielse add a new row in the matrix with only a 1 for ti
?p ?a t1 t2 t3 t4
t1 = ∅
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
t2 = Jane
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
Smith null 0 0 1 0
t3 = Smith
?p ?a t1 t2 t3 t4Jane null 0 1 0 1
Smith null 0 0 1 1
t4 = Smith, Jane
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 13/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm NQexecute each triple patterntifor each value v of the join variableif v is already in the matrix, complete the row with a 1 for tielse add a new row in the matrix with only a 1 for ti
?p ?a t1 t2 t3 t4
t1 = ∅
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
t2 = Jane
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
Smith null 0 0 1 0
t3 = Smith
?p ?a t1 t2 t3 t4Jane null 0 1 0 1
Smith null 0 0 1 1
t4 = Smith, Jane
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 13/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm NQexecute each triple patterntifor each value v of the join variableif v is already in the matrix, complete the row with a 1 for tielse add a new row in the matrix with only a 1 for ti
?p ?a t1 t2 t3 t4
t1 = ∅
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
t2 = Jane
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
Smith null 0 0 1 0
t3 = Smith
?p ?a t1 t2 t3 t4Jane null 0 1 0 1
Smith null 0 0 1 1
t4 = Smith, Jane
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 13/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm NQexecute each triple patterntifor each value v of the join variableif v is already in the matrix, complete the row with a 1 for tielse add a new row in the matrix with only a 1 for ti
?p ?a t1 t2 t3 t4
t1 = ∅
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
t2 = Jane
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
Smith null 0 0 1 0
t3 = Smith
?p ?a t1 t2 t3 t4Jane null 0 1 0 1
Smith null 0 0 1 1
t4 = Smith, Jane
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 13/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm NQexecute each triple patterntifor each value v of the join variableif v is already in the matrix, complete the row with a 1 for tielse add a new row in the matrix with only a 1 for ti
?p ?a t1 t2 t3 t4
t1 = ∅
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
t2 = Jane
?p ?a t1 t2 t3 t4Jane null 0 1 0 0
Smith null 0 0 1 0
t3 = Smith
?p ?a t1 t2 t3 t4Jane null 0 1 0 1
Smith null 0 0 1 1
t4 = Smith, Jane
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 13/21
MBA Approach: Optimized Relaxed Matrix Computation
Algorithm 1Q
if the RDF database is implemented as a triple table: T(s, p, o)a single SQL query can be used to compute the matrixroughly the translation of t1 ./ t2... ./ tn
select coalesce(t1.s , t2.s, t3.s, t4.s),
case when t1.s is null then 0 else 1 end as t1,
case when t2.s is null then 0 else 1 end as t2,
case when t3.s is null then 0 else 1 end as t3,
case when t4.s is null then 0 else 1 end as t4
from t1 full outer join t2 on t1.s = t2.s
full outer join t3 on coalesce(t1.s , t2.s) = t3.s
full outer join t4 on coalesce(t1.s , t2.s, t3.s) = t4.s
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 14/21
MBA Approach: MFSs and XSSs computation
XSSs computation
1) Compute the skyline of the relaxed matrixMany solutions: block nested loop, sort filter skyline, ...
2) Retrieve the queries that correspond to skyline rowsThey are the XSSs
?p ?a t1 t2 t3 t4Smith null 0 0 1 1
Jane null 0 1 0 1⇒ xss(Q) = {t2 ∧ t4, t3 ∧ t4}
MFSs computation
The matrix provides a simple way to know if a query is failingt2 ∧ t3 is failing ⇔ col(t2) AND col(t3) =
(00
)The matrix can be used as an index for optimizing LBALBA without any database query
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 15/21
Outline
• Problem Statement
• Lattice-Based Approach (LBA)
• Matrice-Based Approach (MBA)
• Experimental results
• Conclusion and Perspectives
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 16/21
Experimental Setup
Java implementation of LBA and MBA on top of Jena TDBhttp://www.lias-lab.fr/forge/projects/qars
MBA-M: same as MBA+M but without computing the matrix
10
100
1000
10000
100000
Q1(1) Q2(5) Q3(7) Q4(9) Q5(11) Q6(13) Q7(15)
QueryTim
e(m
s)
Queries with Number of Triple pattern (TP)
LUBM100
DFS
10
100
1000
10000
100000
1e+006
Q1(1) Q2(5) Q3(7) Q4(9) Q5(11) Q6(13) Q7(15)
QueryTim
e(m
s)
Queries with Number of Triple pattern (TP)
LUBM100
DFSISHMAEL
LBA
1
10
100
1000
10000
100000
1e+006
Q1(1) Q2(5) Q3(7) Q4(9) Q5(11) Q6(13) Q7(15)
QueryTim
e(m
s)
Queries with Number of Triple pattern (TP)
LUBM100
DFSISHMAEL
LBAMBA+MMBA-M
DFS does not scale for medium size queries (≈ 9TP)LBA/ISHMAEL scale till queries ≈ 11 TP
MBA is only useful for Star-shaped queriesMBA+M only useful for large queries, MBA-M scales well
Experiments: Performance as the number of TP scales
The number of TP plays a important role in the performance
Experiment: decompose Q7 in 15 subqueries (1 to 15TP)
Execute each such subquery
1
10
100
1000
10000
100000
1e+006
2 4 6 8 10 12 14
Number of Triple Patterns
LUBM100
DFSISMAEL
LBAMBA+MMBA-M
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 19/21
⇒ Confirm our previous results
Outline
• Problem Statement
• Lattice-Based Approach (LBA)
• Matrice-Based Approach (MBA)
• Experimental results
• Conclusion and Perspectives
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 20/21
Conclusion and Perspectives
Study of 2 cooperative techniques for RDF query relaxation
MFS: a cause of query failureXSS: a relaxed query with a maximum of TP
Contribution: 2 solutions to find MFSs/XSSs of RDF queries
LBA is smart exploration of the subquery latticeMBA is based on a matrix used as a bitmap indexLBA >> baseline algorithms for queries with more than 5 TPsMBA is only interesting for large star-shaped queriesif the matrix has been precomputed, MBA runs in millisecondseven for large queries (>15TP)
Perspectives:
Optimization of LBA using heuristics (obvious MFS)Optimization of MBA for other kinds of RDF queriesDefinition of query relaxation strategies based on MFSs/XSSs
G. FOKOU, S. JEAN, A. HADJALI, M. BARON Cooperative Techniques for SPARQL Query Relaxation 21/21