Detecting measurement issues in SQL arithmetic expressions and aggregations

作者:

Highlights:

摘要

Research on user errors in retrieving information from SQL databases has focused on erroneous syntax in the query language and erroneous semantics concerning the data model. In the present paper, we investigate a third source of error, namely erroneous aggregations that break the limitations imposed by the numerical properties of the data. An erroneous aggregation might arise because of the SQL programmer’s misunderstanding concerning those numerical properties, or because of a simple mistake. We show that for database queries in the SQL language, significant classes of erroneous aggregations can be detected by non-intrusive, off-line checking, using only a simple set of metadata rules that can be supplied by the data provider. We have implemented software that performs static checks on users’ SQL queries, looking for evidence of misunderstandings concerning the measurement properties of the numerical data.

论文关键词:SQL,Measurement scale and unit,Aggregation,Summarizability

论文评审过程:Received 17 December 2017, Revised 26 October 2018, Accepted 2 June 2019, Available online 4 June 2019, Version of Record 25 July 2019.

论文官网地址:https://doi.org/10.1016/j.datak.2019.06.001