Solving implication problems in database applications

Computing queries from derived relations, optimizing queries from a group of queries, and updating materialized views are important database problems and have attracted much attention. One thing common to these problems is their demand to quickly solve the implication problem — given two predicates &sgr;<subscrpt><italic>Q</italic></subscrpt> and &sgr;<subscrpt>τ</subscrpt>, can &sgr;<subscrpt><italic>Q</italic></subscrpt> imply &sgr;<subscrpt>τ</subscrpt> (&sgr;<subscrpt><italic>Q</italic></subscrpt>→&sgr;<subscrpt>τ</subscrpt>)? The implication problem has been solved by converting it into a satisfiability problem. Based on a graph representation, a detailed study of the general implication problem on its own is presented in this paper. We proved that the general implication problem, in which all six comparison operators: =, ≠, <, >, ≤, ≥, as well as conjunctions and disjunctions are allowed, is NP-hard. In the case when “≠” operators are not allowed in &sgr;<subscrpt><italic>Q</italic></subscrpt> and disjunctions are not allowed in &sgr;<subscrpt>τ</subscrpt>, a polynomial time algorithm is proposed to solve this restricted implication problem. The influence of the “≠” operator and disjunctions are studied. Our theoretical results show that for some special cases the polynomial complexity algorithm can solve the implication problem which allows the “≠” operator or disjunctions in the predicates. Necessary conditions for detecting when the “≠” operator and disjunctions are allowed are also given. These results are very useful in creating heuristic methods.

[1]  Pascal Faudemay,et al.  An extension of access paths to improve joins and selections , 1986, 1986 IEEE Second International Conference on Data Engineering.

[2]  Shimon Even,et al.  Graph Algorithms , 1979 .

[3]  Per-Åke Larson,et al.  Computing Queries from Derived Relations , 1985, VLDB.

[4]  Sheldon J. Finkelstein Common expression analysis in database applications , 1982, SIGMOD '82.

[5]  David Maier,et al.  Fragments of relations , 1983, SIGMOD '83.

[6]  Harry B. Hunt,et al.  Processing Conjunctive Predicates and Queries , 1980, VLDB.

[7]  Matthias Jarke,et al.  Query Optimization in Database Systems , 1984, CSUR.

[8]  Per-Åke Larson,et al.  Updating derived relations: detecting irrelevant and autonomously computable updates , 1986, VLDB.

[9]  Frank Steyer,et al.  Application Of Sub-Predicate Tests In Database Systems , 1979, Fifth International Conference on Very Large Data Bases, 1979..

[10]  Timos K. Sellis,et al.  Multiple-query optimization , 1988, TODS.

[11]  Stefano Ceri,et al.  Horizontal data partitioning in database design , 1982, SIGMOD '82.

[12]  Frank Wm. Tompa,et al.  Efficiently updating materialized views , 1986, SIGMOD '86.

[13]  Timos K. Sellis,et al.  Global query optimization , 1986, SIGMOD '86.

[14]  Matthias Jarke,et al.  Common Subexpression Isolation in Multiple Query Optimization , 1984, Query Processing in Database Systems.

[15]  Nabil Nessim Kamel The use of controlled redundancy in self-adaptive databases (temporaries, derived, packrat, r-tree, texture analysis) , 1985 .