Abstract
It is a folk result that relational algebra or calculus extended with aggregate functions cannot compute the transitive closure. However, proving folk results is sometimes a nontrivial task. In this paper, we tell the story of the work on expressive power of relational languages with aggregate functions. We also prove by far the most powerful result that describes the expressiveness of such languages. There are four main features of our result that distinguish it from previous ones:
-
1.
It does not rely on any unproven assumptions, such as separation of complexity classes.
-
2.
It establishes a general property of queries definable with the help of aggregate functions. This property can easily be applied to prove many expressiveness bounds.
-
3.
The class of aggregate functions is much larger than any previously considered.
-
4.
The proof is “non-syntactic.” That is, it does not depend on a specific syntax chosen for the language with aggregates.
Furthermore, our result gives a very general condition that implies inexpressibility of recursive queries such as the transitive closure in an extension of relational calculus with grouping and aggregation. This extension allows us to use rational arithmetic and operations such as summation and product over a column. So, aggregation that exceeds what is allowed by most commercial systems is still not powerful enough to encode recursion mechanisms.
Part of this work was done while the first author was visiting Institute of Systems Science.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
S. Abiteboul, R. Hull, V. Vianu, Foundations of Databases, Addison Wesley, 1995.
A. V. Aho and J. D. Ullman. Universality of data retrieval languages. In Proceedings of 6th Symposium on Principles of Programming Languages, Texas, pages 110–120, January 1979.
D.A. Barrington, N. Immerman, H. Straubing. On uniformity within NCI. JCSS, 41:274–306,1990.
P. Buneman, S. Naqvi, V. Tannen, L. Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3–48, September 1995.
M. Consens and A. Mendelzon. Low complexity aggregation in GraphLog and Datalog, Theoretical Computer Science 116 (1993), 95–116. Extended abstract in ICDT'90.
G. Dong, L. Libkin, L. Wong. Local properties of query languages. Proc. Int. Conf. on Database Theory, Springer LNCS 1186, 1997, pages 140–154.
H. D. Ebbinghaus and J. Flum. Finite Model Theory. Springer Verlag, 1995.
K. Etessami. Counting quantifiers, successor relations, and logarithmic space, Journal of Computer and System Sciences 54 (1996), 400–411. Extended abstract in Structure in Complexity'95.
R. Fagin. Easier ways to win logical games. In Proc. DIMACS Workshop on Finite Model Theory and Descriptive Complexity, 1996.
R. Fagin, L. Stockmeyer, M. Vardi, On monadic NP vs monadic co-NP, Information and Computation, 120 (1994), 78–92.
H. Gaifman, On local and non-local properties, in “Proceedings of the Herbrand Symposium, Logic Colloquium '81,” North Holland, 1982.
S. Grumbach, L. Libkin, T. Milo and L. Wong. Query languages for bags: expressive power and complexity. SIGACT News, 27 (1996), 30–37.
Y. Gurevich. Toward logic tailored for computational complexity. In Proceedings of Computation and Proof Theory, Springer Lecture Notes in Mathematics, vol. 1104, 1984, pages 175–216.
N. Immerman. Languages that capture complexity classes. SIAM Journal of Computing, 16:760–778, 1987.
N. Immerman and E. Lander. Describing graphs: A first order approach to graph canonization. In “Complexity Theory Retrospective”, Springer Verlag, Berlin, 1990.
L. Libkin. On the forms of locality over finite models. In LICS'97, pages 204–215.
L. Libkin and L. Wong. Query languages for bags and aggregate functions. JCSS, 55 (1997), 241–272.
L. Libkin and L. Wong. Aggregate functions, conservative extension, and linear orders, in “Proceedings of 4th International Workshop on Database Programming Languages,” Manhattan, New York, August 1993.
L. Libkin and L. Wong. Conservativity of nested relational calculi with internal generic functions. Information Processing Letters, 49 (1994), 273–280.
I. Niven and H.S. Zuckerman. Introduction to the Theory of Numbers. Wiley, 1980.
J. Nurmonen. On winning strategies with unary quantifiers. J. Logic and Computation, 6 (1996), 779–798.
L. Wong. Normal forms and conservative properties for query languages over collection types. JCSS 52(1):495–505, June 1996.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Libkin, L., Wong, L. (1998). On the power of aggregation in relational query languages. In: Cluet, S., Hull, R. (eds) Database Programming Languages. DBPL 1997. Lecture Notes in Computer Science, vol 1369. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-64823-2_15
Download citation
DOI: https://doi.org/10.1007/3-540-64823-2_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64823-9
Online ISBN: 978-3-540-68534-0
eBook Packages: Springer Book Archive