arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0210028cs.DBcs.LO
收藏

集合否定的等价性

Equivalences Among Aggregate Queries with Negation

Sara Cohen, Werner Nutt, Yehoshua Sagiv

摘要:

查询等价性研究的析取聚合查询否定子目标,常量和比较。给出了聚集函数count、max、sum、prod、toptwo和parity的等价性的充分刻画。一个相关的问题是,对于一个给定的自然数N,确定两个给定的查询是否在所有具有最多N个常数的数据库上是等价的。我们称这个问题为有界等价。给出了有界等价可判定性的一个完整刻画。特别是,它表明,这个问题是可判定的所有上述聚合函数以及计数不同和平均。对于准线性查询(即,查询,其中出现积极的谓词是不重复的),它表明,等价性可以决定在多项式时间的聚集函数计数,最大值,总和,奇偶校验,生产,前两个和平均。如果满足一些附加条件,则对于count distinct也有类似的结果。结果表达在抽象的聚合函数的特性,并使用新的证明技术。最后,上面的结果也意味着等价,在袋集语义下,是可判定的非聚集查询与否定。

英文摘要:

Query equivalence is investigated for disjunctive aggregate queries with negated subgoals, constants and comparisons. A full characterization of equivalence is given for the aggregation functions count, max, sum, prod, toptwo and parity. A related problem is that of determining, for a given natural number N, whether two given queries are equivalent over all databases with at most N constants. We call this problem bounded equivalence. A complete characterization of decidability of bounded equivalence is given. In particular, it is shown that this problem is decidable for all the above aggregation functions as well as for count distinct and average. For quasilinear queries (i.e., queries where predicates that occur positively are not repeated) it is shown that equivalence can be decided in polynomial time for the aggregation functions count, max, sum, parity, prod, toptwo and average. A similar result holds for count distinct provided that a few additional conditions hold. The results are couched in terms of abstract characteristics of aggregation functions, and new proof techniques are used. Finally, the results above also imply that equivalence, under bag-set semantics, is decidable for non-aggregate queries with negation.

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

↑