sparql to sql translation based on an intermediate query
play

SPARQL to SQL Translation Based on an Intermediate Query Language - PowerPoint PPT Presentation

SPARQL to SQL Translation Based on an Intermediate Query Language Sami Kiminki, Jussi Knuuttila and Vesa Hirvisalo Department of Computer Science and Engineering Aalto University, School of Science and Technology November 8th, 2010


  1. SPARQL to SQL Translation Based on an Intermediate Query Language Sami Kiminki, Jussi Knuuttila and Vesa Hirvisalo Department of Computer Science and Engineering Aalto University, School of Science and Technology November 8th, 2010

  2. Introduction The setup ◮ RDF graph stored into an SQL database ◮ RDF graph is queried by SPARQL queries ◮ For efficient evaluation, translate SPARQL into SQL ◮ To reduce round-trips and to allow more SQL DB optimization, should be 1 × SPARQL → 1 × SQL translation ◮ We want schema flexibility ◮ We know from benchmarks that one schema does not fit all ◮ We want query optimization ◮ It’s not that we don’t trust the databases ◮ But sometimes we can do better Examples are translated using Type-ARQuE 0.2 SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 2/20

  3. Translation Overview The familiar approach Our approach ◮ SPARQL to SPARQL ◮ SPARQL to IL algebra ◮ Simplify, normalize, transform ◮ Simplify, normalize ◮ Optimize ◮ SPARQL algebra to ◮ Specialize SQL ◮ IL to SQL AQL (Abstract Query Language) is our IL (Intermediate Ianguage) SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 3/20

  4. Why Intermediate Query Language and not SPARQL algebra? ◮ SPARQL algebra defines the SPARQL semantics ◮ But it is not designed specifically for SPARQL-to-SQL translation ◮ Intermediate query language can be designed specifically for SPARQL-to-SQL ◮ May operate on lower-level and simpler semantics ◮ Additional translate-time information may be easily attached ◮ More powerful transformations can be used for, e.g. , optimizations ◮ To emphasize: focus on a single task ◮ Side note ◮ Similar shift has happened in computer program compilers (syntax-directed to IR-based) SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 4/20

  5. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  6. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  7. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  8. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  9. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  10. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  11. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

  12. Contents of the Rest of the Talk For reference: Type-ARQuE translation passes ◮ AQL Semantics ◮ Basics, joins, expressions SPARQL parse to AST SPARQL AST normalize ◮ Type inference front-end Variable binding Generate AQL ◮ SPARQL to AQL translation Normalization passes ◮ Variable binding Type inference General Empty type sets to null s ◮ AQL transformations / lowering preparation Nested join flattening ◮ Nested join flattening Comparison optimization Function variant selection (postponed after conclusions) Property value requirer ◮ Triple component access Triple access resolution resolution Specialization Expression optimization Function variant selection ◮ AQL to SQL Typecast injection ◮ Conclusions SQL access collection AQL to SQL SQL emit SPARQL to SQL Translation Based on an Intermediate Query Language 2010-11-08 5/20

Recommend


More recommend