Reasoning with Aggregation Constraints in

We investigate the problem of using materialized views to compute answers to SQL queries with grouping and aggregation, in the presence of multiset tables. This problem is important in many applications, such as data warehousing, mobile computing, global information systems, and maintaining physical data independence, where access to local or cached materialized views may be cheaper than access to the underlying database. In addition, this problem has obvious potential in optimizing query evaluation. The problem is formally stated as nding a rewriting of an SQL query Q where the materialized views occur in the FROM clause, and the rewritten query is multiset-equivalent to Q. First, we study the case where the query has grouping and aggregation but the views do not, and show that usability of a view in evaluating a query essentially requires an isomorphism between the view and a portion of the query. We present a rewriting algorithm that generates all possible rewritings of the query using the views (for the case of equality predicates); when using multiple views, considering the views iteratively in any order yields all possible rewritings. Second, we study the case where the query and the views both have grouping and aggregation, identify the conditions under which the aggregation information present in a view is suucient to perform the aggregate computations required in the query, and present a rewriting algorithm. Third, we outline how our techniques can be extended to take advantage of set-valued queries and views in the presence of keys or SELECT DISTINCT.

[1]  Divesh Srivastava,et al.  Data model and query evaluation in global information systems , 1995, Journal of Intelligent Information Systems.

[2]  Alon Y. Halevy,et al.  Reasoning with Aggregation Constraints , 1996, EDBT.

[3]  Kenneth A. Ross,et al.  Adapting materialized views after redefinitions , 1995, SIGMOD '95.

[4]  Marvin H. Solomon,et al.  The GMAP: a versatile tool for physical data independence , 1996, The VLDB Journal.

[5]  Anindya Datta Research issues in databases for ARCS: Active Rapidly Changing data Systems , 1994, SGMD.

[6]  Vasilis Vassalos,et al.  Answering Queries Using Views , 2009, Encyclopedia of Database Systems.

[7]  Ashish Gupta,et al.  Generalized Projections: A Powerful Approach To Aggregation , 1995 .

[8]  M. Stonebraker,et al.  On Rules, Procedures, Caching and Views in Data Base Systems , 1994, SIGMOD Conference.

[9]  Inderpal Singh Mumick,et al.  Deriving Production Rules For Incremental View Maintenance , 1999 .

[10]  A. Prasad Sistla,et al.  Data replication for mobile computers , 1994, SIGMOD '94.

[11]  Nick Roussopoulos,et al.  The Implementation and Performance Evaluation of the ADMS Query Optimizer: Integrating Query Result Caching and Matching , 1994, EDBT.

[12]  Tomasz Imielinski,et al.  Sleepers and workaholics: caching strategies in mobile environments , 1994, SIGMOD '94.

[13]  Frank Wm. Tompa,et al.  Eeciently Updating Materialized Views , 1986 .

[14]  Per-Ake Larson,et al.  Performing Group-By before Join , 1994, ICDE 1994.

[15]  V. S. Subrahmanian,et al.  Maintaining views incrementally , 1993, SIGMOD Conference.

[16]  Alon Y. Halevy,et al.  Query Optimization by Predicate Move-Around , 1994, VLDB.

[17]  Sheldon J. Finkelstein Common expression analysis in database applications , 1982, SIGMOD '82.

[18]  Kenneth A. Ross,et al.  Foundations of Aggregation Constraints , 1994, PPCP.

[19]  Jennifer Widom,et al.  View maintenance in a warehousing environment , 1995, SIGMOD '95.

[20]  Surajit Chaudhuri,et al.  Optimization of real conjunctive queries , 1993, PODS '93.

[21]  Timos K. Sellis,et al.  Intelligent caching and indexing techniques for relational database systems , 1988, Inf. Syst..

[22]  Kyuseok Shim,et al.  Including Group-By in Query Optimization , 1994, VLDB.

[23]  E IoannidisYannis,et al.  The GMAP: a versatile tool for physical data independence , 1996, VLDB 1996.

[24]  Per-Åke Larson,et al.  Query Transformation for PSJ-Queries , 1987, VLDB.