Does query evaluation tractability help query containment?

P. Barceló, M. Romero, Moshe Y. Vardi
{"title":"Does query evaluation tractability help query containment?","authors":"P. Barceló, M. Romero, Moshe Y. Vardi","doi":"10.1145/2594538.2594553","DOIUrl":null,"url":null,"abstract":"While checking containment of Datalog programs is undecidable, checking whether a Datalog program is contained in a union of conjunctive queries (UCQ), in the context of relational databases, or a union of conjunctive 2-way regular path queries (UC2RPQ), in the context of graph databases, is decidable. The complexity of these problems is, however, prohibitive: 2exptime-complete. We investigate to which extent restrictions on UCQs and UC2RPQs, which have been known to reduce the complexity of query containment for these classes, yield a more \"manageable\" single-exponential time bound, which is the norm for several static analysis and verification tasks. Checking containment of a UCQ Theta' in a UCQ Theta is NP-hard, in general, but better bounds can be obtained if Theta is restricted to belong to a \"tractable\" class of UCQs, e.g., a class of bounded treewidth or hypertreewidth. Also, each Datalog program Pi is equivalent to an infinite union of CQs. This motivated us to study the question of whether restricting Theta to belong to a tractable class also helps alleviate the complexity of checking whether Pi is contained in Theta. We study such question in detail and show that the situation is much more delicate than expected: First, tractability of UCQs does not help in general, but further restricting Theta to be acyclic and have a bounded number of shared variables between atoms yields better complexity bounds. As corollaries, we obtain that checking containment of Pi in Theta is in exptime if Theta is of treewidth one, or it is acyclic and the arity of the schema is fixed. In the case of UC2RPQs we show an exptime bound when queries are acyclic and have a bounded number of edges connecting pairs of variables. As a corollary, we obtain that checking whether Pi is contained in UC2RPQ Gamma is in exptime if Gamma is a strongly acyclic UC2RPQ. Our positive results for UCQs and UC2RPQs are optimal, in a sense, since slightly extending the conditions turns the problem 2exptime-complete.","PeriodicalId":302451,"journal":{"name":"Proceedings of the 33rd ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems","volume":"83 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-06-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 33rd ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2594538.2594553","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 13

Abstract

While checking containment of Datalog programs is undecidable, checking whether a Datalog program is contained in a union of conjunctive queries (UCQ), in the context of relational databases, or a union of conjunctive 2-way regular path queries (UC2RPQ), in the context of graph databases, is decidable. The complexity of these problems is, however, prohibitive: 2exptime-complete. We investigate to which extent restrictions on UCQs and UC2RPQs, which have been known to reduce the complexity of query containment for these classes, yield a more "manageable" single-exponential time bound, which is the norm for several static analysis and verification tasks. Checking containment of a UCQ Theta' in a UCQ Theta is NP-hard, in general, but better bounds can be obtained if Theta is restricted to belong to a "tractable" class of UCQs, e.g., a class of bounded treewidth or hypertreewidth. Also, each Datalog program Pi is equivalent to an infinite union of CQs. This motivated us to study the question of whether restricting Theta to belong to a tractable class also helps alleviate the complexity of checking whether Pi is contained in Theta. We study such question in detail and show that the situation is much more delicate than expected: First, tractability of UCQs does not help in general, but further restricting Theta to be acyclic and have a bounded number of shared variables between atoms yields better complexity bounds. As corollaries, we obtain that checking containment of Pi in Theta is in exptime if Theta is of treewidth one, or it is acyclic and the arity of the schema is fixed. In the case of UC2RPQs we show an exptime bound when queries are acyclic and have a bounded number of edges connecting pairs of variables. As a corollary, we obtain that checking whether Pi is contained in UC2RPQ Gamma is in exptime if Gamma is a strongly acyclic UC2RPQ. Our positive results for UCQs and UC2RPQs are optimal, in a sense, since slightly extending the conditions turns the problem 2exptime-complete.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
查询求值可追溯性是否有助于查询包含?
虽然检查Datalog程序的包含是不可判定的,但检查Datalog程序是否包含在关系数据库上下文中的联合查询(UCQ)中,或图数据库上下文中的联合2路正则路径查询(UC2RPQ)中,是可判定的。然而,这些问题的复杂性是令人望而却步的:2exptime-complete。我们研究了ucq和uc2rpq的限制在多大程度上产生了更“可管理”的单指数时间范围,这是几个静态分析和验证任务的标准。ucq和uc2rpq已经被认为可以减少这些类的查询包含的复杂性。一般来说,检查UCQ Theta'中的UCQ Theta'的包含性是np困难的,但如果Theta被限制为属于UCQ的“可处理”类,例如,有界树宽或超树宽的类,则可以获得更好的界。同样,每个Datalog程序Pi都相当于cq的无限并。这促使我们研究限制Theta属于一个可处理的类是否也有助于减轻检查Pi是否包含在Theta中的复杂性。我们详细研究了这样的问题,并表明情况比预期的要微妙得多:首先,ucq的可追溯性通常没有帮助,但进一步将Theta限制为非循环的,并且原子之间的共享变量数量有限,可以产生更好的复杂性界限。作为推论,我们得到当Theta的树宽为1,或者它是无环且模式的元数是固定的,在Theta中检查Pi的包含是在exptime内的。在uc2rpq的情况下,当查询是非循环的并且具有有限数量的连接变量对的边时,我们显示exptime边界。作为推论,我们得到如果Gamma是强无环UC2RPQ,则检验Pi是否包含在UC2RPQ中是在exptime内的。从某种意义上说,我们对ucq和uc2rpq的正面结果是最优的,因为稍微扩展条件会使问题2exptime-complete。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Session details: Classics Does query evaluation tractability help query containment? Session details: Web queries and big data On scale independence for querying big data Cleaning inconsistencies in information extraction via prioritized repairs
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1