Discovering SQL Queries from Examples using Intelligent Algorithms
Denis Mayr Lima Martins, Gottfried Vossen, Fernando Buarque de Lima Neto · 2018
Formulating database queries in terms of SQL is often a challenge for journalists, business administrators, and the growing number of non-database experts that are required to access and explore data. To alleviate this problem, we proposed a Query By Example (QBE) approach powered by intelligent algorithms that discovers database queries from a few tuple examples provided by the user. We investigated the effectiveness of three algorithms, namely, Greedy Search, Genetic Programming, and CART decision trees in discovering queries in two distinct databases. To the best of our knowledge, no other research has focused on the comparative analysis of such algorithms in the context of QBE. Our results show that CART decision trees were capable of discovering the most accurate queries. However, CART tends to produce long queries, which may hinder user interpretation. Finally, we suggest that the use of Interactive Evolutionary Computational Intelligence may improve the quality of queries discovered by Genetic Programming and may naturally incorporate diverse user preferences in the discovery process.