Abstract:
We present LECQTER, a system for learning how to write sound conjunctive SQL
queries by example. The key novelty of LECQTER is its ability to construct for every
given conjunctive query Q without self-joins over every given database schema,
a database dbQ such that for every query Q'
in a large fragment of conjunctive
queries, Q and Q' produce matching answers on every database if and only if Q
and Q′ produce matching answers on dbQ. Since it is known that such construction
is impossible to achieve under set semantics, the key novelty relies on the use
of SQL’s bag semantics. LECQTER shows the answer to both the user query Q'
and the target query Q, such that users receive immediate feedback that either
their query is correct - and not just their query answer - or where their query
answer deviates from that of the target query. LECQTER can therefore automate
feedback and assessment in its primary application area of Massive Open Online
Courses. Everyone who requires basic SQL skills to match the demands of our
data-centric society can use LECQTER to confidently learn how to write sound
conjunctive queries under the semantics of the industry standard.