Lin, Weisheng (2004) Type inference in SQL. Masters thesis, Concordia University.
MQ91069.pdf - Accepted Version
Type inference is an important concept in programming languages. In this Thesis, we study this problem and propose a framework for type inference in SQL, the database programming language for relational databases such as Oracle and Sybase. We consider a context-free grammar G SQL which covers the core features of the standard SQL. We add semantic rules to G SQL , following Knuth's method of "attribute grammars", to capture the set of schemas for which a query q ✹ L ( G SQL ) is well-defined. We show that G SQL is unambiguous and that our attribute grammar is non-circular. The set of schemas of a query is usually infinite. To finitely represent this set, we introduce schema tableaux, a variation of a well-known tool from database theory. By defining another attribute grammar for G SQL , we show that the set of schemas of a query q ✹ L ( G SQL ) can be finitely represented as a tableau which can be effectively computed given q as input. We discuss applications of our type inference methodology, and as a case study, we apply it on the suite of TPC Benchmark(TM) H queries, which has industry-wide relevance and a high degree of complexity. The experiments indicate the methodology in useful in practice, particularly in the context of database schema comprehension.
|Divisions:||Concordia University > Faculty of Engineering and Computer Science > Computer Science and Software Engineering|
|Item Type:||Thesis (Masters)|
|Pagination:||viii, 86 leaves : ill. ; 29 cm.|
|Degree Name:||M. Comp. Sc.|
|Thesis Supervisor(s):||Shiri, N and Grahn, G|
|Deposited By:||Concordia University Libraries|
|Deposited On:||18 Aug 2011 18:10|
|Last Modified:||04 Nov 2016 23:46|
Repository Staff Only: item control page