# Foundations of aggregation constraints

## Abstract

We introduce a new constraint domain, *aggregation constraints*, which is useful in database query languages, and in constraint logic programming languages that incorporate aggregate functions. We study the fundamental problem of checking if a conjunction of aggregation constraints is *solvable*, and present undecidability results for many different classes of aggregation constraints. We describe a complete and minimal axiomatization of the class of aggregation constraints over finite multisets of reals, which permits a natural reduction from the class of aggregation constraints to the class of mixed integer/real, non-linear arithmetic constraints. We then present a polynomial-time algorithm that directly checks for solvability of a useful class of aggregation constraints, where the reduction-based approach does not lead to efficient checks for solvability.

## Preview

Unable to display preview. Download preview PDF.

## References

- 1.A. Y. Levy, I. S. Mumick, and Y. Sagiv. Query optimization by predicate movearound. In
*Proceedings of the International Conference on Very Large Databases*, Santiago, Chile, Sept. 1994.Google Scholar - 2.K. Marriott and P. J. Stuckey. Semantics of constraint logic programs with optimization.
*Letters on Programming Languages and Systems*, 1994.Google Scholar - 3.I. S. Mumick, H. Pirahesh, and R. Ramakrishnan. Duplicates and aggregates in deductive databases. In
*Proceedings of the Sixteenth International Conference on Very Large Databases*, Aug. 1990.Google Scholar - 4.A. Schrijver.
*Theory of Linear and Integer Programming*. Discrete Mathematics and Optimization. Wiley-Interscience, 1986.Google Scholar - 5.P. J. Stuckey and S. Sudarshan. Compiling query constraints. In
*Proceedings of the ACM Symposium on Principles of Database Systems*, May 1994.Google Scholar - 6.S. Sudarshan and R. Ramakrishnan. Aggregation and relevance in deductive databases. In
*Proceedings of the Seventeenth International Conference on Very Large Databases*, Sept. 1991.Google Scholar