The Programming of Algebra

by   Fritz Henglein, et al.

We present module theory and linear maps as a powerful generalised and computationally efficient framework for the relational data model, which underpins today's relational database systems. Based on universal constructions of modules we obtain compact and computationally efficient data structures for data collections corresponding to union and deletion, repeated union, Cartesian product and key-indexed data. Free modules naturally give rise to polysets, which generalise multisets and facilitate expressing database queries as multilinear maps with asymptotically efficient evaluation on polyset constructors. We introduce compact maps as a way of representing infinite (poly)sets constructible from an infinite base set and its elements by addition and subtraction. We show how natural joins generalise to algebraic joins, while intersection is implemented by a novel algorithm on nested compact maps that carefully avoids visiting parts of the input that do not contribute to the eventual output. Our algebraic framework leads to a worst-case optimal evaluation of cyclic relational queries, which is known to be impossible using textbook query optimisers that operate on lists of records only.


page 1

page 2

page 3

page 4


Optimal Joins using Compact Data Structures

Worst-case optimal join algorithms have gained a lot of attention in the...

Work-Efficient Query Evaluation with PRAMs

The paper studies query evaluation in parallel constant time in the PRAM...

Linear-Algebraic Models of Linear Logic as Categories of Modules over Sigma-Semirings

A number of models of linear logic are based on or closely related to li...

Functional Collection Programming with Semi-Ring Dictionaries

This paper introduces semi-ring dictionaries, a powerful class of compos...

Computationally efficient worst-case analysis of flow-controlled networks with Network Calculus

Networks with hop-by-hop flow control occur in several contexts, from da...

Comparing Downward Fragments of the Relational Calculus with Transitive Closure on Trees

Motivated by the continuing interest in the tree data model, we study th...

Please sign up or login with your details

Forgot password? Click here to reset