On the Power of Aggregation in Relational Query Languages

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.

[1]  E. T. An Introduction to the Theory of Numbers , 1946, Nature.

[2]  Neil Immerman,et al.  Languages that Capture Complexity Classes , 1987, SIAM J. Comput..

[3]  Neil Immerman,et al.  On Uniformity within NC¹ , 1990, J. Comput. Syst. Sci..

[4]  Limsoon Wong,et al.  Query Languages for Bags and Aggregate Functions , 1997, J. Comput. Syst. Sci..

[5]  Limsoon Wong,et al.  Principles of Programming with Complex Objects and Collection Types , 1995, Theor. Comput. Sci..

[6]  L. E. Dickson Introduction to the theory of numbers , 1933 .

[7]  Juha Nurmonen,et al.  On Winning Strategies with Unary Quantifiers , 1996, J. Log. Comput..

[8]  Ronald Fagin,et al.  On monadic NP vs. monadic co-NP , 1993, [1993] Proceedings of the Eigth Annual Structure in Complexity Theory Conference.

[9]  Limsoon Wong,et al.  Query languages for bags: expressive power and complexity , 1996, SIGA.

[10]  H. Gaifman On Local and Non-Local Properties , 1982 .

[11]  Limsoon Wong,et al.  Aggregate Functions, Conservative Extensions, and Linear Orders , 1993, DBPL.

[12]  Yuri Gurevich,et al.  Toward logic tailored for computational complexity , 1984 .

[13]  Limsoon Wong,et al.  Local properties of query languages , 1997, Theor. Comput. Sci..

[14]  Leonid Libkin On the forms of locality over finite models , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[15]  N. Immerman,et al.  On uniformity within NC 1 . , 1988 .

[16]  Y. Gurevich On Finite Model Theory , 1990 .

[17]  Ronald Fagin,et al.  Easier Ways to Win Logical Games , 1996, Descriptive Complexity and Finite Models.

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

[19]  Limsoon Wong,et al.  Conservativity of Nested Relational Calculi with Internal Generic Functions , 1994, Inf. Process. Lett..

[20]  Kousha Etessami,et al.  Counting quantifiers, successor relations, and logarithmic space , 1995, Proceedings of Structure in Complexity Theory. Tenth Annual IEEE Conference.

[21]  Limsoon Wong,et al.  New techniques for studying set languages, bag languages and aggregate functions , 1994, PODS '94.

[22]  Alberto O. Mendelzon,et al.  Low Complexity Aggregation in GraphLog and Datalog , 1990, Theor. Comput. Sci..

[23]  E. Lander,et al.  Describing Graphs: A First-Order Approach to Graph Canonization , 1990 .

[24]  Limsoon Wong,et al.  Normal Forms and Conservative Extension Properties for Query Languages over Collection Types , 1996, J. Comput. Syst. Sci..

[25]  A. Selman,et al.  Complexity theory retrospective II , 1998 .

[26]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[27]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .