On the Complexity of Single-Rule Datalog Queries

  • Georg Gottlob
  • Christos Papadimitriou
Conference paper

DOI: 10.1007/3-540-48242-3_13

Part of the Lecture Notes in Computer Science book series (LNCS, volume 1705)
Cite this paper as:
Gottlob G., Papadimitriou C. (1999) On the Complexity of Single-Rule Datalog Queries. In: Ganzinger H., McAllester D., Voronkov A. (eds) Logic for Programming and Automated Reasoning. LPAR 1999. Lecture Notes in Computer Science, vol 1705. Springer, Berlin, Heidelberg

Abstract

Datalog is a well-known database query language based on the logic programming paradigm. A general datalog program consists of a number of rules and facts. Programs containing a unique rule and possibly some facts are called single rule programs (sirups). We study both the combined and the program complexity of sirups, ie., the complexity of evaluating sirups over variable and fixed databases, respectively. Moreover, we study the descriptive complexity of sirups, i.e., their expressive power. In all cases it turns out that even very restricted classes of sirups have the same complexity and essentially the same expressive power as general datalog programs. We show that the evaluation of single clause programs is EXPTIME complete (combined complexity), and, if restricted to linear recursive rules, PSPACE complete. Moreover, sirups with one recursive rule and one additional fact capture PTIME on ordered structures, if a certain data representation is assumed and certain predefined relations are provided. Our results are obtained by a uniform product construction which maps a datalog program into a single rule by essentially maintaining its semantics. We also prove that the datalog clause implication problem, i.e., deciding whether a datalog clause implies another one, is EXPTIME complete.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Georg Gottlob
    • 1
  • Christos Papadimitriou
    • 1
  1. 1.Computer Science Division, Dept of Electrical Engineering and Computer ScienceUniversity of California, BerkeleyBerkeley

Personalised recommendations