On the decidability and axiomatization of query finiteness in deductive databases

A database query is finite if its result consists of a finite sets tuples. For queries formulated as sets of pure Horn rules, the problem of determining finiteness is, in general, undecidable. In this paper, we consider superfiniteness—a stronger kind of finiteness, which applies to Horn queries whose function symbols are replaced by the abstraction of infinite relations with finiteness constraints (abbr., FC's). We show that superfiniteness is not only decidable but also axiomatizable, and the axiomatization yields an effective decision procedure. Although there are finite queries that are not superfinite, we demonstrate that superfinite queries represent an interesting and nontrivial subclass within the class of all finite queries. The we turn to the issue of inference of finiteness constraints—an important practical problem that is instrumental in deciding if a query is evaluable by a bottom-up algorithm. Although it is not known whether FC-entailment is decidable for sets of function-free Horn rules, we show that super-entailment, a stronger form of entailment, is decidable. We also show how a decision procedure for super-entailment can be used to enhance tests for query finiteness.

[1]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[2]  Kenneth Kunen,et al.  Negation in Logic Programming , 1987, J. Log. Program..

[3]  Konstantinos Sagonas,et al.  Xsb as an Eecient Deductive Database Engine , 1994 .

[4]  Ronald Fagin,et al.  Inclusion dependencies and their interaction with functional dependencies , 1982, PODS.

[5]  J. H. Jou,et al.  Succinctness in Dependency Systems , 1983, Theor. Comput. Sci..

[6]  Georg Gottlob Computing covers for embedded functional dependencies , 1987, PODS '87.

[7]  David S. Johnson,et al.  Testing containment of conjunctive queries under functional and inclusion dependencies , 1982, J. Comput. Syst. Sci..

[8]  Moshe Y. Vardi,et al.  The Implication Problem for Functional and Inclusion Dependencies is Undecidable , 1985, SIAM J. Comput..

[9]  Yehoshua Sagiv A Termination Test for Logic Programs , 1991, ISLP.

[10]  Ravi Krishnamurthy,et al.  A Framework for Testing Safety and Effective Computability , 1996, J. Comput. Syst. Sci..

[11]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[12]  Yehoshua Sagiv,et al.  Safety of datalog queries over infinite databases , 1989, PODS '89.

[13]  Paul De Bra,et al.  Conditional Dependencies for Horizontal Decompositions , 1983, ICALP.

[14]  Yehoshua Sagiv,et al.  Optimizing datalog programs , 1987, Foundations of Deductive Databases and Logic Programming..

[15]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[16]  A BernsteinPhilip,et al.  Computational problems related to the design of normal form relational schemas , 1979 .

[17]  Yehoshua Sagiv,et al.  On Termination of Datalog Programs , 1989, DOOD.

[18]  Divesh Srivastava,et al.  Implementation of the CORAL deductive database system , 1993, SIGMOD Conference.

[19]  Moshe Y. Vardi The Decision Problem for Database Dependencies , 1981, Inf. Process. Lett..

[20]  Abraham Silberschatz,et al.  Safety of recursive Horn clauses with infinite relations , 1987, PODS '87.

[21]  Oded Shmueli,et al.  Decidability and expressiveness aspects of logic queries , 1987, XP7.52 Workshop on Database Theory.

[22]  Divesh Srivastava,et al.  CORAL - Control, Relations and Logic , 1992, VLDB.

[23]  Michael Kifer,et al.  SYGRAF: Implementing Logic Programs in a Database Style , 1988, IEEE Trans. Software Eng..

[24]  Konstantinos Sagonas,et al.  XSB as an efficient deductive database engine , 1994, SIGMOD '94.

[25]  Michael Kifer,et al.  On Safety, Domain Independence, and Capturability of Database Queries (Preliminary Report) , 1988, JCDKB.

[26]  Philip A. Bernstein,et al.  Computational problems related to the design of normal form relational schemas , 1979, TODS.

[27]  J. D. Uiiman,et al.  Principles of Database Systems , 2004, PODS 2004.

[28]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[29]  Nathan Goodman,et al.  Tree queries: a simple class of relational queries , 1982, TODS.

[30]  Stavros S. Cosmadakis,et al.  Functional and inclusion dependencies a graph theoretic approach , 1984, PODS '84.

[31]  Edward Sciore Improving database schemes by adding attributes , 1983, PODS '83.

[32]  John C. Mitchell The Implication Problem for Functional and Inclusion Dependencies , 1984, Inf. Control..

[33]  Paul De Bra,et al.  Horizontal Decompositions for Handling Exceptions to Functional Dependencies , 1982, Advances in Data Base Theory.

[34]  Laks V. S. Lakshmanan,et al.  Superfiniteness of Query Answers in Deductive Databases: An Automata-Theoretic Approach , 1992, FSTTCS.

[35]  Yehoshua Sagiv,et al.  On Testing Effective Computability of Magic Programs , 1991, DOOD.

[36]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[37]  Abraham Silberschatz,et al.  An axiomatic approach to deciding query safety in deductive databases , 1988, PODS '88.

[38]  Bernhard Convent Deciding Finiteness, Groundness and Domain Independence of Pure Datalog Queries , 1989, J. Inf. Process. Cybern..

[39]  Paul De Bra,et al.  Horizontal Decompositions Based on Functional-Dependency-Set-Implications , 1986, ICDT.

[40]  Shamim A. Naqvi,et al.  A Logical Language for Data and Knowledge Bases , 1989 .

[41]  Serge Abiteboul,et al.  Data functions, datalog and negation , 1988, SIGMOD '88.

[42]  Carlo Zaniolo,et al.  Safety and Compilation of Non-recursive Horn Clauses , 1986, Expert Database Conf..

[43]  Robert A. Di Paola The Recursive Unsolvability of the Decision Problem for the Class of Definite Formulas , 1969, JACM.