This paper introduces semi-ring dictionaries, a powerful class of compositional and purely functional collections that subsume other collection types such as sets, multisets, arrays, vectors, and matrices. We develop SDQL, a statically typed language centered around semi-ring dictionaries, that can encode expressions in relational algebra with aggregations, functional collections, and linear algebra. Furthermore, thanks to the semi-ring algebraic structures behind these dictionaries, SDQL unifies a wide range of optimizations commonly used in databases and linear algebra. As a result, SDQL enables efficient processing of hybrid database and linear algebra workloads, by putting together optimizations that are otherwise confined to either database systems or linear algebra frameworks. Through experimental results, we show that a handful of relational and linear algebra workloads can take advantage of the SDQL language and optimizations. Overall, we observe that SDQL achieves competitive performance to Typer and Tectorwise, which are state-of-the-art in-memory systems for (flat, not nested) relational data, and achieves an average 2x speedup over SciPy for linear algebra workloads. Finally, for hybrid workloads involving linear algebra processing over nested biomedical data, SDQL can give up to one order of magnitude speedup over Trance, a state-of-the-art nested relational engine.
翻译:本文引入了半环词典, 这是一种强大的构成和纯功能收藏, 包含其他收藏类型, 如集、 多套集、 阵列、 矢量 和矩阵。 我们开发了 SDQL, 这是一种围绕半环词典的静态打印语言, 它可以用聚合、 功能收藏和线性代数来编码关系代数的表达式。 此外, 由于这些词典背后的半环代数结构, SDQL 将数据库和线性代数中常用的广泛优化统一起来。 因此, SDQL 能够高效处理混合数据库和线性代数工作量。 我们开发了SDQL, 将不局限于数据库系统或线性代数框架的优化组合起来。 我们通过实验结果显示, 少数关系和线性代数工作量可以利用SDQL 语言和优化。 总之, 我们观察到, SDQL 的发动机和Tectorwize 具有竞争性性性性性性功能, 这是数据库和线性代代关系系统, 用于( 平面、 不是SDBalbrealal- 等平均 数据处理的Sad- bal- balbaral- 等 等平均级,, 的Sadbal- balbaltraal- trade- trade- saltraal- sal- sal- sal- sal- saltrax trax tra ax tra- saltrax trax trax trax saltrax trax trax saltragaltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax saltrax salx salx salx saltrax saltrax saltrax saltraxxx saltradaltradalx saltradaltrax) tradalx salx sal- salx salx sal tradalx salx salx sal) 。