Query unnesting in object-oriented databases

There is already a sizable body of proposals on OODB query optimization. One of the most challenging problems in this area is query unnesting, where the embedded query can take any form, including aggregation and universal quantification. Although there is already a number of proposed techniques for query unnesting, most of these techniques are applicable to only few cases. We believe that the lack of a general and simple solution to the query unnesting problem is due to the lack of a uniform algebra that treats all operations (including aggregation and quantification) in the same way. This paper presents a new query unnesting algorithm that generalizes many unnesting techniques proposed recently in the literature. Our system is capable of removing any form of query nesting using a very simple and efficient algorithm. The simplicity of the system is due to the use of the monoid comprehension calculus as an intermediate form for OODB queries. The monoid comphrehension calculus treats operations over multiple collection types, aggregates, and quantifiers in a similar way, resulting in a uniform way of unnesting queries, regardless of their type of nesting.

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

[2]  M. Muralikrishna,et al.  Improved Unnesting Algorithms for Join Aggregate SQL Queries , 1992, VLDB.

[3]  Philip Wadler,et al.  Improving list comprehension database queries , 1989, Fourth IEEE Region 10 International Conference TENCON.

[4]  Goetz Graefe,et al.  Experiences building the open OODB query optimizer , 1993, SIGMOD Conference.

[5]  David Maier,et al.  An Algebraic Framework for Physical OODB Design , 1995, DBPL.

[6]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[7]  David Maier,et al.  Specifying Rule-Based Query Optimizers in a Reflective Framework , 1993, DOOD.

[8]  Z. Meral Özsoyoglu,et al.  Processing OODB queries by O-Algebra , 1996, CIKM '96.

[9]  Limsoon Wong,et al.  Normal forms and conservative properties for query languages over collection types , 1993, PODS.

[10]  Dan Suciu,et al.  Comprehension syntax , 1994, SGMD.

[11]  Stanley B. Zdonik,et al.  Changing the rules: transformations for rule-based optimizers , 1998, SIGMOD '98.

[12]  Guido Moerkotte,et al.  Nested Queries in Object Bases , 1993, DBPL.

[13]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[14]  Leonidas Fegaras An Experimental Optimizer for OQL , 1997 .

[15]  Guido Moerkotte,et al.  Efficient Evaluation of Aggregates on Bulk Types , 1995, DBPL.

[16]  Philip W. Trinder,et al.  Comprehensions, a Query Notation for DBPLs , 1992, DBPL.

[17]  Simon Peyton Jones,et al.  The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science) , 1987 .

[18]  Guido Moerkotte,et al.  Eecient Evaluation of Aggregates on Bulk Types , 1995 .

[19]  Peter M. G. Apers,et al.  Optimization of Nested Queries in a Complex Object Model , 1994, EDBT.

[20]  R. G. G. Cattell,et al.  The Object Database Standard: ODMG-93 , 1993 .

[21]  David J. DeWitt,et al.  Shoring up persistent applications , 1994, SIGMOD '94.

[22]  David Jordan,et al.  The Object Database Standard: ODMG 2.0 , 1997 .

[23]  David Maier,et al.  Towards an effective calculus for object query languages , 1995, SIGMOD '95.

[24]  Limsoon Wong,et al.  Querying Nested Collections , 1994 .

[25]  Guido Moerkotte,et al.  Optimizing Queries with Universal Quantification in Object-Oriented and Object-Relational Databases , 1997, VLDB.

[26]  Harry K. T. Wong,et al.  Optimization of nested SQL queries revisited , 1987, SIGMOD '87.