Query Execution Plans and Semantic Errors: Usability and Educational Opportunities

Toni Taipalus

Abstract

Syntax errors are typically separated from semantic errors in query formulation, the former being detected by the database management system (DBMS), and the latter seemingly not. On the other hand, query execution plans are typically utilized in query optimization, and not interconnected with syntax errors, as a syntactically invalid query produces no execution plan. In this study, we show and argue for breaking the confound between execution plans and error messages for better query formulation usability and education. We show how several popular DBMSs detect semantic errors and complications in queries, yet often do not inform the user of such problems. This study is a demonstration of how decades old technology could be used more effectively in novel contexts of usability and software engineering education with little effort by showing query writers not merely syntax errors, but also semantic errors and complications detected by DBMSs.

Venue
CHI 2023
Volume
Extended Abstracts of the 2023 CHI Conference on Human Factors in Computing Systems
DOI
10.1145/3544549.3585794
PDF
https://dl.acm.org/doi/pdf/10.1145/3544549.3585794
Anthology ID
2023.chi-ea.482

Cite

@inproceedings{taipalus-2023-query,
    title = {{Query Execution Plans and Semantic Errors: Usability and Educational Opportunities}},
    author = {Toni Taipalus},
    booktitle = {Extended Abstracts of the 2023 CHI Conference on Human Factors in Computing Systems},
    isbn = {9781450394222},
    year = {2023},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3544549.3585794},
    url = {https://doi.org/10.1145/3544549.3585794},
    abstract = {Syntax errors are typically separated from semantic errors in query formulation, the former being detected by the database management system (DBMS), and the latter seemingly not. On the other hand, query execution plans are typically utilized in query optimization, and not interconnected with syntax errors, as a syntactically invalid query produces no execution plan. In this study, we show and argue for breaking the confound between execution plans and error messages for better query formulation usability and education. We show how several popular DBMSs detect semantic errors and complications in queries, yet often do not inform the user of such problems. This study is a demonstration of how decades old technology could be used more effectively in novel contexts of usability and software engineering education with little effort by showing query writers not merely syntax errors, but also semantic errors and complications detected by DBMSs.}
}