论文标题

代数的编程

The Programming of Algebra

论文作者

Henglein, Fritz, Kaarsgaard, Robin, Mathiesen, Mikkel Kragh

论文摘要

我们将模块理论和线性地图作为关系数据模型的强大广义和计算有效的框架,该模型是当今关系数据库系统的基础。基于模块的通用结构,我们获得了与联合和删除,重复的联合,笛卡尔产品和键指标数据相对应的数据收集的紧凑和计算有效的数据结构。自然的模块自然会引起多系统,从而概括了多集并促进数据库查询作为多线性图,并在多线构建器上进行渐近评估。我们将紧凑的地图引入了一种可以通过加法和减法从无限基集及其元素构造的无限(poly)集合的一种方式。我们展示了自然加入如何推广到代数加入,而交叉路口是通过嵌套紧凑型地图上的一种新算法实现的,该算法小心地避免访问输入的部分,而这些部分不影响最终的输出。我们的代数框架导致对环关系查询的最佳评估,这是不可能使用仅在记录列表上操作的教科书查询优化器。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源