arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

如何缩小测试数据库族?带空值和比较的查询包含问题

How Can We Shrink the Family of Test Databases? Query Containment with Nulls and Comparisons

Helen Sternbach, Sara Cohen

arXiv 2609.16218首次发表:更新:

发表机构

The Hebrew University of Jerusalem(耶路撒冷希伯来大学)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

本文针对带空值和顺序比较的合取查询,提出缩小测试数据库族的方法,分别通过特殊变量集和规范值分解实现,并证明在局部参数下固定参数可处理,从而提升查询包含判定的实用性。

AI 中文摘要

查询包含和等价性驱动着数据库查询优化和重写。对于普通合取查询,两者都可以通过在一个查询的单一规范数据库上评估另一个查询来决定。这种经典测试在两种普遍存在于实际查询中的设置下失效:在SQL三值语义下包含空值的数据库,以及包含顺序比较的查询。在这两种情况下,判定包含问题是$\Pi_2^p$-完全的,已知的刻画方法用指数规模的测试数据库族替代单一测试,导致没有实用途径来证明等价性。我们研究如何缩小测试数据库族。对于包含空值的数据库上的合取查询,我们将测试数据库族缩小到仅在一个特殊变量集上呈指数规模,并且当该集合规模为常数时,将包含问题置于NP中。对于带比较的查询,我们构造了判定包含的规范值,然后通过将测试分解为独立组件并沿顺序冲突拆分来缩小测试数据库族。最后,我们结合这两个特性,证明了测试数据库的数量在两个查询的三个局部参数上是固定参数可处理的,其中仅空值和仅比较的测试作为特例。每个测试都在一个数据库族上评估包含查询,这是任何数据库系统原生支持的操作。

英文摘要

Query containment and equivalence drive database query optimization and rewriting. For plain conjunctive queries, both are decided by evaluating one query over a single canonical database of the other. This classical test breaks down in two settings that pervade real queries: databases with null values under SQL's three-valued semantics, and queries with order comparisons. In both, deciding containment is $Π_2^p$-complete, and the known characterizations replace it by an exponential family of test databases, leaving no practical route to certifying equivalence. We ask how the family of test databases can be shrunk. For conjunctive queries over databases with nulls, we shrink the family to one that is exponential only in a special set of variables, and place containment in NP when that set has constant size. For queries with comparisons, we construct canonical values that decide containment, and then shrink the family by decomposing the test into independent components and by splitting it along the order conflicts. Finally, we combine the two features, and prove that the number of test databases is fixed-parameter tractable in three local parameters of the two queries, with the null-only and comparison-only tests as special cases. Each test evaluates the containing query over a family of databases, an operation native to any database system.

Comments42 pages, 4 figures. Full proofs in the appendix

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑