Equivalence of nested queries with mixed semantics

We consider the problem of deciding query equivalence for a conjunctive language in which queries output complex objects composed from a mixture of nested, unordered collection types. Using an encoding of nested objects as flat relations, we translate the problem to deciding the equivalence between encodings output by relational conjunctive queries. This encoding equivalence cleanly unifies and generalizes previous results for deciding equivalence of conjunctive queries evaluated under various processing semantics. As part of our characterization of encoding equivalence, we define a normal form for encoding queries and contend that this normal form offers new insight into the fundamental principles governing the behaviour of nested aggregation.

[1]  David DeHaan Equivalence of Nested Queries with Mixed Semantics ( extended version ) , 2009 .

[2]  Divesh Srivastava,et al.  Answering Queries Using Views. , 1999, PODS 1995.

[3]  Silvio Micali,et al.  Advances in Computing Research: The Theory of Databases , 1986 .

[4]  Philip A. Bernstein,et al.  Compiling mappings to bridge applications and databases , 2007, SIGMOD '07.

[5]  Werner Nutt,et al.  Equivalences among aggregate queries with negation , 2005, TOCL.

[6]  Mihalis Yannakakis,et al.  Equivalences Among Relational Expressions with the Union and Difference Operators , 1980, J. ACM.

[7]  Hamid Pirahesh,et al.  Answering complex SQL queries using automatic summary tables , 2000, SIGMOD '00.

[8]  ViewsShaul DarAT,et al.  Reasoning with Aggregation Constraints in , 2007 .

[9]  Jan Van den Bussche,et al.  Well-definedness and semantic type-checking for the nested relational calculus , 2007, Theor. Comput. Sci..

[10]  Jingren Zhou,et al.  Stacked indexed views in microsoft SQL server , 2005, SIGMOD '05.

[11]  Won Kim,et al.  On optimizing an SQL-like nested query , 1982, TODS.

[12]  S. Sudarshan,et al.  Extending query rewriting techniques for fine-grained access control , 2004, SIGMOD '04.

[13]  Nicole Bidoit,et al.  The Verso Algebra or How to Answer Queries with Fewer Joins , 1987, J. Comput. Syst. Sci..

[14]  Hamid Pirahesh,et al.  Magic conditions , 1990, PODS.

[15]  Gultekin Özsoyoglu,et al.  Extending relational algebra and relational calculus with set-valued attributes and aggregate functions , 1987, TODS.

[16]  Jennifer Widom,et al.  Constraint checking with partial information , 1994, PODS.

[17]  Jennifer Widom,et al.  Database Systems: The Complete Book , 2001 .

[18]  Werner Nutt,et al.  Deciding equivalences among conjunctive aggregate queries , 2007, JACM.

[19]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[20]  Alon Y. Halevy,et al.  Containment of Nested XML Queries , 2004, VLDB.

[21]  Divesh Srivastava,et al.  Answering Queries Using Views. , 1999, PODS 1995.

[22]  Ron van der Meyden,et al.  The complexity of querying indefinite data about linearly ordered domains , 1992, J. Comput. Syst. Sci..

[23]  Anthony C. Klug On conjunctive queries containing inequalities , 1988, JACM.

[24]  Dan Suciu,et al.  Deciding containment for queries with complex objects (extended abstract) , 1997, PODS '97.

[25]  Limsoon Wong,et al.  New techniques for studying set languages, bag languages and aggregate functions , 1994, PODS '94.

[26]  Raghu Ramakrishnan,et al.  Containment of conjunctive queries: beyond relations as sets , 1995, TODS.

[27]  David S. Johnson,et al.  Testing containment of conjunctive queries under functional and inclusion dependencies , 1982, J. Comput. Syst. Sci..

[28]  Divesh Srivastava,et al.  Answering Queries with Aggregation Using Views , 1996, VLDB.

[29]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[30]  Jeffrey Xu Yu,et al.  Algebraic equivalences of nested relational operators , 2005, Inf. Syst..

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

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

[33]  Marc H. Scholl,et al.  Theoretical Foundation of Algebraic Optimization Utilizing Unnormalized Relations , 1986, ICDT.

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

[35]  Ashish Gupta,et al.  Aggregate-Query Processing in Data Warehousing Environments , 1995, VLDB.

[36]  Patrick C. Fischer,et al.  Nested Relational Structures , 1986, Adv. Comput. Res..

[37]  Frank Wm. Tompa,et al.  Maintaining materialized views without accessing base data , 1988, Inf. Syst..

[38]  Maurizio Rafanelli,et al.  Querying aggregate data , 1999, PODS '99.

[39]  Sara Cohen,et al.  Equivalence of queries combining set and bag-set semantics , 2006, PODS '06.

[40]  Stavros S. Cosmadakis,et al.  Optimization of Nested SQL Queries by Tableau Equivalence , 1999, DBPL.

[41]  Umeshwar Dayal,et al.  Of Nests and Trees: A Unified Approach to Processing Queries That Contain Nested Subqueries, Aggregates, and Quantifiers , 1987, VLDB.

[42]  Limsoon Wong,et al.  Principles of Programming with Complex Objects and Collection Types , 1995, Theor. Comput. Sci..

[43]  Kenneth A. Ross,et al.  Foundations of Aggregation Constraints , 1994, Theor. Comput. Sci..