Safety and translation of relational calculus

Not all queries in relational calculus can be answered sensibly when disjunction, negation, and universal quantification are allowed. The class of relation calculus queries or formulas that have sensible answers is called the domain independent class which is known to be undecidable. Subsequent research has focused on identifying large decidable subclasses of domain independent formulas. In this paper we investigate the properties of two such classes: the evaluable formulas and the allowed formulas. Although both classes have been defined before, we give simplified definitions, present short proofs of their main properties, and describe a method to incorporate equality. Although evaluable queries have sensible answers, it is not straightforward to compute them efficiently or correctly. We introduce relational algebra normal form for formulas from which form the correct translation into relational algebra is trivial. We give algorithms to transform an evaluable formula into an equivalent allowed formula and from there into relational algebra normal form. Our algorithms avoid use of the so-called Dom relation, consisting of all constants appearing in the database or the query. Finally, we describe a restriction under which every domain independent formula is evaluable and argue that the class of evaluable formulas is the largest decidable subclass of the domain independent formulas that can be efficiently recognized.

[1]  Krzysztof Dudzinski,et al.  On a Stable Minimum Storage Merging Algorithm , 1981, Inf. Process. Lett..

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

[3]  Jeffrey D. Ullman,et al.  Principles Of Database And Knowledge-Base Systems , 1979 .

[4]  Carlo Zaniolo,et al.  LDL: A Logic-Based Data Language , 1986, VLDB.

[5]  Jeffrey D. Ullman,et al.  Principles of Database Systems , 1980 .

[6]  Zohar Manna,et al.  Introduction to mathematical theory of computation , 1972 .

[7]  E. F. Codd,et al.  Relational Completeness of Data Base Sublanguages , 1972, Research Report / RJ / IBM / San Jose, California.

[8]  Ronald Fagin,et al.  Horn clauses and database dependencies , 1982, JACM.

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

[10]  Johann A. Makowsky,et al.  Characterizing Data Base Dependencies , 1981, ICALP.

[11]  Stephen Todd,et al.  An algebra of relations for machine computation , 1975, POPL '75.

[12]  David Maier,et al.  The Theory of Relational Databases , 1983 .

[13]  Rodney W. Topor,et al.  Domain-Independent Formulas and Databases , 1987, Theor. Comput. Sci..

[14]  Catriel Beeri,et al.  Sets and negation in a logic data base language (LDL1) , 1987, PODS.

[15]  Robert Demolombe Syntactical characterization of a subset of domain-independent formulas , 1992, JACM.

[16]  Jeffrey D. Ullman,et al.  Design Overview of the NAIL! System , 1986, ICLP.

[17]  A. K. Ailamazyan,et al.  Reduction of a relational model with infinite domains to the finite-domain case , 1986 .

[18]  Jeffrey D. Ullman,et al.  Principles of database and knowledge-base systems, Vol. I , 1988 .

[19]  Gabriel M. Kuper,et al.  Logic programming with sets , 1987, J. Comput. Syst. Sci..

[20]  Zohar Manna,et al.  Proving termination with multiset orderings , 1979, CACM.

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

[22]  Wilhelm Ackermann,et al.  Solvable Cases Of The Decision Problem , 1954 .

[23]  J. W. LLOYD,et al.  Making Prolog more Expressive , 1984, J. Log. Program..

[24]  Rodney W. Topor,et al.  Safety and correct translation of relational calculus formulas , 1987, PODS '87.

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

[26]  Zohar Manna,et al.  Proving termination with multiset orderings , 1979, CACM.