Safety and translation of relational calculus
- 1 May 1991
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 16 (2) , 235-278
- https://doi.org/10.1145/114325.103712
Abstract
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.Keywords
This publication has 12 references indexed in Scilit:
- ON SAFETY, DOMAIN INDEPENDENCE, AND CAPTURABILITY OF DATABASE QUERIES* (Preliminary Report)*Research sponsored in part by the NSF grant DCR-8603676.Published by Elsevier ,1988
- Domain-independent formulas and databasesTheoretical Computer Science, 1987
- Logic programming with setsPublished by Association for Computing Machinery (ACM) ,1987
- Design overview of the NAIL! SystemPublished by Springer Nature ,1986
- Making prolog more expressiveThe Journal of Logic Programming, 1984
- Logic for improving integrity checking in relational data bases?Acta Informatica, 1982
- Horn clauses and database dependenciesJournal of the ACM, 1982
- Proving termination with multiset orderingsCommunications of the ACM, 1979
- An algebra of relations for machine computationPublished by Association for Computing Machinery (ACM) ,1975
- The Recursive Unsolvability of the Decision Problem for the Class of Definite FormulasJournal of the ACM, 1969