Explaining Wrong Queries Using Small Examples
Explaining Wrong Queries Using Small Examples
复制标题
使用小例子解释错误的查询
DOI:
10.1145/3299869.3319866
复制
发表时间:
2019
期刊:
影响因子:
--
通讯作者:
Yang, Jun
中科院分区:
文献类型:
--
作者:
Miao, Zhengjie;Roy, Sudeepa;Yang, Jun
For testing the correctness of SQL queries, a standard practice is to execute the query in question on some test database instance and compare its result with that of the correct query. Given two queriesand, we say that a database instance D is a counterexample (forand) ifdiffers from; such a counterexample can serve as an explanation of whyandare not equivalent. While the test database instance may serve as a counterexample, it may be too large or complex to understand where the inequivalence arises. Therefore, in this paper, given a known counterexample D forand, we aim to find the smallest counterexamplewhere. The problem in general is NP-hard. Drawing techniques from provenance and constraint solving, we develop a suite of algorithms for finding small counterexamples for different classes of queries, including those involving negation and aggregation. We evaluate the effectiveness and scalability of our algorithms on student queries from an undergraduate database course, and on queries from the TPC-H benchmark. We also report a user study from the course where we deployed our tool to help students with an assignment on relational algebra.
登录
查看更多内容
DOI:
--
发表时间:
2011
期刊:
Workshop on the Theory and Practice of Provenance
影响因子:
--
作者:
Yael Amsterdamer;Daniel Deutch;V. Tannen
通讯作者:
V. Tannen
DOI:
--
发表时间:
2010
期刊:
TOCT
影响因子:
--
作者:
Stefan Kratsch;D. Marx;Magnus Wahlström
通讯作者:
Magnus Wahlström
影响因子:
2.5
作者:
P. Senellart;Louis Jachiet;Silviu Maniu;Yann Ramusat
通讯作者:
Yann Ramusat
DOI:
--
发表时间:
2010
期刊:
Logic Programming and Automated Reasoning
影响因子:
--
作者:
Margus Veanes;N. Tillmann;J. D. Halleux
通讯作者:
J. D. Halleux
DOI:
--
发表时间:
2015
期刊:
CHI Extended Abstracts
影响因子:
--
作者:
Lilong Jiang;Arnab Nandi
通讯作者:
Arnab Nandi