arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.05681cs.DB
收藏

聚集递归数据库程序的不动点语义与优化

Fixpoint Semantics and Optimization of Recursive Datalog Programs with Aggregates

Carlo Zaniolo, Mohan Yang, Matteo Interlandi, Ariyam Das, Alexander Shkapsky, Tyson Condie

摘要:

在过去的三十年里,许多研究人员研究了一个非常理想的数据库扩展,它允许在递归规则中使用基本的SQL聚合min,max,count和sum。在本文中,我们提出了一个简单的全面的解决方案,扩展了声明性的最小不动点的Horn子句的语义,以及优化技术中使用的自下而上的实现方法,通过许多数据库系统。首先,我们确定了一个大类的程序的极大的实际利益,在递归规则中使用最小或最大值不妥协的声明性不动点语义的程序使用这些规则。然后,我们重新审视了(Mazuran et al. 2013 b)中提出的count和sum聚合的单调版本,并分别命名为mcount和msum。由于mcount以及正数上的msum在集合包含格中是单调的,它们保持Horn子句的不动点语义。然而,在许多实际应用中,它们的使用可能导致效率低下,这可以通过将它们与max组合来消除,从而mcount和msum成为标准的count和sum。因此,Datalog-MC的语义和优化技术被扩展到具有min,max,count和sum的递归程序,使得BigDatalog-MC(Shkapsky et al. 2016)和Datalog-MC(Yang et al. 2017)所展示的卓越性能和可扩展性的高级应用成为可能。本文件正在考虑被TPLP接受。

英文摘要:

A very desirable Datalog extension investigated by many researchers in the last thirty years consists in allowing the use of the basic SQL aggregates min, max, count and sum in recursive rules. In this paper, we propose a simple comprehensive solution that extends the declarative least-fixpoint semantics of Horn Clauses, along with the optimization techniques used in the bottom-up implementation approach adopted by many Datalog systems. We start by identifying a large class of programs of great practical interest in which the use of min or max in recursive rules does not compromise the declarative fixpoint semantics of the programs using those rules. Then, we revisit the monotonic versions of count and sum aggregates proposed in (Mazuran et al. 2013b) and named, respectively, mcount and msum. Since mcount, and also msum on positive numbers, are monotonic in the lattice of set-containment, they preserve the fixpoint semantics of Horn Clauses. However, in many applications of practical interest, their use can lead to inefficiencies, that can be eliminated by combining them with max, whereby mcount and msum become the standard count and sum. Therefore, the semantics and optimization techniques of Datalog are extended to recursive programs with min, max, count and sum, making possible the advanced applications of superior performance and scalability demonstrated by BigDatalog (Shkapsky et al. 2016) and Datalog-MC (Yang et al. 2017). This paper is under consideration for acceptance in TPLP.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑