Abstract
In this paper we present a new approach for studying aggregations in the context of database query languages. Starting from a broad definition of aggregate function, we address our investigation from two different perspectives. We first propose a declarative notion of uniform aggregate function that refers to a family of scalar functions uniformly constructed over a vocabulary of basic operators by a bounded Turing Machine. This notion yields an effective tool to study the effect of the embedding of a class of built-in aggregate functions in a query language. All the aggregate functions most used in practice are included in this classification. We then present an operational notion of aggregate function, by considering a high-order folding constructor, based on structural recursion, devoted to compute numeric aggregations over complex values. We show that numeric folding over a given vocabulary is sometimes not able to compute, by itself, the whole class of uniform aggregate function over the same vocabulary. It turns out however that this limitation can be partially remedied by the restructuring capabilities of a query language.
This work was partially supported by CNR and by MURST.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
S. Abiteboul and C. Beeri. The power of languages for the manipulation of complex values. The VLDB Journal, 4(4):727–794, October 1995.
M. Benedikt and H. J. Keisler. Expressive power of unary counters. In International Conference on Data Base Theory, Springer-Verlag, pages 291–305, 1997.
M. Benedikt and L. Libkin. Languages for relational databases over interpreted structures. In Sixteenth ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems, pages 87–98, 1997.
L. Blum, M. Shub, and S. Smale. On a theory of computation and complexity over the real numbers: NP-completeness, recursive functions and universal machines. Bull. Amer. Math. Soc., 21:1–46, 1989.
P. Buneman, S. Naqvi, V. Tannen, and L. Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3–48, 1995.
L. S. Colby. A recursive algebra for nested relations. Information Systems, 15(5):567–582, 1990.
M. P. Consens and A. O. Mendelzon. Low complexity aggregation in GraphLog and Datalog. In International Conference on Data Base Theory, Springer-Verlag, pages 379–394, 1990.
K. Etessami. Counting quantifiers, successor relations, and logarithmic space. Journal of Computer and Systems Science, 54(3): 400–411, 1997.
E. Grädel and Y. Gurevich. Metafinite model theory. In Logic and Computational Complexity, Springer-Verlag, pages 313–366, 1995.
E. Grädel and K. Meer. Descriptive complexity theory over the real numbers. In Twenty-Seventh Annual ACM Symposium on Theory of Computing, pages 315–324, 1995.
S. Grumbach and C. Tollu. On the expressive power of counting. Theoretical Computer Science, 149(1):67–99, 1995.
R.M. Karp and V. Ramachandran. Parallel algorithms for shared-memory machines. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume A, pages 869–941. Elsevier Science Publishers (North-Holland), Amsterdam, 1990.
A. Klug. Equivalence of relational algebra and relational calculus query languages having aggregate functions. Journal of the ACM, 29(3):699–717, 1982.
L. Libkin and L. Wong. New techniques for studying set languages, bag languages and aggregate functions. In Thirteenth ACM SIGACT SIGMOD SIGART Symp. on Principles of Database Systems, pages 155–166, 1994.
L. Libkin and L. Wong. Query languages for bags and aggregate functions. Journal of Computer and System Sciences, 1997. To appear.
G. Özsoyoglu, Z. M. Özsoyoglu, V. Matos. Extending relational algebra and relational calculus with set-valued attributes and aggregate functions. ACM Transactions on Database Systems, 12(4):566–592, 1987.
A. Poulovassilis and C. Small. Algebraic query optimisation for database programming languages. The VLDB Journal, 5(2):119–132, April 1996.
W. L. Ruzzo. On uniform circuit complexity. Journal of Computer and Systems Science, 22: 365–383, 1981.
H. Schek and M. H. Scholl. The relational model with relation-valued attributes. Information Systems, 11(2):137–147, 1986.
S. J. Thomas and P. C. Fisher. Nested relational structures. In Advances in Computing Research: the theory of database, JAI Press, 1986.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cabibbo, L., Torlone, R. (1999). A Framework for the Investigation of Aggregate Functions in Database Queries. In: Beeri, C., Buneman, P. (eds) Database Theory — ICDT’99. ICDT 1999. Lecture Notes in Computer Science, vol 1540. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49257-7_24
Download citation
DOI: https://doi.org/10.1007/3-540-49257-7_24
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65452-0
Online ISBN: 978-3-540-49257-3
eBook Packages: Springer Book Archive