Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Safety and translation of relational calculus

Published: 01 May 1991 Publication History

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.

References

[1]
ACKERMANN, W. Solvable Cases of the Decision Problem. North-Holland, Amsterdam, 1968.
[2]
AYLAMAZAN, A. K., GIC~ULA, M. M., S'roLBusHKIN, A. P., AND SCHWARTZ, G.F. Reduction of the relational model with infinite domains to the finite domain case. In Proceedings of USSR Academy of Science. 286, 2 (1986).
[3]
BEERI, C., NAQVI, S, RAMAKRISHNAN, R., SHMUELI, O., AND TSUR, S. Sets and negation m a logic database language (LDL1). In 6th ACM Symposium on Principles of Database Systems. 1987, 21-37.
[4]
CODD, E. F Relational completeness of data base sublanguages In Data Base Systems. R. Rustin, Ed. Prentice-Hall, Englewood Cliffs, N.J., 1972, 65-98.
[5]
DECKER H Integrity enforcement in deductive databases. In 1st International Conference on Expert Database Systems. 1986, 271 285.
[6]
DEMOLOMBE, R. Syntactical characterization of a subset of domain independent formulas. Tech. Rep. ONERA-CERT, 1982.
[7]
DERSHOW~TZ, N AND MANNA Z. Proving termination with multiset orderings Commun. ACM. 22, 8 (1979), 465-476.
[8]
DIPAOLA, R.A. The recurs~ve unsolvability of the decision problem for the class of definite formulas. J. ACM. 16, 2 (1969), 324 324.
[9]
FAGIN, R. Horn clauses and database dependencies J. ACM 29, 4 (1982), 952-985
[10]
HALL, P., HITCHCOCK, P, AND TODD, S An algebra of relations for machine computation. In ACM Symposium on Principles of Programming Languages 1975, 225 232.
[11]
KIFER, M. On safety, domain independence, and capturability of database queries. In Third International Conference on Data and Knowledge Bases (Jerusalem, 1988).
[12]
KU~NS, J L. Answering questions by computer: A logical study. Tech. Rep. RM-5428-PR, Rand Corp., 1967.
[13]
KUPER, G M Logic programming with sets. In 6th ACM Symposium on Pnnaples of Database Systems 1987, 11-20
[14]
LLOYD, J W., AND TOPOR, R. W Making Prolog more expressive. J. Logzc Program. 1, 3 (1984), 225-240.
[15]
MAIER, D The Them'y of Relatzonal Databases Computer Science Press, Rockville, Md., 1983.
[16]
MAKOWS~Y, J. A. Characterizing data base dependencies. In 8th Colloquium on Automata, Languages and Programmzng Springer Verlag, New York, 1981
[17]
MANNA, Z. Mathematical Theory of Computation. McGraw-Hill, New York, 1974.
[18]
MORRIS, K., ULLMAN, J. D, AND VAN GELDER, A. Design overwew of the Nail! system. In Third Internatmnal Conference on Logic Programming. 1986, 554-568.
[19]
NAQVI, S., AND TSUR, S. A Logic Language for Data and Knowledge Bases. Computer Science Press, Rockville Md., 1988.
[20]
NICOLAS, J. M Logic for improving integrity checking in relational databases Acta Inf. 18, 3 (1982), 227-253
[21]
NICOLAS, J M., AND DEMOLOMBE, R. On the stability of relational queries. Tech. Rep. ONERA-CERT, 1982.
[22]
OZSO~OGLU, G, AND WAN% H. On set comparison operators, safety, and QBE. Tech. Rep Case Western Reserve Umv., Cleveland, Oh., 1987.
[23]
ToPoR, R Domain independent formulas and databases. Theor. Comput. Scz. 52, 3 (1987), 281-307.
[24]
TsuR, S., AND ZANIOLO, C LDL: a logic-based data-language. In Proceedings of the 12th Internatzonal Conference on Very Large Data Bases. 1986, 33 41. See also MCC rep DB-150-85.
[25]
ULLMAN, J. D Prtnciples of Database and Knowledge-Base Systems. Vol. 1. Computer Science Press, Rockville, Md, 1988.
[26]
ULLMAN, J.D. Principles of Database Systems. Computer Science Press, Rockville, Md., 1980. (Revised ed. 1982).
[27]
VAN GELDER, A, AND TOPOR, R W. Safety and correct translation of relational calculus formulas. In 6th ACM Symposium on Principles of Database Systems. 1987, 313-327.
[28]
VARm, M. The decision problem for database dependencies. Inf. Process. Lett. 12, 5 (1981), 251-254.

Cited By

View all

Recommendations

Reviews

Charles William Bash

“Not all queries in relational calculus can be answered sensibly when disjunction, negation and universal quantification are allowed.” Given the growing number of intermediate query generators on the market, more and more problems will not be stated in simple terms, and methods are needed to simplify those statements so that they can be correctly solved. Even apparently simple queries such as “SELECT P.name FROM P,Q,R WHERE P.name = Q.name OR P.name = R.name ” may yield counterintuitive results using current methods. The authors state that if R is empty, both SQL and QUEL return nothing, even if matches exist between P and Q . The importance of this can be seen if we translate the request into English: “Give me a list of the parts that I have in inventory, or that are currently on order.” This paper is for those deeply involved in the process of relational calculus, not for the lay reader. The calculus is long and involved, and will not be obvious without careful study. The work is important to the evolution of database system, however, and I strongly urge those involved in this area to read the document.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 16, Issue 2
June 1991
160 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/114325
  • Editor:
  • Gio Wiederhold
Issue’s Table of Contents

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 May 1991
Published in TODS Volume 16, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. allowed formulas
  2. domain independence
  3. evaluable formulas
  4. existential normal
  5. query translation
  6. relational algebra
  7. relational calculus

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)91
  • Downloads (Last 6 weeks)15
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Semantically-Guided Goal-Sensitive Reasoning: Decision Procedures and the Koala ProverJournal of Automated Reasoning10.1007/s10817-022-09656-w67:1Online publication date: 11-Jan-2023
  • (2023)Correct and Efficient Policy Monitoring, a RetrospectiveAutomated Technology for Verification and Analysis10.1007/978-3-031-45329-8_1(3-30)Online publication date: 24-Oct-2023
  • (2023)Range-Restricted and Horn Interpolation through Clausal TableauxAutomated Reasoning with Analytic Tableaux and Related Methods10.1007/978-3-031-43513-3_1(3-23)Online publication date: 18-Sep-2023
  • (2022)Relaxing Safety for Metric First-Order Temporal Logic via Dynamic Free VariablesRuntime Verification10.1007/978-3-031-17196-3_3(45-66)Online publication date: 28-Sep-2022
  • (2021)Craig Interpolation with Clausal First-Order TableauxJournal of Automated Reasoning10.1007/s10817-021-09590-365:5(647-690)Online publication date: 1-Jun-2021
  • (2020)Bounded Evaluation: Querying Big Data with Bounded ResourcesInternational Journal of Automation and Computing10.1007/s11633-020-1236-117:4(502-526)Online publication date: 1-Aug-2020
  • (2018)Bounded Query Rewriting Using ViewsACM Transactions on Database Systems10.1145/318367343:1(1-46)Online publication date: 23-Mar-2018
  • (2018)Safety and Domain IndependenceEncyclopedia of Database Systems10.1007/978-1-4614-8265-9_1255(3269-3273)Online publication date: 7-Dec-2018
  • (2016)Bounded Query Rewriting Using ViewsProceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/2902251.2902294(107-119)Online publication date: 15-Jun-2016
  • (2016)An Effective Syntax for Bounded Relational QueriesProceedings of the 2016 International Conference on Management of Data10.1145/2882903.2882942(599-614)Online publication date: 26-Jun-2016
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media