Formal semantics of SQL queries

  • Authors:
  • M. Negri;G. Pelagatti;L. Sbattella

  • Affiliations:
  • Univ. di Brescia, Brescia, Italy;Politecnico di Milano, Milan, Italy;Politecnico di Milano, Milan, Italy

  • Venue:
  • ACM Transactions on Database Systems (TODS)
  • Year:
  • 1991

Quantified Score

Hi-index 0.00

Visualization

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.