Enhancing Automatic Grading of SQL Query Assignments Using Generative AI: A Case Study on SPJ Query Assignment

Abstract: The grading of SQL query assignments is a time-consuming task for instructors, especially in large classes where ensuring both accuracy and consistency is difficult. In this paper, we develop and evaluate an automatic grading tool for SQL query design using generative AI. The system targets SPJ (Selection, Projection, Join) query tasks from the Information Systems Experiment course. By incorporating model answers, lecture materials, and common student errors into carefully designed prompts, the tool aimed to improve grading accuracy and the quality of feedback. Comparative experiments were conducted using different prompt configurations and an existing rubric-based tool developed by Ando et al. The results demonstrated that the optimized GPT-based prompt design achieved 96.8% accuracy (387 out of 400 items correctly graded) and provided detailed feedback specifying “what was wrong,” “why,” and “how to fix it.” This feedback was found to support student learning and reduce grading inconsistencies for instructors. The findings confirm the potential of GPT-based systems as effective complements to existing rubric-based methods. This research highlights the promise of generative AI in delivering scalable, fair, and pedagogically meaningful assessments in database education. Keywords: Generative AI, GPT, automatic grading, SQL query design, educational technology, prompt engineering

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-12-21
DOI
https://doi.org/10.5281/zenodo.18169051
Primary Topic
Intelligent Tutoring Systems and Adaptive Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Automatic Grading of SQL Query Assignments Using Generative AI: A Case Study on SPJ Query Assignment

Yosei Tsuboi and Tetsuro Kakeshita
Zenodo (CERN European Organization for Nuclear Research)
Intelligent Tutoring Systems and Adaptive Learning
article

Enhancing Automatic Grading of SQL Query Assignments Using Generative AI: A Case Study on SPJ Query Assignment

Yosei Tsuboi and Tetsuro Kakeshita
article en

Abstract

Abstract: The grading of SQL query assignments is a time-consuming task for instructors, especially in large classes where ensuring both accuracy and consistency is difficult. In this paper, we develop and evaluate an automatic grading tool for SQL query design using generative AI. The system targets SPJ (Selection, Projection, Join) query tasks from the Information Systems Experiment course. By incorporating model answers, lecture materials, and common student errors into carefully designed prompts, the tool aimed to improve grading accuracy and the quality of feedback. Comparative experiments were conducted using different prompt configurations and an existing rubric-based tool developed by Ando et al. The results demonstrated that the optimized GPT-based prompt design achieved 96.8% accuracy (387 out of 400 items correctly graded) and provided detailed feedback specifying “what was wrong,” “why,” and “how to fix it.” This feedback was found to support student learning and reduce grading inconsistencies for instructors. The findings confirm the potential of GPT-based systems as effective complements to existing rubric-based methods. This research highlights the promise of generative AI in delivering scalable, fair, and pedagogically meaningful assessments in database education. Keywords: Generative AI, GPT, automatic grading, SQL query design, educational technology, prompt engineering

Zenodo (CERN European Organization for Nuclear Research)
Quality Education
Openalex Percentile: Top 17%
Intelligent Tutoring Systems and Adaptive Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.