Conjunctive query containment revisited

被引:102
作者
Chekuri, C
Rajaraman, A
机构
[1] Bell Labs, Murray Hill, NJ 07974 USA
[2] Amazon Com, Seattle, WA 98101 USA
基金
美国国家科学基金会;
关键词
D O I
10.1016/S0304-3975(99)00220-0
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We consider the problems of conjunctive query containment and minimization, which are known to be NP-complete, and show that these problems can be solved in polynomial time for the class of acyclic queries, We then generalize the notion of acyclicity and define a parameter called query width that captures the ''degree of cyclicity" of a query: in particular, a query is acyclic if and only if its query width is 1. We give algorithms for containment and minimization that run in time polynomial in n(k), where n is the input size and k is the query width. These algorithms naturally generalize those for acyclic queries, and are of practical significance because many queries have small query width compared to their sizes. We show that good bounds on the query width of Q can be obtained using the treewidth of the incidence graph of Q. We then consider the problem of finding an equivalent query to a given conjunctive query Q that has the least number of subgoals. We show that a polynomial-time approximation algorithm is unlikely for this problem. Finally, we apply our containment algorithm to the practically important problem of finding equivalent rewritings of a query using a set of materialized views. (C) 2000 Elsevier Science B.V. All rights reserved.
引用
收藏
页码:211 / 229
页数:19
相关论文
共 24 条
[1]  
Aho A. V., 1979, ACM Transactions on Database Systems, V4, P435, DOI 10.1145/320107.320112
[2]   EQUIVALENCES AMONG RELATIONAL EXPRESSIONS [J].
AHO, AV ;
SAGIV, Y ;
ULLMAN, JD .
SIAM JOURNAL ON COMPUTING, 1979, 8 (02) :218-246
[3]   COMPLEXITY OF FINDING EMBEDDINGS IN A K-TREE [J].
ARNBORG, S ;
CORNEIL, DG ;
PROSKUROWSKI, A .
SIAM JOURNAL ON ALGEBRAIC AND DISCRETE METHODS, 1987, 8 (02) :277-284
[4]   OPTIMIZATION OF A SUBCLASS OF CONJUNCTIVE QUERIES [J].
BISKUP, J ;
DUBLISH, P ;
SAGIV, Y .
ACTA INFORMATICA, 1995, 32 (01) :1-26
[5]  
Bodlaender H. L., 1993, Proceedings of the Twenty-Fifth Annual ACM Symposium on the Theory of Computing, P226, DOI 10.1145/167088.167161
[6]   APPROXIMATING TREEWIDTH, PATHWIDTH, FRONTSIZE, AND SHORTEST ELIMINATION TREE [J].
BODLAENDER, HL ;
GILBERT, JR ;
HAFSTEINSSON, H ;
KLOKS, T .
JOURNAL OF ALGORITHMS, 1995, 18 (02) :238-255
[7]  
Chandra Ashok K., 1977, STOC'77: Proceedings of the ninth annual ACM symposium on Theory of computing, P77, DOI DOI 10.1145/800105.803397
[8]  
CHAUDHURI S, 1995, PROC INT CONF DATA, P190, DOI 10.1109/ICDE.1995.380392
[9]   Zero knowledge and the chromatic number [J].
Feige, U ;
Kilian, J .
ELEVENTH ANNUAL IEEE CONFERENCE ON COMPUTATIONAL COMPLEXITY, PROCEEDINGS, 1996, :278-287
[10]  
GRAHAM MH, 1907, UNIVERSAL RELATION