Computer science educators seek to understand the types of mistakes that students make when learning a new (programming) language so that they can help students avoid those mistakes in the future. While educators know what mistakes students regularly make in languages such as C and Python, students struggle with SQL and regularly make mistakes when working with it. We present an analysis of mistakes that students made when first working with SQL, classify the types of errors introduced, and provide suggestions on how to avoid them going forward. In addition, we present an automated tool, SQLRepair, that is capable of repairing errors introduced by undergraduate programmers when writing SQL queries. Our results show that students find repairs produced by our tool comparable in understandability to queries written by themselves or by other students, suggesting that SQL repair tools may be useful in an educational context. We also provide to the community a benchmark of SQL queries written by the students in our study that we used for evaluation of SQLRepair.
翻译:教育者知道学生经常用C和Python等语言犯什么错误,但学生在与SQL打交道时经常犯什么错误。我们分析了学生在最初与SQL合作时犯的错误,对引入的错误类型进行了分类,并就如何避免发生错误提出了建议。此外,我们还提出了一个自动化工具SQLreepair,它能够修复本科编程员在撰写SQL查询时引入的错误。我们的结果显示,学生发现,用我们的工具进行的修理可以与自己或其他学生的询问相仿,表明SQL修理工具在教育方面可能有用。我们还向社区提供了学生在我们用于评估SQLepair的研究中写出SQL查询的基准。