SlideServe
Menu
Preferences
© SlideServe · v2026

Enhancing SQL with Meta-Querying: The Meta-SQL Approach for Enterprise Databases

gardenia-dudley avatar
8 slides · 237 Views · Nov 13, 2014

Meta-SQL is a conservative extension of SQL designed to empower meta-querying in enterprise databases. Traditional SQL queries often struggle to retrieve metadata such as view definitions and stored procedures. Meta-SQL allows users to query stored queries alongside ordinary data, enabling insights like determining which queries involve the most joins, identifying empty result queries, and finding common subexpressions in workloads. By incorporating XML and XSLT within SQL, this approach enhances compatibility with SQL99-compliant DBMS systems and facilitates the analysis of complex data retrieval patterns.

Enhancing SQL with Meta-Querying: The Meta-SQL Approach for Enterprise Databases - slide 1
01 / 8Enhancing SQL with Meta-Querying: The Meta-SQL Approach for Enterprise Databases
1 / 17

Download Presentation

Enhancing SQL with Meta-Querying: The Meta-SQL Approach for Enterprise Databases
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

More Related Content

Presentation Transcript
  1. Meta-SQL: Towards practical meta-querying Gottfried Vossen University of Muenster Jan Van den Bussche Stijn Vansummeren Limburgs Universitair Centrum

  2. Context Enterprise databases contain not only data but also queries: • view definitions • stored procedures • usage logs • workloads • software engineering Stored as long strings… • Difficult to query in standard SQL

  3. Goal Allow meta-querying: query the stored queries together with ordinary data • Which queries do the most joins? • Which queries return an empty answer? • What are common subexpressions in this workload? • If I do these updates, which materialized views change their value?

  4. Contribution Meta-SQL: conservative extension of SQL to allow meta-querying • store queries in XML • call XSLT within SQL • add XML-variables • add an EVAL function Works on top of any SQL99-compliant DBMS Prototype with DB2 UDB

  5. Call XSLT within SQL Which queries do the most joins? select name from Views where count_tables(def) = (select max( ( )) from Views) count_tables def written in XSLT view definition in XML

  6. XML-variables What are the common subqueries? arbitrary Xpath-expression select s from Views, s in def[ ] group by s having count(name)>=2 //query s ranges over all query-subelements of stored query

  7. EVAL function Which queries return an empty answer? select name from Views where not exists (select * from EVAL(def)) EVAL produces query results in SQL row variable UEVAL produces them in XML-variable

  8. Implementation compilation execution XSLT functions Meta-SQL query SQL statements (CREATE FUNCTION) Java wrappers Rewriting in SQL99 SAXON (XML processing) Extract (XML variables) EVAL