Containment of Aggregate Queries

  • Sara Cohen
  • Werner Nutt
  • Yehoshua Sagiv
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2572)

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    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.Google Scholar
  2. [2]
    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.Google Scholar
  3. [3]
    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.Google Scholar
  4. [4]
    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.Google Scholar
  5. [5]
    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.
  6. [6]
    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.Google Scholar
  7. [7]
    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.Google Scholar
  8. [8]
    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.Google Scholar
  9. [9]
    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.Google Scholar
  10. [10]
    S. Grumbach and L. Tininini. On the content of materialized aggregate views. In Proc. 19th Symposium on Principles of Database Systems. ACM Press, 2000.Google Scholar
  11. [11]
    A. Gupta and I. S. Mumick, editors. Materialized Views-Techniques, Implementations and Applications. MIT Press, 1999.Google Scholar
  12. [12]
    Y. Ioannidis and R. Ramakrishnan. Beyond relations as sets. ACM Transactions on Database Systems, 20(3):288–324, 1995.CrossRefGoogle Scholar
  13. [13]
    R. Kimball. The Data Warehouse Toolkit. John Wiley and Sons, 1996.Google Scholar
  14. [14]
    A. Levy. Answering queries using views: A survey. The VLDB Journal, 10(4):270–294, 2001.CrossRefGoogle Scholar
  15. [15]
    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.Google Scholar
  16. [16]
    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.Google Scholar
  17. [17]
    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.Google Scholar
  18. [18]
    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.Google Scholar
  19. [19]
    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.Google Scholar
  20. [20]
    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.Google Scholar
  21. [21]
    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.Google Scholar
  22. [22]
    J. Ullman. Principles of Database and Knowledge-Base Systems, Vol. I: Classical Database Systems. Computer Science Press, New York (New York, USA), 1988.Google Scholar
  23. [23]
    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.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Sara Cohen
    • 1
  • Werner Nutt
    • 2
  • Yehoshua Sagiv
    • 1
  1. 1.School of Computer Science and EngineeringThe Hebrew University of JerusalemJerusalemIsrael
  2. 2.School of Mathematical and Computer SciencesHeriot-Watt UniversityEdinburghScotland, UK

Personalised recommendations