Explaining Wrong Queries Using Small Examples

Explaining Wrong Queries Using Small Examples
复制标题

使用小例子解释错误的查询

DOI:
10.1145/3299869.3319866
复制
发表时间:
2019
期刊:
SIGMOD '19: Proceedings of the 2019 International Conference on Management of Data
影响因子:
--
通讯作者:
Yang, Jun
Yang, Jun
中科院分区:
--
文献类型:
--
作者:
Miao, Zhengjie;Roy, Sudeepa;Yang, Jun

文献摘要

参考文献

被引文献

相似文献

为了测试SQL查询的正确性,标准的做法是在一些测试数据库实例上执行有问题的查询,并将其结果与正确查询的结果进行比较。给定两个查询和,我们说一个数据库实例D是一个反例(for and),如果不同于;这样的反例可以解释为什么和不等价。虽然测试数据库实例可以作为一个反例,但它可能太大或太复杂,以至于无法理解不等价的地方。因此,在本文中,给定一个已知的反例D,我们的目标是找到最小的反例其中。这个问题一般是NP难的。从起源和约束求解绘图技术,我们开发了一套算法,为不同类别的查询,包括那些涉及否定和聚合找到小的反例。我们评估我们的算法的有效性和可扩展性,从本科数据库课程的学生查询,并从TPC-H基准查询。我们还报告了一个用户研究,从课程中,我们部署了我们的工具,以帮助学生的关系代数作业。
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
ProvSQL:PostgreSQL 中的来源和概率管理
DOI: --
发表时间: 2018
影响因子: 2.5
作者:
P. Senellart;Louis Jachiet;Silviu Maniu;Yann Ramusat
通讯作者: Yann Ramusat
Qex:符号 SQL 查询浏览器
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