Skip to main content

Aggregation: Expressiveness and Containment

  • Reference work entry
  • First Online:
  • 31 Accesses

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 via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   4,499.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   6,499.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Recommended Reading

  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. Cohen S. Containment of aggregate queries. ACM SIGMOD Rec. 2005;34(1):77–85.

    Article  MathSciNet  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)

    Article  MathSciNet  MATH  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 

  6. Cohen S, Sagiv Y, Nutt W. Equivalences among aggregate queries with negation. ACM Trans Comput Log. 2005;6(2):328–60.

    Article  MathSciNet  MATH  Google Scholar 

  7. Consens MP, Mendelzon AO. Low complexity aggregation in graphlog and datalog. Theor Comput Sci. 1993;116(1–2):95–116.

    Article  MathSciNet  MATH  Google Scholar 

  8. Grumbach S, Rafanelli M, Tininini L. On the equivalence and rewriting of aggregate queries. Acta Inf. 2004;40(8):529–84.

    Article  MathSciNet  MATH  Google Scholar 

  9. Hella L, Libkin L, Nurmonen J, Wong L. Logics with aggregate operators. J ACM. 2001;48(4):880–907.

    Article  MathSciNet  MATH  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 

  11. Klug AC. Equivalence of relational algebra and relational calculus query languages having aggregate functions. J ACM. 1982;29(3):699–717.

    Article  MathSciNet  MATH  Google Scholar 

  12. Libkin L. Expressive power of SQL. Theor Comput Sci. 2003;3(296):379–404.

    Article  MathSciNet  MATH  Google Scholar 

  13. Libkin L, Wong L. Query languages for bags and aggregate functions. J Comput Syst Sci. 1997;55(2):241–72.

    Article  MathSciNet  MATH  Google Scholar 

  14. Mumick IS, Shmueli O. How expressive is stratified aggregation? Ann Math Artif Intell. 1995;15(3–4):407–34.

    Article  MathSciNet  MATH  Google Scholar 

  15. Ross KA, Sagiv Y. Monotonic aggregation in deductive database. J Comput Syst Sci. 1997;54(1):79–97.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sara Cohen .

Editor information

Editors and Affiliations

Section Editor information

Rights and permissions

Reprints and permissions

Copyright information

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

About this entry

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics