Using the TBox to Optimise SPARQL Queries
Birte GlimmYevgeny Kazakov
Ilianna Kolliaand Giorgos Stamou
CS 848 Paper CritiqueVishnu Prathish
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
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.
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.
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
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
Approximate Instance Retrieval and Query answering algorithms
Example
intersecQans
intersecQans Algorithm
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
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
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
Algorithm to get possible concept variable mapping
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.
Results GALEN Queries
Results FBbt XP 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.
Thank you!
Top Related