1 research outputs found

    Formal foundations for optimising aggregation functions in Database Programming Languages

    No full text
    . This paper investigates the optimisation of aggregation functions in the context of computationally complete database programming languages and aims to generalise and provide a unifying formal foundation for previous work. We define a `fold' operator OE over collection types in terms of which operations such as selection, projection, join and group-by can be defined, as well as aggregation functions such as sum, max and min. We introduce two equivalences for OE which respectively govern the commuting and coalescing of applications of OE. From these two equivalences we then formally derive equivalences governing the commuting and coalescing of iteration operations over collections, the mapping of aggregation functions over grouped collections, the introduction and elimination of aggregation functions, and the promotion of aggregation functions through iteration operations. We also show how some of these equivalences can be used to optimise comprehensions, a high-level query construct ..
    corecore