SPARQL Query Graph Model (How to improve query evaluation?) Ralf Heese and Olaf Hartig Humboldt-Universität zu Berlin.

Slides:



Advertisements
Similar presentations
Schema Matching and Query Rewriting in Ontology-based Data Integration Zdeňka Linková ICS AS CR Advisor: Július Štuller.
Advertisements

Lukas Blunschi Claudio Jossen Donald Kossmann Magdalini Mori Kurt Stockinger.
WIMS 2014, June 2-4Thessaloniki, Greece1 Optimized Backward Chaining Reasoning System for a Semantic Web Hui Shi, Kurt Maly, and Steven Zeil Contact:
Chapter 15 Algorithms for Query Processing and Optimization Copyright © 2004 Pearson Education, Inc.
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation,
Outline SQL Server Optimizer  Enumeration architecture  Search space: flexibility/extensibility  Cost and statistics Automatic Physical Tuning  Database.
Query Execution Professor: Dr T.Y. Lin Prepared by, Mudra Patel Class id: 113.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. 1 The Architecture of a Large-Scale Web Search and Query Engine.
Query Execution Professor: Dr T.Y. Lin Prepared by, Mudra Patel Class id: 113.
CIS607, Fall 2005 Semantic Information Integration Article Name: Clio Grows Up: From Research Prototype to Industrial Tool Name: DH(Dong Hwi) kwak Date:
Graph Algebra with Pattern Matching and Aggregation Support 1.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Query Processing Presented by Aung S. Win.
Storing RDF Data in Hadoop And Retrieval Pankil Doshi Asif Mohammed Mohammad Farhan Husain Dr. Latifur Khan Dr. Bhavani Thuraisingham.
Managing Large RDF Graphs (Infinite Graph) Vaibhav Khadilkar Department of Computer Science, The University of Texas at Dallas FEARLESS engineering.
Berlin SPARQL Benchmark (BSBM) Presented by: Nikhil Rajguru Christian Bizer and Andreas Schultz.
From Web 1.0  Web 3.0: Is RDF access to RDB enough? Vipul Kashyap Senior Medical Informatician, Clinical Informatics R&D Partners.
1 Distributed Monitoring of Peer-to-Peer Systems By Serge Abiteboul, Bogdan Marinoiu Docflow meeting, Bordeaux.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Ontology Updating Driven by Events Dutch-Belgian Database Day 2012 (DBDBD 2012) November 21, 2012 Frederik Hogenboom Jordy Sangers.
G-SPARQL: A Hybrid Engine for Querying Large Attributed Graphs Sherif SakrSameh ElniketyYuxiong He NICTA & UNSW Sydney, Australia Microsoft Research Redmond,
Data Intensive Query Processing for Large RDF Graphs Using Cloud Computing Tools Mohammad Farhan Husain, Latifur Khan, Murat Kantarcioglu and Bhavani Thuraisingham.
Ultrawrap: SPARQL Execution on Relational Data Juan F. Sequeda, Daniel P. Miranker University of Texas - Austin ISWC 2009 Seoul National University Internet.
Database Management 9. course. Execution of queries.
QMapper for Smart Grid: Migrating SQL-based Application to Hive Yue Wang, Yingzhong Xu, Yue Liu, Jian Chen and Songlin Hu SIGMOD’15, May 31–June 4, 2015.
DANIEL J. ABADI, ADAM MARCUS, SAMUEL R. MADDEN, AND KATE HOLLENBACH THE VLDB JOURNAL. SW-Store: a vertically partitioned DBMS for Semantic Web data.
Query Optimization (CB Chapter ) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems: An Application Oriented.
Storage and Retrieval of Large RDF Graph Using Hadoop and MapReduce Mohammad Farhan Husain, Pankil Doshi, Latifur Khan, Bhavani Thuraisingham University.
-1- Philipp Heim, Thomas Ertl, Jürgen Ziegler Facet Graphs: Complex Semantic Querying Made Easy Philipp Heim 1, Thomas Ertl 1 and Jürgen Ziegler 2 1 Visualization.
Chapter 13 Query Processing Melissa Jamili CS 157B November 11, 2004.
Querying Structured Text in an XML Database By Xuemei Luo.
SemSearch: A Search Engine for the Semantic Web Yuangui Lei, Victoria Uren, Enrico Motta Knowledge Media Institute The Open University EKAW 2006 Presented.
Copyright © 2004 Pearson Education, Inc.. Chapter 15 Algorithms for Query Processing and Optimization.
Michael Soffner A Variability Model for Query Optimizers Michael Soffner 1, Norbert Siegmund 1, Marko Rosenmüller 1, Janet Siegmund 1, Thomas.
Samad Paydar Web Technology Lab. Ferdowsi University of Mashhad 10 th August 2011.
Daniel J. Abadi · Adam Marcus · Samuel R. Madden ·Kate Hollenbach Presenter: Vishnu Prathish Date: Oct 1 st 2013 CS 848 – Information Integration on the.
Keyword Searching and Browsing in Databases using BANKS Seoyoung Ahn Mar 3, 2005 The University of Texas at Arlington.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Q2Semantic: A Lightweight Keyword Interface to Semantic Search Haofen Wang 1, Kang Zhang 1, Qiaoling Liu 1, Thanh Tran 2, and Yong Yu 1 1 Apex Lab, Shanghai.
An Architecture for Emergent Semantics Sven Herschel, Ralf Heese, and Jens Bleiholder Humboldt-Universität zu Berlin/ Hasso-Plattner-Institut.
Query Execution Section 15.1 Shweta Athalye CS257: Database Systems ID: 118 Section 1.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
C-Store: RDF Data Management Using Column Stores Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY Apr. 24, 2009.
Practical RDF Chapter 10. Querying RDF: RDF as Data Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.
Johannes Kepler University Linz Department of Business Informatics Data & Knowledge Engineering Altenberger Str. 69, 4040 Linz Austria/Europe
Shridhar Bhalerao CMSC 601 Finding Implicit Relations in the Semantic Web.
Semantic Publishing Benchmark Task Force Fourth TUC Meeting, Amsterdam, 03 April 2014.
Triple Stores. What is a triple store? A specialized database for RDF triples Can ingest RDF in a variety of formats Supports a query language – SPARQL.
QUERY PROCESSING RELATIONAL DATABASE KUSUMA AYU LAKSITOWENING
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
Query Processing – Query Trees. Evaluation of SQL Conceptual order of evaluation – Cartesian product of all tables in from clause – Rows not satisfying.
THE SEMANTIC WEB By Conrad Williams. Contents  What is the Semantic Web?  Technologies  XML  RDF  OWL  Implementations  Social Networking  Scholarly.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
Conceptualization Relational Model Incomplete Relations Indirect Concept Reflection Entity-Relationship Model Incomplete Relations Two Ways of Concept.
An Effective SPARQL Support over Relational Database Jing Lu, Feng Cao, Li Ma, Yong Yu, Yue Pan SWDB-ODBIS 2007 SNU IDB Lab. Hyewon Lim July 30 th, 2009.
Rate-Based Query Optimization for Streaming Information Sources Stratis D. Viglas Jeffrey F. Naughton.
RDF storages and indexes Maciej Janik September 1, 2005 Enterprise Integration – Semantic Web.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
Chapter 04 Semantic Web Application Architecture 23 November 2015 A Team 오혜성, 조형헌, 권윤, 신동준, 이인용.
Stream Reasoning with Linked Data Open Data Open Day 2013 Sina Samangooei, Nick Gibbins 26 June 2013.
Rule-based Reasoning in Semantic Text Analysis
CC La Web de Datos Primavera 2017 Lecture 7: SPARQL [i]
Triple Stores.
Chapter 15 QUERY EXECUTION.
CC La Web de Datos Primavera 2016 Lecture 7: SPARQL (1.0)
Lu Xing CS59000GDM Sept 7th, 2018.
G-CORE: A Core for Future Graph Query Languages
Query Optimization.
Triple Stores.
Query Processing.
Presentation transcript:

SPARQL Query Graph Model (How to improve query evaluation?) Ralf Heese and Olaf Hartig Humboldt-Universität zu Berlin

Ralf Heese, SPARQL Query Graph Model2 A Posting in a Newsgroup  Question: A series of SPARQL queries of the form: … WHERE { {?family ?d. ?d "Peter".} {?family ?m. ?m "Robin".} … My queries runs very slowly Simple queries on a database of 10,000 trees describing families  Answer: Put the more specific part of the query first; it makes a significant difference. …  Reply: … My time went from 33000ms 150ms. … Date: Mar 8,

Ralf Heese, SPARQL Query Graph Model3 One query, many ways to execute {?family ?d. ?d "Peter".} {?family ?m. ?m "Robin".} {?family ?p. ?p "Toller".} {?family ?m. ?m "Robin".} {?family ?d. ?d "Peter".} {?family ?p. ?p "Toller".} {?family ?m. ?m "Robin".} {?family ?p. ?p "Toller".} {?family ?d. ?d "Peter".}

Ralf Heese, SPARQL Query Graph Model4 Outline  Query processing in databases  SPARQL query graph model (SQGM)  Transforming SQGMs  Evaluation  Conclusion

Query Processing in Databases

Ralf Heese, SPARQL Query Graph Model6 Internal representation of the query SPARQL Query Graph Model SPARQL Query Graph Model Tasks of the query engine Query parsing Query rewriting QEP generation QEP execution Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion QEP = Query Execution Plan

SPARQL Query Graph Model (SQGM)

Ralf Heese, SPARQL Query Graph Model8 Extensible to new concepts of the query language Advantages Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion Supports all phases of query processing Adaptable to changes of the query language Store additional information needed for query processing SPARQL Query Graph Model SPARQL Query Graph Model

Ralf Heese, SPARQL Query Graph Model9 Basic Structures  Directed graph  Operation Head: provided variables Body: operation details  Dataflow connects the input and the output of two operations Body Head Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model10 Constructing an SQGM SELECT ?n ?c FROM WHERE { ?s rdf:type ub:GraduateStudent. OPTIONAL { ?s ub:takesCourse ?c.} ?s ub:name ?n. } ?s ub:name ?n ?s?n ?s ub:takesCourse ?c ?s?c ?s rdf:type ub:GraduateStudent ?s Join ?s?c Select ?n?c Join ?s?c?n optional ?s ?c ?s ?s ?c ?s ?n ?n ?c Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model11 Operation Types and Dataflow Types  Variable providing operations  Graph providing operations  Variable dataflows  Graph dataflows ?s ub:name ?n ?s?n ?s ub:takesCourse ?c ?s?c ?s rdf:type ub:GraduateStudent ?s Select ?n?c Join ?s?c?n Join ?s?c optional ?s ?c ?s ?s ?c ?s ?n ?n ?c Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Transforming SQGMs

Ralf Heese, SPARQL Query Graph Model13 Query Rewriting  Goals More efficient evaluation of a query Provide more options for the generation of query plans, e.g.,  Data access strategy  Join order  Selection of indexes  Means Rule-based transformation, i.e., restructuring of the query, detection of redundancies and contradictions Heuristic = set of rules Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model14 optional ?s ub:name ?n ?s?n ?s ub:takesCourse ?c ?s?c ?s rdf:type ub:GraduateStudent ?s Select ?n?c Join ?s?c?n Join ?s?c ?s ?c ?s ?s ?c ?s ?n ?n ?c Heuristic: Combine Basic Graph Pattern Basic graph pattern cannot be mergedBut these could be merged if they were operands of the same join operation. Apply transformation rules to the SQGM Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model15 Next Step ?s ub:name ?n ?s?n ?s ub:takesCourse ?c ?s?c ?s rdf:type ub:GraduateStudent ?s Join ?s?n Select ?n?c Join ?s?c?n optional ?s ?c ?s ?s ?n ?n ?c Apply another transformation rule Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion ?s rdf:type ub:GraduateStudent ?s ub:name ?n ?s ?n

Evaluation

Ralf Heese, SPARQL Query Graph Model17 Prototype  Setup Jena Semantic Web Framework ARQ – SPARQL query processor for Jena RDF graphs stored on secondary storage  Extended by SPARQL query graph model Rule engine Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model18 Interaction between ARQ and SQGM extension ARQSQGM extension Construction of an ARQ query model Translation into an SQGM Translation into an ARQ model Rewriting of the SQGM Generation of a Query Execution Plan Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion SPARQL Query Execution of the QEP Query result

Ralf Heese, SPARQL Query Graph Model19 Evaluation – Setup  RDF Data  A set of 41 SPARQL queries Different combinations of graph patterns including OPTIONAL, FILTER and UNION UnivBench (1.0) UnivBench (5.0) UnivBench (10.0) #Triples100,543624,5321,272,575 #Resources20,659129,533263,427 Generator UBA (v.1.7) of Lehigh University Benchmarks Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Ralf Heese, SPARQL Query Graph Model20 Evaluation – Results  Measured query execution time of a selected query Factor 2.4 Time needed for transformation between models < 1 ms Average time savings of approx. 87% Only one case with slightly higher execution time Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion SELECT ?n ?c FROM WHERE { ?s rdf:type ub:GraduateStudent. OPTIONAL { ?s ub:takesCourse ?c.} ?s ub:name ?n. }

Ralf Heese, SPARQL Query Graph Model21 Explanation for the Result  Fast path algorithm of Jena Perform pattern matching within the underlying relational database Match multiple filtered basic graph patterns WHERE { ?s rdf:type ub:GraduateStudent. OPTIONAL { ?s ub:takesCourse ?c.} ?s ub:name ?n. } WHERE { ?s rdf:type ub:GraduateStudent. ?s ub:name ?n. OPTIONAL { ?s ub:takesCourse ?c.} } Fast path not applicable Fast path applicable

Conclusion

Ralf Heese, SPARQL Query Graph Model23 Conclusion and Future Work  SQGM: a query model for SPARQL Supporting all phases of query processing Easy to extend Transformation rules and heuristics for SQGMs  Implementation illustrated the potential of SQGMs Outlook  Develop further heuristics to rewrite SPARQL queries  Integrate index selection into the query optimization Query Processing in Databases SPARQL Query Graph Model Transforming SQGMs Evaluation Conclusion

Thank you!