ACM SIGMOD Anthology VLDB dblp.uni-trier.de

Translating and Optimizing SQL Queries Having Aggregates.

Günter von Bültzingsloewen: Translating and Optimizing SQL Queries Having Aggregates. VLDB 1987: 235-243
@inproceedings{DBLP:conf/vldb/Bultzingsloewen87,
  author    = {G{\"u}nter von B{\"u}ltzingsloewen},
  editor    = {Peter M. Stocker and
               William Kent and
               Peter Hammersley},
  title     = {Translating and Optimizing SQL Queries Having Aggregates},
  booktitle = {VLDB'87, Proceedings of 13th International Conference on Very
               Large Data Bases, September 1-4, 1987, Brighton, England},
  publisher = {Morgan Kaufmann},
  year      = {1987},
  isbn      = {0-934613-46-X},
  pages     = {235-243},
  ee        = {db/conf/vldb/Bultzingsloewen87.html},
  crossref  = {DBLP:conf/vldb/87},
  bibsource = {DBLP, http://dblp.uni-trier.de}
}
BibTeX

Abstract

In this paper, we give a precise definition of the semantics of SQL queries having aggregate functions, identify the problems associated with the optimization of such queries and give some solutions. The semantics of SQL queries is defined by translating them into expressions of an extended relational calculus (extensions are necessary for a correct treatment of aggregate functions and null values). The discussion of the optimization problems is based on a new transformation of a relational calculus expression into relational algebra. By investigating the transformation of aggregate functions we are able to identify two major problems: correct integration of the values of aggregate functions applied to empty relations and unnecessary computation of unneeded function values. To solve these problems we propose to interpret an aggregate function applied to a calculus expression with some free variables as a function on the attributes of these variables that are referenced in the expression. Doing so, we are able to develop several new processing strategies that should be considered by an optimizer.

Copyright © 1987 by the VLDB Endowment. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by the permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or special permission from the Endowment.


Online Paper

ACM SIGMOD Anthology

CDROM Version: Load the CDROM "Volume 1 Issue 4, VLDB '75-'88" and ... DVD Version: Load ACM SIGMOD Anthology DVD 1" and ... BibTeX

Printed Edition

Peter M. Stocker, William Kent, Peter Hammersley (Eds.): VLDB'87, Proceedings of 13th International Conference on Very Large Data Bases, September 1-4, 1987, Brighton, England. Morgan Kaufmann 1987, ISBN 0-934613-46-X
Contents BibTeX

References

[ANSI85]
...
[CeGo85]
Stefano Ceri, Georg Gottlob: Translating SQL Into Relational Algebra: Optimization, Semantics, and Equivalence of SQL Queries. IEEE Trans. Software Eng. 11(4): 324-345(1985) BibTeX
[Codd72]
E. F. Codd: Relational Completeness of Data Base Sublanguages. In: R. Rustin (ed.): Database Systems: 65-98, Prentice Hall and IBM Research Report RJ 987, San Jose, California : (1972) BibTeX
[JaKo83]
Matthias Jarke, Jürgen Koch: Range Nesting: A Fast Method to Evaluate Quantified Queries. SIGMOD Conference 1983: 196-206 BibTeX
[JaKo84]
Matthias Jarke, Jürgen Koch: Query Optimization in Database Systems. ACM Comput. Surv. 16(2): 111-152(1984) BibTeX
[Jarke85]
Matthias Jarke: Common Subexpression Isolation in Multiple Query Optimization. Query Processing in Database Systems 1985: 191-205 BibTeX
[Kies85]
Werner Kießling: On Semantic Reefs and Efficient Processing of Correlation Queries with Aggregates. VLDB 1985: 241-250 BibTeX
[Kim82]
Won Kim: On Optimizing an SQL-like Nested Query. ACM Trans. Database Syst. 7(3): 443-469(1982) BibTeX
[Klug82]
Anthony C. Klug: Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions. J. ACM 29(3): 699-717(1982) BibTeX
[LeVi85]
...
[Maie83]
David Maier: The Theory of Relational Databases. Computer Science Press 1983, ISBN 0-914894-42-0
Contents BibTeX
[Seli79]
Patricia G. Selinger, Morton M. Astrahan, Donald D. Chamberlin, Raymond A. Lorie, Thomas G. Price: Access Path Selection in a Relational Database Management System. SIGMOD Conference 1979: 23-34 BibTeX

Referenced by

  1. Praveen Seshadri, Hamid Pirahesh, T. Y. Cliff Leung: Complex Query Decorrelation. ICDE 1996: 450-458
  2. Lars Bækgaard, Leo Mark: Incremental Computation of Nested Relational Query Expressions. ACM Trans. Database Syst. 20(2): 111-148(1995)
  3. Nick Kline, Richard T. Snodgrass: Computing Temporal Aggregates. ICDE 1995: 222-231
  4. Max J. Egenhofer: Spatial SQL: A Query and Presentation Language. IEEE Trans. Knowl. Data Eng. 6(1): 86-95(1994)
  5. Weipeng P. Yan, Per-Åke Larson: Performing Group-By before Join. ICDE 1994: 89-100
  6. G. N. Paulley, Per-Åke Larson: Exploiting Uniqueness in Query Optimization. ICDE 1994: 68-79
  7. Umeshwar Dayal, Gene T. J. Wuu: A Uniform Approach to Processing Temporal Queries. VLDB 1992: 407-418
  8. Mauro Negri, Giuseppe Pelagatti, Licia Sbattella: Formal Semantics of SQL Queries. ACM Trans. Database Syst. 16(3): 513-534(1991)
  9. Martin Gogolla, Uwe Hohenstein: Towards a Semantic View of an Extended Entity-Relationship Model. ACM Trans. Database Syst. 16(3): 369-416(1991)
  10. Ryohei Nakano: Translation with Optimization from Relational Calculus to Relational Algebra Having Aggregate Functions. ACM Trans. Database Syst. 15(4): 518-557(1990)
  11. Uwe Hohenstein, Gregor Engels: Formal Semantics of an Entity-Relationship-Based Query Language. ER 1990: 171-188
  12. Uwe Hohenstein, Martin Gogolla: A Calculus for an Extended Entity-Relationship Model Incorporating Arbitrary Data Operations and Aggregate Functions. ER 1988: 129-148
BibTeX
ACM SIGMOD Anthology - DBLP: [Home | Search: Author, Title | Conferences | Journals]
VLDB Proceedings: Copyright © by VLDB Endowment,
ACM SIGMOD Anthology: Copyright © by ACM (info@acm.org), Corrections: anthology@acm.org
DBLP: Copyright © by Michael Ley (ley@uni-trier.de), last change: Sat May 16 23:45:35 2009