Aggregation: Expressiveness and Containment
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.
KeywordsQuery Language Transitive Closure Relational Algebra Query Optimization Arithmetic Function
- 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
- 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.Cohen S, Nutt W, Sagiv Y. Deciding equivalences among conjunctive aggregate queries. J ACM. 2007;54(2)Google Scholar
- 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
- 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