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 条
  • [21] Rewriting regular XPath queries on XML views
    Fan, Wenfei
    Geerts, Floris
    Jia, Xibei
    Kementsietsidis, Anastasios
    2007 IEEE 23RD INTERNATIONAL CONFERENCE ON DATA ENGINEERING, VOLS 1-3, 2007, : 641 - +
  • [22] Determinacy and query rewriting for conjunctive queries and views
    Afrati, Foto N.
    THEORETICAL COMPUTER SCIENCE, 2011, 412 (11) : 1005 - 1021
  • [23] Rewriting queries using views with access patterns under integrity constraints
    Deutsch, A
    Ladäscher, B
    Nash, A
    DATABASE THEORY - ICDT 2005, PROCEEDINGS, 2005, 3363 : 352 - 367
  • [24] A Top-Down Approach to Rewriting Conjunctive Queries Using Views
    Mohajerin, Nima
    Shiri, Nematollaah
    SEMANTICS IN DATA AND KNOWLEDGE BASES, 2008, 4925 : 180 - 198
  • [25] Rewriting queries using views with access patterns under integrity constraints
    Deutsch, Alin
    Ludascher, Bertram
    Nash, Alan
    THEORETICAL COMPUTER SCIENCE, 2007, 371 (03) : 200 - 226
  • [26] Answering queries using views in the presence of functional dependencies
    Hong, J
    Liu, WR
    Bell, D
    Bai, QY
    DATABASE: ENTERPRISE, SKILLS AND INNOVATION, PROCEEDINGS, 2005, 3567 : 70 - 81
  • [27] Rewriting OLAP queries using materialized views and dimension hierarchies in data warehouses
    Park, CS
    Kim, MH
    Lee, YJ
    17TH INTERNATIONAL CONFERENCE ON DATA ENGINEERING, PROCEEDINGS, 2001, : 515 - 523
  • [28] An object-oriented representation and reasoning model to rewriting queries using views
    Seriai, A
    SEVENTH INTERNATIONAL DATABASE ENGINEERING AND APPLICATIONS SYMPOSIUM, PROCEEDINGS, 2003, : 407 - 408
  • [29] Finding an efficient rewriting of OLAP queries using materialized views in data warehouses
    Park, CS
    Kim, MH
    Lee, YJ
    DECISION SUPPORT SYSTEMS, 2002, 32 (04) : 379 - 399
  • [30] Rewriting queries using views for RDF-based relational data integration
    Chen, HJ
    Wu, ZH
    Mao, YX
    ICTAI 2005: 17TH IEEE INTERNATIONAL CONFERENCE ON TOOLS WITH ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2005, : 260 - 264