A Calculus for Collections and Aggregates

We present a calculus that should play for database query languages the same role that the lambda calculus plays for functional programming. For the semantic foundations of the calculus we introduce a new concept: monads enriched with algebraic structure. We model collection types through enriched monads and aggregate operations through enriched monad algebras. The calculus derives program equivalences that underlie a good number of the optimizations used in query languages.

[1]  M. Barr,et al.  Toposes, Triples and Theories , 1984 .

[2]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[3]  Dan Suciu,et al.  A query language for NC , 1994, PODS '94.

[4]  S. Eilenberg,et al.  Adjoint functors and triples , 1965 .

[5]  Philip S. Mulry Monads and Algebras in the Semantics or Partial Data Types , 1992, Theor. Comput. Sci..

[6]  Paul F. Hoogendijk (Relational) Programming Laws in the Boom Hierarchy of Types , 1992, MPC.

[7]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[8]  Roberto Di Cosmo,et al.  On the Power of Simple Diagrams , 1996, RTA.

[9]  Simon L. Peyton Jones,et al.  A short cut to deforestation , 1993, FPCA '93.

[10]  Limsoon Wong,et al.  Normal forms and conservative properties for query languages over collection types , 1993, PODS.

[11]  S. Maclane,et al.  Categories for the Working Mathematician , 1971 .

[12]  David Maier,et al.  Towards an effective calculus for object query languages , 1995, SIGMOD '95.

[13]  John Launchbury,et al.  Warm fusion: deriving build-catas from recursive definitions , 1995, FPCA '95.

[14]  Limsoon Wong,et al.  Principles of Programming with Complex Objects and Collection Types , 1995, Theor. Comput. Sci..

[15]  Maarten M. Fokkinga,et al.  Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire , 1991, FPCA.

[16]  Limsoon Wong,et al.  Querying Nested Collections , 1994 .

[17]  Val Tannen,et al.  Logical and Computational Aspects of Programming with Sets/Bags/Lists , 1991, ICALP.

[18]  H. Kleisli,et al.  Every standard construction is induced by a pair of adjoint functors , 1965 .

[19]  David Jordan,et al.  The Object Database Standard: ODMG 2.0 , 1997 .

[20]  Limsoon Wong,et al.  Aggregate Functions, Conservative Extensions, and Linear Orders , 1993, DBPL.

[21]  Limsoon Wong,et al.  Some Properties of Query Languages for Bags , 1993, DBPL.

[22]  Limsoon Wong,et al.  Naturally Embedded Query Languages , 1992, ICDT.

[23]  J. Lambek,et al.  Introduction to higher order categorical logic , 1986 .

[24]  Philip W. Trinder,et al.  Comprehensions, a Query Notation for DBPLs , 1992, DBPL.