Encyclopedia of Database Systems

2018 Edition
| Editors: Ling Liu, M. Tamer Özsu

Aggregation: Expressiveness and Containment

  • Sara Cohen
Reference work entry
DOI: https://doi.org/10.1007/978-1-4614-8265-9_1256

Definition

An aggregate function is a function that receives as input a multiset of values and returns a single value. For example, the aggregate function count returns the number of input values. An aggregate query is simply a query that mentions an aggregate function, usually as part of its output. Aggregate queries are commonly used to retrieve concise information from a database, since they can cover many data items while returning few. Aggregation is allowed in SQL, and the addition of aggregation to other query languages, such as relational algebra and Datalog, has been studied.

The problem of determining query expressiveness is to characterize the types of queries that can be expressed in a given query language. The study of query expressiveness for languages with aggregation is often focused on determining how aggregation increases the ability to formulate queries. It has been shown that relational algebra with aggregation (which models SQL) has a locality property.

Query...

This is a preview of subscription content, log in to check access.

Recommended Reading

  1. 1.
    Chaudhuri S, Vardi MY. Optimization of real conjunctive queries. In: Proceedings of the 12th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 1993. p. 59–70.Google Scholar
  2. 2.
    Cohen S. Containment of aggregate queries. ACM SIGMOD Rec. 2005;34(1):77–85.MathSciNetCrossRefGoogle Scholar
  3. 3.
    Cohen S, Nutt W, Sagiv Y. Containment of aggregate queries. In: Proceedings of the 9th International Conference on Database Theory; 2003. p. 111–25.Google Scholar
  4. 4.
    Cohen S, Nutt W, Sagiv Y. Deciding equivalences among conjunctive aggregate queries. J ACM. 2007;54(2)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Cohen S, Nutt W, Serebrenik A. Rewriting aggregate queries using views. In: Proceedings of the 18th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 1999. p. 155–66.Google Scholar
  6. 6.
    Cohen S, Sagiv Y, Nutt W. Equivalences among aggregate queries with negation. ACM Trans Comput Log. 2005;6(2):328–60.MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Consens MP, Mendelzon AO. Low complexity aggregation in graphlog and datalog. Theor Comput Sci. 1993;116(1–2):95–116.MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Grumbach S, Rafanelli M, Tininini L. On the equivalence and rewriting of aggregate queries. Acta Inf. 2004;40(8):529–84.MathSciNetzbMATHCrossRefGoogle Scholar
  9. 9.
    Hella L, Libkin L, Nurmonen J, Wong L. Logics with aggregate operators. J ACM. 2001;48(4):880–907.MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Jayram TS, Kolaitis PG, Vee E. The containment problem for real conjunctive queries with inequalities. In: Proceedings of the 25th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems; 2006. p. 80–9.Google Scholar
  11. 11.
    Klug AC. Equivalence of relational algebra and relational calculus query languages having aggregate functions. J ACM. 1982;29(3):699–717.MathSciNetzbMATHCrossRefGoogle Scholar
  12. 12.
    Libkin L. Expressive power of SQL. Theor Comput Sci. 2003;3(296):379–404.MathSciNetzbMATHCrossRefGoogle Scholar
  13. 13.
    Libkin L, Wong L. Query languages for bags and aggregate functions. J Comput Syst Sci. 1997;55(2):241–72.MathSciNetzbMATHCrossRefGoogle Scholar
  14. 14.
    Mumick IS, Shmueli O. How expressive is stratified aggregation? Ann Math Artif Intell. 1995;15(3–4):407–34.MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Ross KA, Sagiv Y. Monotonic aggregation in deductive database. J Comput Syst Sci. 1997;54(1):79–97.MathSciNetzbMATHCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.The Rachel and Selim Benin School of Computer Science and EngineeringThe Hebrew University of JerusalemJerusalemIsrael

Section editors and affiliations

  • Leonid Libkin
    • 1
  1. 1.School of InformaticsUniversity of EdinburghEdinburghUK