Example-Driven Query Construction


There is growing adoption of database systems, beyond the traditional enterprise context, for managing and querying data. For example, in the scientific community, the Sloan Digital Sky Survey (SDSS) Project provides online querying of a large repository of image-based data using SQL queries, and the SQLShare Project provides a cloud-based relational data sharing and analysis platform to facilitate scientists to query their data using SQL queries. However, writing SQL queries for such do-it-yourself data exploration remains a challenging task for non-expert database users. This project investigates an example-driven approach to help users, who might be unfamiliar with SQL, with query construction.

Our proposed approach does not require users to be familiar with SQL; instead, it only requires that the user is able to determine whether a given output table is the result of his or her intended query on a given input database. To kick-start the construction of a target query Q, the user first provides a pair of inputs: a sample database D and an output table R which is the result of Q on D. As there will be many candidate queries that transform D to R, our approach winnows this collection by presenting the user with new database-result pairs that distinguish these candidates. For users who are not familiar with SQL, our example-driven approach offers both an easy-to-use specification of their target queries (via a database-result pair) as well as a low-effort mode of user interaction (via feedback on modified database-result pairs).

Selected Publications

Acknowledgements

This project is supported in part by a Singapore Ministry of Education Tier 1 grant, MOE R-252-000-512-112.