An Ordered Bag Semantics for SQL

Semantic query optimization is an important issue in many contexts of databases including information integration, view maintenance and data warehousing and can substantially improve performance, especially in today's database systems which contain gigabytes of data. A crucial issue in semantic...

Full description

Bibliographic Details
Main Author: Chinaei, Hamid R.
Format: Others
Language:en
Published: 2007
Subjects:
Online Access:http://hdl.handle.net/10012/3062
id ndltd-WATERLOO-oai-uwspace.uwaterloo.ca-10012-3062
record_format oai_dc
spelling ndltd-WATERLOO-oai-uwspace.uwaterloo.ca-10012-30622013-01-08T18:50:21ZChinaei, Hamid R.2007-05-22T13:22:30Z2007-05-22T13:22:30Z2007-05-22T13:22:30Z2007http://hdl.handle.net/10012/3062Semantic query optimization is an important issue in many contexts of databases including information integration, view maintenance and data warehousing and can substantially improve performance, especially in today's database systems which contain gigabytes of data. A crucial issue in semantic query optimization is query containment. Several papers have dealt with the problem of conjunctive query containment. In particular, some of the literature admits SQL like query languages with aggregate operations such as sum/count. Moreover, since real SQL requires a richer semantics than set semantics, there has been work on bag-semantics for SQL, essentially by introducing an interpreted column. One important technique for reasoning about query containment in the context of bag semantics is to translate the queries to alternatives using aggregate functions and assuming set semantics. Furthermore, in SQL, order by is the operator by which the results are sorted based on certain attributes and, clearly, ordering is an important issue in query optimization. As such, there has been work done in support of ordering based on the application of the domain. However, a final step is required in order to introduce a rich semantics in support. In this work, we integrate set and bag semantics to be able to reason about real SQL queries. We demonstrate an ordered bag semantics for SQL using a relational algebra with aggregates. We define a set algebra with various expressions of interest, then define syntax and semantics for bag algebra, and finally extend these definitions to ordered bags. This is done by adding a pair of additional interpreted columns to computed relations in which the first column is used in the standard fashion to capture duplicate tuples in query results, and the second adds an ordering priority to the output. We show that the relational algebra with aggregates can be used to compute these interpreted columns with sufficient flexibility to work as a semantics for standard SQL queries, which are allowed to include order by and duplicate preserving select clauses. The reduction of a workable ordered bag semantics for SQL to the relational algebra with aggregates - as we have developed it - can enable existing query containment theory to be applied in practical query containment.278095 bytesapplication/pdfenOrdered Bag Semantics for SQLObject Relational AlgebraObject Relational DatabasesAn Ordered Bag Semantics for SQLThesis or DissertationSchool of Computer ScienceMaster of MathematicsComputer Science
collection NDLTD
language en
format Others
sources NDLTD
topic Ordered Bag Semantics for SQL
Object Relational Algebra
Object Relational Databases
Computer Science
spellingShingle Ordered Bag Semantics for SQL
Object Relational Algebra
Object Relational Databases
Computer Science
Chinaei, Hamid R.
An Ordered Bag Semantics for SQL
description Semantic query optimization is an important issue in many contexts of databases including information integration, view maintenance and data warehousing and can substantially improve performance, especially in today's database systems which contain gigabytes of data. A crucial issue in semantic query optimization is query containment. Several papers have dealt with the problem of conjunctive query containment. In particular, some of the literature admits SQL like query languages with aggregate operations such as sum/count. Moreover, since real SQL requires a richer semantics than set semantics, there has been work on bag-semantics for SQL, essentially by introducing an interpreted column. One important technique for reasoning about query containment in the context of bag semantics is to translate the queries to alternatives using aggregate functions and assuming set semantics. Furthermore, in SQL, order by is the operator by which the results are sorted based on certain attributes and, clearly, ordering is an important issue in query optimization. As such, there has been work done in support of ordering based on the application of the domain. However, a final step is required in order to introduce a rich semantics in support. In this work, we integrate set and bag semantics to be able to reason about real SQL queries. We demonstrate an ordered bag semantics for SQL using a relational algebra with aggregates. We define a set algebra with various expressions of interest, then define syntax and semantics for bag algebra, and finally extend these definitions to ordered bags. This is done by adding a pair of additional interpreted columns to computed relations in which the first column is used in the standard fashion to capture duplicate tuples in query results, and the second adds an ordering priority to the output. We show that the relational algebra with aggregates can be used to compute these interpreted columns with sufficient flexibility to work as a semantics for standard SQL queries, which are allowed to include order by and duplicate preserving select clauses. The reduction of a workable ordered bag semantics for SQL to the relational algebra with aggregates - as we have developed it - can enable existing query containment theory to be applied in practical query containment.
author Chinaei, Hamid R.
author_facet Chinaei, Hamid R.
author_sort Chinaei, Hamid R.
title An Ordered Bag Semantics for SQL
title_short An Ordered Bag Semantics for SQL
title_full An Ordered Bag Semantics for SQL
title_fullStr An Ordered Bag Semantics for SQL
title_full_unstemmed An Ordered Bag Semantics for SQL
title_sort ordered bag semantics for sql
publishDate 2007
url http://hdl.handle.net/10012/3062
work_keys_str_mv AT chinaeihamidr anorderedbagsemanticsforsql
AT chinaeihamidr orderedbagsemanticsforsql
_version_ 1716572930487353344