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...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
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.
Cohen S. Containment of aggregate queries. ACM SIGMOD Rec. 2005;34(1):77–85.
Cohen S, Nutt W, Sagiv Y. Containment of aggregate queries. In: Proceedings of the 9th International Conference on Database Theory; 2003. p. 111–25.
Cohen S, Nutt W, Sagiv Y. Deciding equivalences among conjunctive aggregate queries. J ACM. 2007;54(2)
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.
Cohen S, Sagiv Y, Nutt W. Equivalences among aggregate queries with negation. ACM Trans Comput Log. 2005;6(2):328–60.
Consens MP, Mendelzon AO. Low complexity aggregation in graphlog and datalog. Theor Comput Sci. 1993;116(1–2):95–116.
Grumbach S, Rafanelli M, Tininini L. On the equivalence and rewriting of aggregate queries. Acta Inf. 2004;40(8):529–84.
Hella L, Libkin L, Nurmonen J, Wong L. Logics with aggregate operators. J ACM. 2001;48(4):880–907.
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.
Klug AC. Equivalence of relational algebra and relational calculus query languages having aggregate functions. J ACM. 1982;29(3):699–717.
Libkin L. Expressive power of SQL. Theor Comput Sci. 2003;3(296):379–404.
Libkin L, Wong L. Query languages for bags and aggregate functions. J Comput Syst Sci. 1997;55(2):241–72.
Mumick IS, Shmueli O. How expressive is stratified aggregation? Ann Math Artif Intell. 1995;15(3–4):407–34.
Ross KA, Sagiv Y. Monotonic aggregation in deductive database. J Comput Syst Sci. 1997;54(1):79–97.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Section Editor information
Rights and permissions
Copyright information
© 2018 Springer Science+Business Media, LLC, part of Springer Nature
About this entry
Cite this entry
Cohen, S. (2018). Aggregation: Expressiveness and Containment. In: Liu, L., Özsu, M.T. (eds) Encyclopedia of Database Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-8265-9_1256
Download citation
DOI: https://doi.org/10.1007/978-1-4614-8265-9_1256
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-8266-6
Online ISBN: 978-1-4614-8265-9
eBook Packages: Computer ScienceReference Module Computer Science and Engineering