Saved in:
Bibliographic Details
Main Authors: Köberlein, Leo, Probst, Dominik, Lenz, Richard
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2403.14441
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929749555675136
author Köberlein, Leo
Probst, Dominik
Lenz, Richard
author_facet Köberlein, Leo
Probst, Dominik
Lenz, Richard
contents Quantifying the semantic similarity between database queries is a critical challenge with broad applications, ranging from query log analysis to automated educational assessment of SQL skills. Traditional methods often rely solely on syntactic comparisons or are limited to checking for semantic equivalence. This paper introduces a novel graph-based approach to measure the semantic dissimilarity between SQL queries. Queries are represented as nodes in an implicit graph, while the transitions between nodes are called edits, which are weighted by semantic dissimilarity. We employ shortest path algorithms to identify the lowest-cost edit sequence between two given queries, thereby defining a quantifiable measure of semantic distance. A prototype implementation of this technique has been evaluated through an empirical study, which strongly suggests that our method provides more accurate and comprehensible grading compared to existing techniques. Moreover, the results indicate that our approach comes close to the quality of manual grading, making it a robust tool for diverse database query comparison tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2403_14441
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Quantifying Semantic Query Similarity for Automated Linear SQL Grading: A Graph-based Approach
Köberlein, Leo
Probst, Dominik
Lenz, Richard
Databases
Quantifying the semantic similarity between database queries is a critical challenge with broad applications, ranging from query log analysis to automated educational assessment of SQL skills. Traditional methods often rely solely on syntactic comparisons or are limited to checking for semantic equivalence. This paper introduces a novel graph-based approach to measure the semantic dissimilarity between SQL queries. Queries are represented as nodes in an implicit graph, while the transitions between nodes are called edits, which are weighted by semantic dissimilarity. We employ shortest path algorithms to identify the lowest-cost edit sequence between two given queries, thereby defining a quantifiable measure of semantic distance. A prototype implementation of this technique has been evaluated through an empirical study, which strongly suggests that our method provides more accurate and comprehensible grading compared to existing techniques. Moreover, the results indicate that our approach comes close to the quality of manual grading, making it a robust tool for diverse database query comparison tasks.
title Quantifying Semantic Query Similarity for Automated Linear SQL Grading: A Graph-based Approach
topic Databases
url https://arxiv.org/abs/2403.14441