Abstract
We study adding aggregate operators, such as summing up elements of a column of a relation, to logics with counting mechanisms. The primary motivation comes from database applications, where aggregate operators are present in all real life query languages. Unlike other features of query languages, aggregates are not adequately captured by the existing logical formalisms. Consequently, all previous approaches to analyzing the expressive power of aggregation were only capable of producing partial results, depending on the allowed class of aggregate and arithmetic operations.We consider a powerful counting logic, and extend it with the set of all aggregate operators. We show that the resulting logic satisfies analogs of Hanf's and Gaifman's theorems, meaning that it can only express local properties. We consider a database query language that expresses all the standard aggregates found in commercial query languages, and show how it can be translated into the aggregate logic, thereby providing a number of expressivity bounds, that do not depend on a particular class of arithmetic functions, and that subsume all those previously known. We consider a restricted aggregate logic that gives us a tighter capture of database languages, and also use it to show that some questions on expressivity of aggregation cannot be answered without resolving some deep problems in complexity theory.
- ABITEBOUL, S., HULL, R., AND VIANU, V. 1995. Foundations of Databases. Addison-Wesley, Reading, Mass.]] Google ScholarDigital Library
- ABITEBOUL, S., AND VIANU, V. 1995. Computing with first-order logic. J. Comput. Syst. Sci. 50, 309-335.]] Google ScholarDigital Library
- ALLENDER, E. 1996. Circuit complexity before the dawn of the new millennium. In Proceedings of the 16th Conference on Foundations of Software Technology and Theoretical Computer Science (FST&TCS'96). Lecture Notes in Computer Science, vol. 1180. Springer-Verlag, New York, pp. 1-18.]] Google ScholarDigital Library
- BARRINGTON, D. M., IMMERMAN, N., AND STRAUBING, H. 1990. On uniformity within NC 1 .J. Comput. Syst. Sci. 41, 274-306.]] Google ScholarDigital Library
- BUNEMAN, P., NAQVI, S., TANNEN,V.,AND WONG, L. 1995. Principles of programming with complex objects and collection types. Theoret. Comput. Sci. 149, 1, (Sept.) 3-8.]] Google ScholarDigital Library
- CABIBBO, L., AND TORLONE, R. A framework for the investigation of aggregate functions in database queries. In International Conference on Data Base Theory 1999. Lecture Notes in Computer Science, vol. 1540. Springer-Verlag, New York, pp. 383-397.]] Google ScholarDigital Library
- CAI, J., FURER, M., AND IMMERMAN, N. 1992. On optimal lower bound on the number of variables for graph identification. Combinatorica 12, 389-410.]]Google ScholarCross Ref
- COHEN, S., NUTT,W.,AND SEREBRENIK, A. 1999. Rewriting aggregate queries using views. In Proceedings of the 18th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. ACM, New York, pp. 155-166.]] Google ScholarDigital Library
- CONSENS, M., AND MENDELZON, A. 1993. Low complexity aggregation in GraphLog and Datalog, Theoret. Comput. Sci. 116, 95-116.]] Google ScholarDigital Library
- DONG, G., LIBKIN, L., AND WONG, L. 2000. Local properties of query languages. Theoret. Comput. Sci. 239, 277-308.]] Google ScholarDigital Library
- EBBINGHAUS, H.-D., AND FLUM, J. 1995. Finite Model Theory. Springer-Verlag, New York.]]Google Scholar
- ETESSAMI, K. 1997. Counting quantifiers, successor relations, and logarithmic space. J. Comput. Syst. Sci. 54, 400-411.]] Google ScholarDigital Library
- FAGIN, R., STOCKMEYER, L., AND VARDI, M. 1995. On monadic NP vs monadic co-NP. Inf. Comput. 120, 78-92.]] Google ScholarDigital Library
- FEGARAS, L., AND MAIER, D. 1995. Towards an effective calculus for object query languages. In Proceedings of ACM SIGMOD'95 (San Jose, Calif., May 22-75). ACM, New York, pp. 47-58.]] Google ScholarDigital Library
- GAIFMAN, H. 1982. On local and non-local properties. In Proceedings of the Herbrand Symposium, Logic Colloquium '81. North-Holland, Amsterdam, The Netherlands.]]Google ScholarCross Ref
- GRADEL, E., AND GUREVICH, Y. 1998. Metafinite model theory. Inf. Comput. 140, 26-81.]] Google ScholarDigital Library
- GRUMBACH, S., RAFANELLI, M., AND TINININI, L. 1999. Querying aggregate data. In Proceedings of the 18th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. ACM, New York, pp. 174-184.]] Google ScholarDigital Library
- HANF, W. 1965. Model-theoretic methods in the study of elementary logic. In The Theory of Models. J.W. Addison et al, Eds. North Holland, Amsterdam, The Netherlands, pp. 132-145.]]Google Scholar
- HELLA, L. 1996. Logical hierarchies in PTIME. Inf. Comput. 129, 1-19.]] Google ScholarDigital Library
- HELLA, L., LIBKIN, L., AND NURMONEN, J. 1999. Notions of locality and their logical characterizations over finite models. J. Symb. Logic. 64, 1751-1773.]]Google ScholarCross Ref
- IMMERMAN, N. 1986. Relational queries computable in polynomial time. Inf. Contr. 68, 86-104.]] Google ScholarDigital Library
- IMMERMAN, N. 1999. Descriptive Complexity. Springer-Verlag, New York.]]Google Scholar
- IMMERMAN, N. 1987. Languages that capture complexity classes. SIAM J. Comput. 16, 760-778.]] Google ScholarDigital Library
- IMMERMAN, N., AND LANDER, E. 1990. Describing graphs: A first-order approach to graph canonization. In Complexity Theory Retrospective. Springer-Verlag, Berlin, Germany.]]Google Scholar
- KLUG, A. 1982. Equivalence of relational algebra and relational calculus query languages having aggregate functions. J. ACM 29, 699-717.]] Google ScholarDigital Library
- KOLAITIS,PH., VARDI, M. 1992. Infinitary logic and 0-1 laws. Inf. Comput. 98, 258-294.]] Google ScholarDigital Library
- LELLAHI, K., AND TANNEN, V. 1997. A calculus for collections and aggregates. In Proceedings of the Category Theory in Computer Science. Lecture Notes in Computer Science, vol. 1290. Springererlag, New York, pp. 261-280.]] Google ScholarDigital Library
- LIBKIN, L. 1997. On the forms of locality over finite models. In Proceedings of the 12th IEEE Symposium on Logic in Computer Science (LICS'97) (Warsaw, Poland, June-July). IEEE Computer Society Press, Los Alamitos, Calif., pp. 204-215.]] Google ScholarDigital Library
- LIBKIN, L. 2000. Logics with counting and local properties. ACM Trans. Comput. Logic 1, 33-59.]] Google ScholarDigital Library
- LIBKIN, L., AND WONG, L. 1994. Aggregate functions, conservative extensions, and linear orders. In Proceedings of the Database Programming Languages 1993. Springer-Verlag, New York, pp. 282-294.]] Google ScholarDigital Library
- LIBKIN, L., WONG, L. 1997a. Query languages for bags and aggregate functions. J. Comput. Syst. Sci. 55, 241-272.]] Google ScholarDigital Library
- LIBKIN, L., AND WONG, L. 1997b. On the power of aggregation in relational query languages. In Proceedings of Database Programming Languages 1997. Lecture Notes in Computer Science, vol. 1369. Springer-Verlag, New York, pp. 260-280.]] Google ScholarDigital Library
- MUMICK, I. S., PIRAHESH, H., AND RAMAKRISHNAN, R. 1990. Magic of duplicates and aggregates. In Proceedings of the Conference on Very Large Databases. 264-277.]] Google ScholarDigital Library
- MUMICK,I.S.,AND SHMUELI, O. 1995. How expressive is stratified aggregation? Ann. Math. AI 15, 407-435.]]Google ScholarCross Ref
- NURMONEN, J. 1996. On winning strategies with unary quantifiers. J. Logic Comput. 6, 779-798.]]Google ScholarCross Ref
- OTTO, M. 1997. Bounded Variable Logics and Counting: A Study in Finite Models. Springer- Verlag, New York.]]Google Scholar
- ROSS, K., AND SAGIV, Y. 1992. Monotonic aggregation in deductive databases. In Proceedings of the 11th ACMSIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (San Diego, Calif., June 2-4). ACM, New York, pp. 114-126.]] Google ScholarDigital Library
- ROSS, K., SRIVASTAVA, D., STUCKEY,P.,AND SUDARSHAN, S. 1998. Foundations of aggregation constraints.Theoret. Comput. Sci. 193, 149-179.]] Google ScholarDigital Library
- ULLMAN, J. 1988. Principles of Database and Knowledge-Base Systems. Computer Science Press Rockville, Md.]] Google ScholarDigital Library
- VAN GELDER, A. 1992. The well-founded semantics of aggregation. In Proceedings of the 11th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (San Diego, Calif., June 2-4). ACM, New York, pp. 127-138.]] Google ScholarDigital Library
- VARDI, M. 1982. The complexity of relational query languages. In Proceedings of the 14th ACM Symposium on Theory of Computing. ACM, New York, pp. 137-146.]] Google ScholarDigital Library
- WONG, L. 1996. Normal forms and conservative properties for query languages over collection types. J. Comput. Syst. Sci. 52, 1 (June), 495-505.]] Google ScholarDigital Library
Index Terms
- Logics with aggregate operators
Recommendations
On graph reasoning
In this paper, we study the (positive) graph relational calculus. The basis for this calculus was introduced by Curtis and Lowe in 1996 and some variants, motivated by their applications to semantics of programs and foundations of mathematics, appear ...
Reasoning with Graphs
In this paper we study the (positive) graph relational calculus. The basis for this calculus was introduced by S. Curtis and G. Lowe in 1996 and some variants, motivated by their applications to semantics of programs and foundations of mathematics, ...
Arity hierarchy for temporal logics
A major result concerning temporal logics is Kamp's Theorem which states that the pair of modalities ''until'' and ''since'' is expressively complete for the first-order fragment of the monadic logic over the linear-time canonical model of naturals. The ...
Comments