SQLCert: Coq mechanisation of SQL's compilation: Formally reconciling SQL and (relational) algebra - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2016

SQLCert: Coq mechanisation of SQL's compilation: Formally reconciling SQL and (relational) algebra

Résumé

SQL is the standard language for manipulating data stored in relational database systems. In theory, SQL is based on the relational data model. However, there is an important mismatch between the theoretical foundations and the corresponding standard specification, as SQL history spread over decades. Briefly, the disparities concern the treatment of relations: finite sets in theory, finite bags in practice, the treatment of attributes and the chosen corresponding algebra used to compile queries. We propose SQLCert, a Coq mechanisation of three, among four, central steps of SQL's compilation chain: the syntactic analysis, the semantics analysis and the logical optimisation steps. To this purpose, we propose SQLCoq a Gallina grammar and associated Coq-mechanised semantics accounting for the native fragment of SQL described in the ISO/IEC 2006 Final Committee draft. As SQL compilers' logical optimisation is based on algebraic rewritings, we also define ExtAlg a Coq-mechanised extended bag-set-algebra, deeply relate SQLCoq to it and prove, using Coq, most of the commonly used in practice (SQL's queries) rewritings, yielding strong guarantees for the optimiser. Doing so, we thus formally reconcile SQL and its theoretical algebraic counterpart and provide the first, to our knowledge, executable mechanisation proposal of a (realistic fragment of) SQL compiler.
Fichier principal
Vignette du fichier
main.pdf (481.39 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-01487062 , version 1 (10-03-2017)

Licence

Copyright (Tous droits réservés)

Identifiants

  • HAL Id : hal-01487062 , version 1

Citer

Véronique Benzaken, Evelyne Contejean. SQLCert: Coq mechanisation of SQL's compilation: Formally reconciling SQL and (relational) algebra. 2016. ⟨hal-01487062⟩
447 Consultations
587 Téléchargements

Partager

Gmail Facebook X LinkedIn More