Rewriting queries using views in the presence of arithmetic comparisons

被引:17
|
作者
Afrati, Foto [1 ]
Li, Chen
Mitra, Prasenjit
机构
[1] Natl Tech Univ Athens, GR-15773 Athens, Greece
[2] Univ Calif Irvine, Dept Comp Sci, Irvine, CA 92697 USA
[3] Penn State Univ, Coll Informat Sci & Technol, University Pk, PA 16802 USA
关键词
databases; query rewriting; query languages;
D O I
10.1016/j.tcs.2006.08.020
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We consider the problem of answering queries using views, where queries and views are conjunctive queries with arithmetic comparisons over dense orders. Previous work only considered limited variants of this problem, without giving a complete solution. We first show that obtaining equivalent rewritings for conjunctive queries with arithmetic comparisons is decidable. Then, we consider the problem of finding maximally contained rewritings (MCRs) where the decidability proof does not carry over. We investigate two special cases of this problem where the query uses only semi-interval comparisons. In both cases decidability of finding MCRs depends on the query containment test. First, we address the case where the homomorphism property holds in testing query containment. In this case decidability is easy to prove but developing an efficient algorithm is not trivial. We develop such an algorithm and prove that it is sound and complete. This algorithm applies in many cases where the query uses only left (or right) semi-interval comparisons. Then, we develop a new query containment test for the case where the containing query uses both left and right semi-interval comparisons but with only one left (or right) semi-interval subgoal. Based on this test, we show how to produce an MCR which is a Datalog query with arithmetic comparisons. The containment test that we develop obtains a result of independent interest. It finds another special case where query containment in the presence of arithmetic comparisons can be tested in nondeterministic polynomial time. (c) 2006 Elsevier B.V. All rights reserved.
引用
收藏
页码:88 / 123
页数:36
相关论文
共 50 条
  • [1] Rewriting queries using views
    Flesca, S
    Greco, S
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2001, 13 (06) : 980 - 995
  • [2] Rewriting Union Queries Using Views
    J. Wang
    R. Topor
    M. Maher
    Constraints, 2005, 10 : 219 - 251
  • [3] Approximate Rewriting of Queries Using Views
    Afrati, Foto
    Chandrachud, Manik
    Chirkova, Rada
    Mitra, Prasenjit
    ADVANCES IN DATABASES AND INFORMATION SYSTEMS, PROCEEDINGS, 2009, 5739 : 164 - +
  • [4] Rewriting queries using views with negation
    Afrati, Foto
    Pavlaki, Vassia
    AI COMMUNICATIONS, 2006, 19 (03) : 229 - 237
  • [5] Rewriting union queries using views
    Wang, J
    Topor, R
    Maher, M
    CONSTRAINTS, 2005, 10 (03) : 219 - 251
  • [6] Rewriting aggregate queries using views
    Cohen, Sara
    Nutt, Werner
    Serebrenik, Alexander
    Proceedings of the ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, 1999, : 155 - 166
  • [7] Rewriting Fuzzy Queries Using Imprecise Views
    Jaudoin, Helene
    Pivert, Olivier
    ADVANCES IN DATABASES AND INFORMATION SYSTEMS, 2011, 6909 : 257 - 270
  • [8] Views and Queries: Determinacy and Rewriting
    Nash, Alan
    Segoufin, Luc
    Vianu, Victor
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2010, 35 (03):
  • [9] Filtering Techniques for Rewriting XPath Queries Using Views
    Zhou, Rui
    Liu, Chengfei
    Li, Jianxin
    Wang, Junhu
    WEB INFORMATION SYSTEMS ENGINEERING - WISE 2008, PROCEEDINGS, 2008, 5175 : 307 - +
  • [10] Object oriented mechanisms to rewriting queries using views
    Seriai, Abdelhak
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2003, 2736 : 672 - 682