Abstract
The problem of deciding containment of aggregate queries is investigated. Containment is reduced to equivalence for queries with expandable aggregation functions. Many common aggregation functions, such as max, cntd (count distinct), count, sum, avg, median and stdev (standard deviation) are shown to be expandable. It is shown that even in the presence of integrity constraints, containment can be reduced to equivalence. For conjunctive count and sum-queries, simpler characterizations for containment are given, that do not require checking equivalence. These results are built upon in order to solve the problem of finding maximally-contained sets of rewritings for conjunctive count-queries.
This work was supported by the Israel Science Foundation (Grant 96/01-1) and the British EPSRC (Grant GR/R74932/01).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
S. Abiteboul and O. Duschka. Complexity of answering queries using materialized views. In J. Paredaens, editor, Proc. 17th Symposium on Principles of Database Systems, pages 254–263, Seattle (Washington, USA), June 1998. ACM Press.
S. Chaudhuri, S. Krishnamurthy, S. Potamianos, and K. Shim. Optimizing queries with materialized views. In P. S. Yu and A. Chen, editors, Proc. 11th International Conference on Data Engineering, Taipei, Mar. 1995. IEEE Computer Society.
S. Chaudhuri and M. Vardi. Optimization of real conjunctive queries. In Proc. 12th Symposium on Principles of Database Systems, Washington (D.C., USA), May 1993. ACM Press.
S. Cohen, W. Nutt, and Y. Sagiv. Equivalences among aggregate queries with negation. In Proc. 20th Symposium on Principles of Database Systems, pages 215–226, Santa Barbara (California, USA), May 2001. ACM Press.
S. Cohen, W. Nutt, and Y. Sagiv. Containment of aggregate queries (extended version), Oct. 2002. Available at http://www.cs.huji.ac.il/~sarina/papers/agg-containment-long.ps.
S. Cohen, W. Nutt, and A. Serebrenik. Rewriting aggregate queries using views. In C. Papadimitriou, editor, Proc. 18th Symposium on Principles of Database Systems, pages 155–166, Philadelphia (Pennsylvania, USA), May 1999. ACM Press.
S. Cohen, W. Nutt, and A. Serebrenik. Algorithms for rewriting aggregate queries using views. In Symposium on Advances in Databases and Information Systems, Enlarged Fourth East-European Conference on Advances in Databases and Information Systems, pages 65–78, Prague (Czech Republik), Sept. 2000.
O. Duschka and M. Genesereth. Answering recursive queries using views. In Proc. 16th Symposium on Principles of Database Systems, pages 254–263, Tucson (Arizona, USA), May 1997. ACM Press.
S. Grumbach, M. Rafanelli, and L. Tininini. Querying aggregate data. In C. Papadimitriou, editor, Proc. 18th Symposium on Principles of Database Systems, pages 174–183, Philadelphia (Pennsylvania, USA), May 1999. ACM Press.
S. Grumbach and L. Tininini. On the content of materialized aggregate views. In Proc. 19th Symposium on Principles of Database Systems. ACM Press, 2000.
A. Gupta and I. S. Mumick, editors. Materialized Views-Techniques, Implementations and Applications. MIT Press, 1999.
Y. Ioannidis and R. Ramakrishnan. Beyond relations as sets. ACM Transactions on Database Systems, 20(3):288–324, 1995.
R. Kimball. The Data Warehouse Toolkit. John Wiley and Sons, 1996.
A. Levy. Answering queries using views: A survey. The VLDB Journal, 10(4):270–294, 2001.
A. Levy, A. Mendelzon, Y. Sagiv, and D. Srivastava. Answering queries using views. In Proc. 14th Symposium on Principles of Database Systems, pages 95–104, San Jose (California, USA), May 1995. ACM Press.
A. Levy, A. Rajaraman, and J. Ordille. Querying heterogeneous information sources using source descriptions. In Proc. 22nd International Conference on Very Large Data Bases, pages 251–262, Bombay (India), Sept. 1996.
F. Llirbat, F. Fabret, and E. Simon. Eliminating costly redundant computations from SQL trigger executions. In Proc. 1997 ACM SIGMOD International Conference on Management of Data, pages 428–439, Tucson (Arizona, USA), June 1997.
W. Nutt, Y. Sagiv, and S. Shurin. Deciding equivalences among aggregate queries. In J. Paredaens, editor, Proc. 17th Symposium on Principles of Database Systems, pages 214–223, Seattle (Washington, USA), June 1998. ACM Press. Long version as Report of Esprit LTR DWQ.
R. Pottinger and A. Levy. A scalable algorithm for answering queries using views. In P. 26th International Conference on Very Large Data Bases, editor, Proc. 26th International Conference on Very Large Data Bases, Cairo (Egypt), 2000. Morgan Kaufmann Publishers.
K. Ross, D. Srivastava, and S. Sudarshan. Materialized view maintenance and integrity constraint checking: Trading space for time. In Proc. 1996 ACM SIGMOD International Conference on Management of Data, pages 447–458, Montreal (Canada), June 1996.
D. Srivastava, S. Dar, H. Jagadish, and A. Levy. Answering queries with aggregation using views. In Proc. 22nd International Conference on Very Large Data Bases, Bombay (India), Sept. 1996. Morgan Kaufmann Publishers.
J. Ullman. Principles of Database and Knowledge-Base Systems, Vol. I: Classical Database Systems. Computer Science Press, New York (New York, USA), 1988.
H. Yang and P.-A. Larson. Query transformation for PSJ queries. In Proc. 13th International Conference on Very Large Data Bases, pages 245–254, Brighton (England), Sept. 1987. Morgan Kaufmann Publishers.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cohen, S., Nutt, W., Sagiv, Y. (2003). Containment of Aggregate Queries. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds) Database Theory — ICDT 2003. ICDT 2003. Lecture Notes in Computer Science, vol 2572. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36285-1_8
Download citation
DOI: https://doi.org/10.1007/3-540-36285-1_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00323-6
Online ISBN: 978-3-540-36285-2
eBook Packages: Springer Book Archive