We study the problem of answering conjunctive queries with free access patterns (CQAPs) under updates. A free access pattern is a partition of the free variables of the query into input and output. The query returns tuples over the output variables given a tuple of values over the input variables. We introduce a fully dynamic evaluation approach that works for all CQAPs and is optimal for two classes of CQAPs. This approach recovers prior work on the dynamic evaluation of conjunctive queries without access patterns. We first give a syntactic characterisation of all CQAPs that admit constant time per single-tuple update and whose output tuples can be enumerated with constant delay given a tuple of values over the input variables. We further chart the complexity trade-off between the preprocessing time, update time and enumeration delay for a class of CQAPs. For some of these CQAPs, our approach achieves optimal, albeit non-constant, update time and delay. This optimality is predicated on the Online Matrix-Vector Multiplication conjecture. We finally adapt our approach to the dynamic evaluation of tractable CQAPs over probabilistic databases under updates.
翻译:我们研究了在更新条件下回答具有自由访问模式的合取查询(CQAPs)的问题。自由访问模式将查询的自由变量划分为输入和输出两部分。给定输入变量上的一个值元组,该查询返回输出变量上的元组。我们提出了一种适用于所有CQAPs的完全动态求值方法,该方法对两类CQAPs是最优的。这一方法恢复了先前关于无访问模式的合取查询动态求值的研究工作。我们首先对所有允许单元组更新时间为常数、且在给定输入变量值元组时能以常数延迟枚举输出元组的CQAPs给出了语法刻画。我们进一步描绘了一类CQAPs在预处理时间、更新时间和枚举延迟之间的复杂度权衡。对于其中一些CQAPs,我们的方法实现了最优(尽管非常数)的更新时间和延迟。这一最优性基于在线矩阵-向量乘法猜想。最后,我们将方法适配于概率数据库上可处理的CQAPs在更新下的动态求值。