Skip to Main content Skip to Navigation
Journal articles

SQL query extensions for imprecise questions

Marie Le Guilly 1 Jean-Marc Petit 1 Vasile-Marian Scuturici 1
1 BD - Base de Données
LIRIS - Laboratoire d'InfoRmatique en Image et Systèmes d'information
Abstract : Within the big data tsunami, relational databases and SQL remain inescapable in most cases for accessing data. If SQL is easy-to-use and has proved its robustness over the years, it is not always easy to formulate SQL queries as it is more and more frequent to have databases with hundreds of tables and/or attributes. Identifying the pertinent conditions to select the desired data, or even the relevant attributes, is not trivial, especially when the user only has an imprecise question in mind, and is not sure of how to translate its conditions directly into SQL.To make it easier to write SQL queries when the initial question is imprecise, we propose SQL query extensions: given a query, it suggests several possible additional selection clauses, to complete the Where clause of the query, as a form of SQL query semantic autocompletion. This is helpful for both understanding the initial query’s results, and refining the query to reach the desired tuples. The process is iterative, as a query constructed using an extension can also be completed. It is also adaptable, as the number of extensions to compute is flexible. A prototype has been implemented in a SQL editor on top of a database management system, and two types of evaluation are proposed. A first one looks at the scaling of the system with a large number of tuples. Then a user study examines two questions: does the extension tool speed up the writing of SQL queries? And is it easily adopted by users? A thorough experiment was conducted on a group of 70 computer science students divided in two groups (one with the extension tool and the other one without) to answer those questions. In the end, the results showed a faster answering time for students that could use the extensions: 32 min on average to complete the test for the group with extensions, against 48 min for the others.
Document type :
Journal articles
Complete list of metadata
Contributor : Marie Le Guilly Connect in order to contact the contributor
Submitted on : Friday, November 5, 2021 - 2:24:48 PM
Last modification on : Tuesday, November 9, 2021 - 4:05:16 AM


Files produced by the author(s)



Marie Le Guilly, Jean-Marc Petit, Vasile-Marian Scuturici. SQL query extensions for imprecise questions. Data and Knowledge Engineering, Elsevier, 2021, pp.101944. ⟨10.1016/j.datak.2021.101944⟩. ⟨hal-03417003⟩



Les métriques sont temporairement indisponibles