Transcript
Page 1: Using the  TBox  to  Optimise  SPARQL Queries

Using the TBox to Optimise SPARQL Queries

Birte GlimmYevgeny Kazakov

Ilianna Kolliaand Giorgos Stamou

CS 848 Paper CritiqueVishnu Prathish

Page 2: Using the  TBox  to  Optimise  SPARQL Queries

Preliminaries

• Description Logic SHIQ • Notations:

• A concept atom is an expression A(x) and a role atom is an expression r(x, y)

• Concept axiom templates and role axiom templates

Page 3: Using the  TBox  to  Optimise  SPARQL Queries

Conjunctive Instance and Complex Queries

• A conjunctive instance query q is a non-empty set of (concept or role) atoms.

• concept templates - set of SHIQ concepts, where a concept variable can be used in place of a concept name, and a role variable in place of a role name.

• Axiom templates – – role axiom template where – Concept axiom template has the form with c, d concept templates.

• A finite set of role axiom templates, concept axiom templates, and (concept or role) atoms is called a complex query

• Var(q) - set of variables in q. and |Var(q)| is called the arity of q.

Page 4: Using the  TBox  to  Optimise  SPARQL Queries

Key Contributions

• An optimization that is applicable to conjunctive instance queries. We show that one can compute an equivalent query qˆ for a given query q by replacing the variables in q with fresh individual names. Then perform realization.

• Query optimization exploiting the polarity of variable occurrences in the query and the concept and role hierarchies.

Page 5: Using the  TBox  to  Optimise  SPARQL Queries

Mapping functions and answers to query

Mapping function:

A mapping function is a certain answer for q if,

denotes all the set of certain answers of q

Page 6: Using the  TBox  to  Optimise  SPARQL Queries

Query Answering Via Approximate Instance retrieval

• Using approximate reasoning algorithms to answer query

• Either Sound and incomplete or Incomplete and Sound

• Rewrite the KB into a simpler logic and run query over it to obtain desired level of approximation

Page 7: Using the  TBox  to  Optimise  SPARQL Queries

Approximate Instance Retrieval and Query answering algorithms

Page 8: Using the  TBox  to  Optimise  SPARQL Queries

Example

Page 9: Using the  TBox  to  Optimise  SPARQL Queries

intersecQans

Page 10: Using the  TBox  to  Optimise  SPARQL Queries

intersecQans Algorithm

Page 11: Using the  TBox  to  Optimise  SPARQL Queries

Restricting atomsA query atom restricts restricts a query if,

Eg: B(x) in the example explained.

• To preserve certain answers, we should use restricting atoms that do not change the answers of q.

• Can be used to prune set of possible answers of query

Page 12: Using the  TBox  to  Optimise  SPARQL Queries

Query Extension

• Find a way of computing restricting atoms• Based on chase technique in relational database

theory• Basic Idea:– For a Abox ,Query and a bijective function, – Compute(rewrite) an extended ABox and Query (using

chase )– Using approx. inst. retrieval algo., check if any atom of the

new query restricts the initial query – Reduce the set of possible answers using query restriction

Page 13: Using the  TBox  to  Optimise  SPARQL Queries

Polarity Based optimization

• Choose the next binding to test by traversing the concept hierarchy top down

• Based on the polarity of concept variable in the query the concept hierarchy can be safely pruned.

• Can not be used when a variable occurs both positively and negatively

Page 14: Using the  TBox  to  Optimise  SPARQL Queries

Algorithm to get possible concept variable mapping

Page 15: Using the  TBox  to  Optimise  SPARQL Queries

Evaluation

• On custom set of queries based on GALEN (Biomedical KB – SHIF expressivity) FBbt_XP ontology (SHI)

• Sys Config: Mac OS X Lion machine with a 2.53 GHz Intel Core i7 processor and Java 1.6 allowing 1GB of Java heap space.

Page 16: Using the  TBox  to  Optimise  SPARQL Queries

Results GALEN Queries

Page 17: Using the  TBox  to  Optimise  SPARQL Queries

Results FBbt XP Queries

Page 18: Using the  TBox  to  Optimise  SPARQL Queries

Conclusion

• A TBOX based optimization of SPARQL queries• Equivalent queries which can be exploited to

produce reduce the set of mapping for conjunctive queries

• Polarity based pruning for queries that go beyond conjunctive queries

• Evaluation which shows that this optimization can reduce key evaluation times upto two orders of magnitude.

Page 19: Using the  TBox  to  Optimise  SPARQL Queries

Thank you!


Top Related