Decidability and undecidability results for boundedness of linear recursive queries

If it is possible to eliminate recursion from a Datalog program <italic>P</italic>, then <italic>P</italic> is said to be <italic>bounded</italic>. It was shown by Gaifman et al that the problem of deciding whether a given Datalog program is bounded is undecidable, even for linear programs that has one <italic>4-ary</italic> intensional predicate. We sharpen that result by showing that the problem of deciding whether a given Datalog program is bounded is undecidable, even for linear programs that has one <italic>binary</italic> intensional predicate. We then consider linear programs with a single recursive rule. We show that if the intensional predicate is binary, then the boundedness problem for such program is decidable, in fact, it is NP-complete.

[1]  David Harel,et al.  Computable Queries for Relational Data Bases , 1980, J. Comput. Syst. Sci..

[2]  Jeffrey F. Naughton,et al.  Data independent recursion in deductive databases , 1985, J. Comput. Syst. Sci..

[3]  Jeffrey D. Ullman,et al.  Implementation of logical query languages for databases , 1985, TODS.

[4]  Jeffrey F. Naughton,et al.  Minimizing function-free recursive inference rules , 1989, JACM.

[5]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[6]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[7]  Matthias Jarke,et al.  An optimizing prolog front-end to a relational query system , 1984, SIGMOD '84.

[8]  Jack Minker,et al.  Logic and Data Bases , 1978, Springer US.

[9]  Stavros S. Cosmadakis,et al.  Parallel evaluation of recursive rule queries , 1985, PODS '86.

[10]  David Harel,et al.  Horn Clauses Queries and Generalizations , 1985, J. Log. Program..

[11]  Ashok K. Chandra Programming primitives for database languages , 1981, POPL '81.

[12]  Jeffrey F. Naughton,et al.  A decidable class of bounded recursions , 1987, PODS '87.

[13]  Haim Gaifman,et al.  Decidable optimization problems for database logic programs , 1988, STOC '88.

[14]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[15]  Yehoshua Sagiv On computing restricted projections of representative instances , 1985, PODS '85.

[16]  David Maier,et al.  On the foundations of the universal relation model , 1984, TODS.

[17]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[18]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.

[19]  Alfred V. Aho,et al.  Efficient optimization of a class of relational expressions , 1979, TODS.