A Coq mechanised formal semantics for realistic SQL queries - formally reconciling SQL and bag relational algebra.

CPP '19: 8th ACM SIGPLAN International Conference on Certified Programs and Proofs Cascais Portugal January, 2019(2019)

引用 10|浏览26
暂无评分
摘要
In 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 correlated sub-queries. Relying on the Coq extraction mechanism to Ocaml, we further produce a Coq certified semantic analyser for a SQL compiler. We then relate this fragment to a Coq formalised (extended) relational algebra that enjoys a bag semantics hence recovering all well-known algebraic equivalences upon which are based most of compilation optimisations. By doing so, we provide the first formally mechanised proof of the equivalence of SQL and extended relational algebra.
更多
查看译文
关键词
SQL, Formal Semantics, Coq
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要