A Framework for the Investigation of Aggregate Functions in Database Queries
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.
Unable to display preview. Download preview PDF.
- 2.M. Benedikt and H. J. Keisler. Expressive power of unary counters. In International Conference on Data Base Theory, Springer-Verlag, pages 291–305, 1997.Google Scholar
- 3.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.Google Scholar
- 7.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.Google Scholar
- 9.E. Grädel and Y. Gurevich. Metafinite model theory. In Logic and Computational Complexity, Springer-Verlag, pages 313–366, 1995.Google Scholar
- 10.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.Google Scholar
- 12.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.Google Scholar
- 14.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.Google Scholar
- 15.L. Libkin and L. Wong. Query languages for bags and aggregate functions. Journal of Computer and System Sciences, 1997. To appear.Google Scholar
- 20.S. J. Thomas and P. C. Fisher. Nested relational structures. In Advances in Computing Research: the theory of database, JAI Press, 1986.Google Scholar