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).
翻译:本文研究了重写问题,即对于给定的合取查询$Q$和视图集合$\mathcal{V}$,是否存在一个基于$\mathcal{V}$的合取查询$Q'$与$Q$等价,这适用于查询、视图和/或所需重写是无环的,甚至更受限制的情况。研究表明,如果$Q$本身是无环的,那么只要存在任何重写,就存在一个无环重写。类似的结论也适用于自由连接无环、分层和q-分层查询。关于重写问题的复杂性,本文划分了可处理的(和推测不可处理的)重写变体之间的边界:对于有界元数模式,即使$Q$和$\mathcal{V}$中的视图都是无环或分层的,无环重写问题也是NP难的。然而,当视图是自由连接无环时(简而言之,其体部(i)无环且(ii)在将头部添加为额外原子后仍然无环),问题变得可处理。