Skip to main content
QUICK REVIEW

[论文解读] Rewriting with Acyclic Queries: Mind Your Head

Gaetano Geck, Jens Keppeler|arXiv (Cornell University)|Jan 1, 2022
Logic, programming, and type systemsComputer Science参考文献 29被引用 1
一句话总结

本文研究了在物化视图上的选择性查询的无环重写存在的可能性及其复杂度。证明了若对无环、自由连通无环、层次化或 q-层次化查询存在重写,则也存在无环重写——从而可实现高效评估。当视图的元数无界时,即使模式的元数有界,问题也变为 NP-完全,但当视图具有有界元数或为自由连通无环时,问题具有可解性。

ABSTRACT

The paper studies the rewriting problem, that is, the decision problem whether, for a given conjunctive query $Q$ and a set $\mathcal{V}$ of views, there is a conjunctive query $Q'$ over $\mathcal{V}$ that is equivalent to $Q$, for cases where the query, the views, and/or the desired rewriting are acyclic or even more restricted. It shows that, if $Q$ itself is acyclic, an acyclic rewriting exists if there is any rewriting. An analogous statement also holds for free-connex acyclic, hierarchical, and q-hierarchical queries. Regarding the complexity of the rewriting problem, the paper identifies a border between tractable and (presumably) intractable variants of the rewriting problem: for schemas of bounded arity, the acyclic rewriting problem is NP-hard, even if both $Q$ and the views in $\mathcal{V}$ are acyclic or hierarchical. However, it becomes tractable if the views are free-connex acyclic (i.e., in a nutshell, their body is (i) acyclic and (ii) remains acyclic if their head is added as an additional atom).

研究动机与目标

  • 确定在何种条件下,当标准重写存在时,无环重写也存在。
  • 分析在各种查询与视图结构约束下,无环重写判定问题的计算复杂度。
  • 通过限制视图与模式元数,识别重写问题的可解片段。
  • 探讨自由连通性与层次性等结构特性在实现高效查询重写中的作用。
  • 在无环查询背景下,建立重写问题可解与不可解变体之间的边界。

提出的方法

  • 引入一种基于覆盖描述与原子集划分的新方法,用于刻画精确重写可实现性。
  • 应用标准重写方法,当无环重写存在时,高效构造无环重写。
  • 通过覆盖描述的变换,将复杂的重写问题简化为等价的更简单形式。
  • 利用查询计划与视图依赖关系的结构分析,证明无环性下的封闭性质。
  • 利用已知的查询评估复杂度结果(如常数延迟枚举)推导出下界复杂度。
  • 分析视图元数与模式元数对重写问题复杂度的影响。

实验结果

研究问题

  • RQ1在何种条件下,重写的存在的事实可推出无环重写的存在的事实?
  • RQ2对于给定的查询与视图集合,判定是否存在无环重写的计算复杂度是多少?
  • RQ3有界视图元数如何影响无环重写问题的可解性?
  • RQ4当视图为自由连通无环时,即使模式元数无界,重写问题是否仍具有可解性?
  • RQ5这些结果能否推广到其他可高效评估的查询类,如有界树宽的选择性查询?

主要发现

  • 若选择性查询 Q 为无环,则其在视图集 V 上的任意重写均等价于一个无环重写,意味着只要存在重写,高效评估始终可行。
  • 该封闭性质同样适用于自由连通无环、层次化及 q-层次化查询:若存在重写,则同一类中也存在等价重写。
  • 当视图元数无界时,即使查询与视图均为无环且模式元数有界(例如 Rewr3(ACQ, ACQ, ACQ) 为 NP-完全),无环重写问题仍为 NP-完全。
  • 当视图元数被常数有界时,问题变为可解(多项式时间),即使模式元数无界。
  • 当视图为自由连通无环时,问题同样可解,无论模式元数是否无界,表明自由连通性是实现可解性的关键结构约束。
  • 结果表明,对于 ACQ、CCQ、HCQ 或 QHCQ 中的查询,Rewr(V, Q, CQ) 的复杂度与 Rewr(V, Q, Q) 的复杂度一致,从而简化了复杂度分析。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。