The Programming of Algebra

07/02/2022
by   Fritz Henglein, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/05/2019

Optimal Joins using Compact Data Structures

Worst-case optimal join algorithms have gained a lot of attention in the...
research
01/19/2023

Work-Efficient Query Evaluation with PRAMs

The paper studies query evaluation in parallel constant time in the PRAM...
research
04/22/2022

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...
research
03/10/2021

Functional Collection Programming with Semi-Ring Dictionaries

This paper introduces semi-ring dictionaries, a powerful class of compos...
research
03/04/2022

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...
research
03/04/2018

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