Login | Register

Type inference in SQL


Type inference in SQL

Lin, Weisheng (2004) Type inference in SQL. Masters thesis, Concordia University.

[thumbnail of MQ91069.pdf]
Text (application/pdf)
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 > Gina Cody School of Engineering and Computer Science > Computer Science and Software Engineering
Item Type:Thesis (Masters)
Authors:Lin, Weisheng
Pagination:viii, 86 leaves : ill. ; 29 cm.
Institution:Concordia University
Degree Name:M. Comp. Sc.
Program:Computer Science
Thesis Supervisor(s):Shiri, N and Grahn, G
Identification Number:QA 76.73 S67L56 2004
ID Code:7920
Deposited By: Concordia University Library
Deposited On:18 Aug 2011 18:10
Last Modified:13 Jul 2020 20:02
Related URLs:
All items in Spectrum are protected by copyright, with all rights reserved. The use of items is governed by Spectrum's terms of access.

Repository Staff Only: item control page

Downloads per month over past year

Research related to the current document (at the CORE website)
- Research related to the current document (at the CORE website)
Back to top Back to top