Formal semantics of SQL queries
- 1 September 1991
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 16 (3) , 513-534
- https://doi.org/10.1145/111197.111212
Abstract
The semantics of SQL queries is formally defined by stating a set of rules that determine a syntax-driven translation of an SQL query to a formal model. The target model, called Extended Three Valued Predicate Calculus (E3VPC), is largely based on a set of well-known mathematical concepts. The rules which allow the transformation of a general E3VPC expression to a Canonical Form, which can be manipulated using traditional, two-valued predicate calculus are also given; in this way, problems like equivalence analysis of SQL queries are completely solved. Finally, the fact that reasoning about the equivalence of SQL queries using two-valued predicate calculus, without taking care of the real SQL semantics can lead to errors is shown, and the reasons for this are analyzed.Keywords
This publication has 18 references indexed in Scilit:
- Query Optimization in Database SystemsACM Computing Surveys, 1984
- On optimizing an SQL-like nested queryACM Transactions on Database Systems, 1982
- Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate FunctionsJournal of the ACM, 1982
- Equivalences Among Relational Expressions with the Union and Difference OperatorsJournal of the ACM, 1980
- Extending the database relational model to capture more meaningACM Transactions on Database Systems, 1979
- Efficient optimization of a class of relational expressionsACM Transactions on Database Systems, 1979
- On semantic issues connected with incomplete information databasesACM Transactions on Database Systems, 1979
- Null values in a relational data baseInformation Processing Letters, 1977
- Decomposition—a strategy for query processingACM Transactions on Database Systems, 1976
- Optimizing the performance of a relational algebra database interfaceCommunications of the ACM, 1975