Encyclopedia of Database Systems

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

Aggregation: Expressiveness and Containment

  • Sara CohenEmail author
Living reference work entry
DOI: https://doi.org/10.1007/978-1-4899-7993-3_1256-2

Definition

Anaggregate 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...

Keywords

Query Language Transitive Closure Relational Algebra Query Optimization Arithmetic Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
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.CrossRefGoogle 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)Google 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.MathSciNetCrossRefGoogle Scholar
  7. 7.
    Consens MP, Mendelzon AO. Low complexity aggregation in graphlog and datalog. Theor Comput Sci. 1993;116(1–2):95–116.MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Grumbach S, Rafanelli M, Tininini L. On the equivalence and rewriting of aggregate queries. Acta Inf. 2004;40(8):529–84.MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Hella L, Libkin L, Nurmonen J, Wong L. Logics with aggregate operators. J ACM. 2001;48(4):880–907.MathSciNetCrossRefzbMATHGoogle 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.MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Libkin L. Expressive power of SQL. Theor Comput Sci. 2003;3(296):379–404.MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Libkin L, Wong L. Query languages for bags and aggregate functions. J Comput Syst Sci. 1997;55(2):241–72.MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Mumick IS, Shmueli O. How expressive is stratified aggregation? Ann Math Artif Intell. 1995;15(3–4):407–34.MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Ross KA, Sagiv Y. Monotonic aggregation in deductive database. J Comput Syst Sci. 1997;54(1):79–97.MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media LLC 2017

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