Query Evaluation via Tree-Decompositions
A number of efficient methods for evaluating first-order and monadic-second order queries on finite relational structures are based on tree-decompositions of structures or queries. We systematically study these methods. In the first-part of the paper we consider tree-like structures. We generalize a theorem of Courcelle  by showing that on such structures a monadic second-order formula (with free first-order and second-order variables) can be evaluated in time linear in the structure size plus the size of the output. In the second part we study tree-like formulas. We generalize the notions of acyclicity and bounded tree-width from conjunctive queries to arbitrary first-order formulas in a straightforward way and analyze the complexity of evaluating formulas of these fragments. Moreover, we show that the acyclic and bounded tree-width fragments have the same expressive power as the well-known guarded fragment and the finite-variable fragments of first-order logic, respectively.
Unable to display preview. Download preview PDF.
- 1.S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995.Google Scholar
- 2.A.V. Aho, J.E. Hopcroft, and J.D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.Google Scholar
- 3.H. Andréka, J. van Benthem, and I. Németi. Modal languages and bounded fragments of first-order logic, 1996. ILLC Research Report ML-96-03, University of Amsterdam.Google Scholar
- 6.Ch. Chekuri and A. Rajaraman. Conjunctive query containment revisited. In Ph. Kolaitis and F. Afrati, editors, Proceedings of the 5th International Conference on Database Theory, volume 1186 of Lecture Notes in Computer Science, pages 56–70. Springer-Verlag, 1997.Google Scholar
- 7.B. Courcelle. Graph rewriting: An algebraic and logic approach. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume 2, pages 194–242. Elsevier Science Publishers, 1990.Google Scholar
- 9.T. Feder and M.Y. Vardi. Monotone monadic SNP and constraint satisfaction. In Proceedings of the 25th ACM Symposium on Theory of Computing, pages 612–622, 1993.Google Scholar
- 10.J. Flum and M. Frick and M. Grohe. Query evaluation via tree-decompositions. Full version of this paper, available at http://www.math.uic.edu/~grohe/pub.html.
- 11.G. Gottlob, E. Grädel, and H. Veith. Datalog lite: Temporal versus deductive reasoning in verification. Technical Report DBAI-TR-98-22, Technische UniversitätWien, 1998.Google Scholar
- 12.G. Gottlob, N. Leone, and F. Scarcello. The complexity of acyclic conjunctive queries. In Proceedings of the 39th Annual IEEE Symposium on Foundations of Computer Science, pages 706–715, 1998.Google Scholar
- 13.G. Gottlob, N. Leone, and F. Scarcello. Hypertree decompositions and tractable queries. In Proceedings of the 18th ACM Symposium on Principles of Database Systems, pages 21–32, 1999.Google Scholar
- 14.G. Gottlob, N. Leone, and F. Scarcello. A Comparison of Structural CSP Decomposition Methods. In Proceedings of the Sixteenth International Joint Conference on Artificial Intelligence, pages 394–399, 1999.Google Scholar
- 15.Ph.G. Kolaitis and M.Y. Vardi. Conjunctive-query containment and constraint satisfaction. In Proceedings of the 17th ACMSymposium on Principles of Database Systems, pages 205–213, 1998.Google Scholar
- 16.J. Makowsky. Model theory in computer science:An appetizer. In S. Abramsky, D.M. Gabbay, and T.S.E. Maibaum, editors, Handbook of Logic in Computer Science, volume 1, chapter 6. Oxford University Press, 1992.Google Scholar
- 17.L.J. Stockmeyer. The Complexity of Decision Problems in Automata Theory. PhD thesis, Department of Electrical Engineering, MIT, 1974.Google Scholar
- 20.C. Thomassen. Embeddings and minors. In R. Graham, M. Grötschel, and L. Lovász, editors, Handbook of Combinatorics, volume 1, chapter 5, pages 301–349. Elsevier, 1995.Google Scholar
- 21.P. van Emde Boas. Machine models and simulations. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, volume 1, pages 1–66. Elsevier Science Publishers, 1990.Google Scholar
- 22.M.Y. Vardi. The complexity of relational query languages. In Proceedings of the 14th ACM Symposium on Theory of Computing, pages 137–146, 1982.Google Scholar
- 23.M.Y. Vardi. On the complexity of bounded-variable queries. In Proceedings of the 14th ACM Symposium on Principles of Database Systems, pages 266–276, 1995.Google Scholar
- 24.M. Yannakakis. Algorithms for acyclic database schemes. In 7th International Conference on Very Large Data Bases, pages 82–94, 1981.Google Scholar