Abstract
This note presents a translation of a subset of the relational query language SQL into the well known tuple calculus. Roughly speaking, tuple calculus corresponds to first order predicate calculus. The SQL subset is relationally complete and represents a “relational core” of the language. Nevertheless, our translation is simple and elegant. Therefore it is especially well suited as a beginners course into the principles of a formal definition of SQL.
- [Bü 87] G. von Bültzingsloewen: Translating and Optimizing SQL Queries Having Aggregates. Proc. 13th VLDB, Saratoga Press, 1987. Google ScholarDigital Library
- [CG 85] S. Ceri, G. Gottlob: Translating SQL Into Relational Algebra: Optimization, Semantics, and Equivalence of SQL Queries. IEEE Trans. on SE, Vol. SE-11, No. 4, 1985. Google ScholarDigital Library
- [Da 87] C. J. Date: A Guide to the SQL Standard. Addison-Wesley, Reading. 1987. Google ScholarDigital Library
- [Go 87] M. Gogolla: Begleitmaterial zur Vorlesung Datenbanksysteme. TU Braunschweig, Wintersemester 87/88, 1987.Google Scholar
- [Ma 83] D. Maier: The Theory of Databases. Computer Science Press, Rockville. 1983.Google Scholar
- [PBGG 89] J. Paredaens, P. de Bra, M. Gyssens, D. van Gucht: The Structure of the Relational Database Model. EATCS Monographs on Theoretical Computer Science No. 17, Springer Verlag, Berlin, 1989. Google ScholarDigital Library
Index Terms
- A note on the translation of SQL to tuple calculus
Recommendations
A Coq mechanised formal semantics for realistic SQL queries: formally reconciling SQL and bag relational algebra
CPP 2019: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and ProofsIn this article, we provide a Coq mechanised, executable, formal semantics for a realistic fragment of SQL consisting of "select [distinct] from where group by having" queries with null values, functions, aggregates, quantifiers and nested potentially ...
Comparing NoSQL MongoDB to an SQL DB
ACMSE '13: Proceedings of the 51st ACM Southeast ConferenceNoSQL database solutions are becoming more and more prevalent in a world currently dominated by SQL relational databases. NoSQL databases were designed to provide database solutions for large volumes of data that is not structured. However, the ...
SQL: From Traditional Databases to Big Data
SIGCSE '16: Proceedings of the 47th ACM Technical Symposium on Computing Science EducationThe Structured Query Language (SQL) is the main programing language designed to manage data stored in database systems. While SQL was initially used only with relational database management systems (RDBMS), its use has been significantly extended with ...
Comments