Conjunctive Query Evaluation by Search Tree Revisited
The most natural and perhaps most frequently used method for testing membership of an individual tuple into a conjunctive query is based on search trees. We investigate the question of evaluating conjunctive queries with a time-bound guarantee that is measured as a function of the size of the minimal search tree. We provide an algorithm that, given a database D, a conjunctive query Q, and a tuple t, tests whether Q(t) holds in D in time bounded by (sn) O(logk) (sn) O(loglog n), where n is the size of the domain of the database, k is the number of bound variables of the conjunctive query, and s is the size of the optimal search tree. In many cases of interest, this bound is significantly smaller than the n O(k) bound provided by the naive search-tree method. Moreover, our algorithm has the advantage of guaranteeing the bound for any given conjunctive query. In particular, it guarantees the bound for queries that admit an equivalent form that is much easier to evaluate, even when finding such a form is an NP-hard task. Concrete examples include the conjunctive queries that can be non-trivially folded into a conjunctive query of bounded size or bounded treewidth. All our results translate to the context of constraint-satisfaction problems via the well-publicized correspondence between both frameworks.
Unable to display preview. Download preview PDF.
- [BKPS02]Beame, P., Karp, R., Pitassi, T., Saks, M.: The efficiency of resolution and Davis-Putnam procedures. SIAM Journal of Computing, 1048–1075 (2002)Google Scholar
- [BP96]Beame, P., Pitassi, T.: Simplified and improved resolution lower bounds. In: 37th Annual IEEE Symposium on Foundations of Computer Science, pp. 274–282 (1996)Google Scholar
- [CM77]Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational databases. In: 9th Annual ACM Symposium on the Theory of Computing, pp. 77–90 (1977)Google Scholar
- [CR97]Chekuri, C., Rajaraman, A.: Conjunctive query containment revisited. In: 6th International Conference on Database Theory. LNCS, vol. 1997, pp. 56–70. Springer, Heidelberg (1997)Google Scholar
- [GLS98]Gottlob, G., Leone, N., Scarcello, F.: The complexity of acyclic conjunctive queries. In: 39th Annual IEEE Symposium on Foundations of Computer Science, pp. 706–715 (1998)Google Scholar
- [Yan81]Yannakakis, M.: Algorithms for acyclic database schemes. In: 7th International Conference on Very Large Data Bases, pp. 82–94 (1981)Google Scholar