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

Abstract : 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.
Liste complète des métadonnées

https://hal.archives-ouvertes.fr/hal-01487062
Contributeur : Evelyne Contejean <>
Soumis le : vendredi 10 mars 2017 - 18:24:49
Dernière modification le : mardi 24 avril 2018 - 13:53:59
Document(s) archivé(s) le : dimanche 11 juin 2017 - 17:18:16

Fichier

main.pdf
Fichiers produits par l'(les) auteur(s)

Licence


Copyright (Tous droits réservés)

Identifiants

  • HAL Id : hal-01487062, version 1

Citation

Véronique Benzaken, Evelyne Contejean. SQLCert: Coq mechanisation of SQL's compilation: Formally reconciling SQL and (relational) algebra. 2016. 〈hal-01487062〉

Partager

Métriques

Consultations de la notice

323

Téléchargements de fichiers

248