Affiliation:
1. Duke University, Durham, NC, USA
2. Hebrew University, Jerusalem, Israel
Abstract
We describe a system called Qr-Hint that, given a (correct) target query Q* and a (wrong) working query Q, both expressed in SQL, provides actionable hints for the user to fix the working query so that it becomes semantically equivalent to the target. It is particularly useful in an educational setting, where novices can receive help from Qr-Hint without requiring extensive personal tutoring. Since there are many different ways to write a correct query, we do not want to base our hints completely on how Q* is written; instead, starting with the user's own working query, Qr-Hint purposefully guides the user through a sequence of steps that provably lead to a correct query, which will be equivalent to Q* but may still "look" quite different from it. Ideally, we would like Qr-Hint's hints to lead to the "smallest" possible corrections to Q. However, optimality is not always achievable in this case due to some foundational hurdles such as the undecidability of SQL query equivalence and the complexity of logic minimization. Nonetheless, by carefully decomposing and formulating the problems and developing principled solutions, we are able to provide provably correct and locally optimal hints through Qr-Hint. We show the effectiveness of Qr-Hint through quality and performance experiments as well as a user study in an educational setting.
Publisher
Association for Computing Machinery (ACM)
Reference56 articles.
1. Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of databases: the logical level. Addison-Wesley Longman Publishing Co., Inc.
2. Students' Semantic Mistakes in Writing Seven Different Types of SQL Queries
3. Umair Z. Ahmed, Zhiyu Fan, Jooyong Yi, Omar I. Al-Bataineh, and Abhik Roychoudhury. 2022. Verifix: Verified Repair of Programming Assignments. , Vol. 31, 4, Article 74 (jul 2022), bibinfonumpages31 pages.
4. Equivalences among Relational Expressions
5. Marcelo Arenas Pablo Barceló Leonid Libkin Wim Martens and Andreas Pieris. 2022. Database Theory. Open source at https://github.com/pdm-book/community.
Cited by
1 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. What Teaching Databases Taught Us about Researching Databases: Extended Talk Abstract;Proceedings of the 3rd International Workshop on Data Systems Education: Bridging education practice with education research;2024-06-09