G-SQL: A Schema-Aware and Rule-Guided Approach for Robust Natural Language to SQL Translation

2Citations
Citations of this article
18Readers
Mendeley users who have this article in their library.
Get full text

Abstract

This paper introduces G-SQL, a schema-aware and rule-guided framework for translating Natural Language Queries (NLQ) into SQL, designed to support users with limited technical expertise. G-SQL bridges the limitations of traditional rule-based and deep learning approaches by combining JSON-based schema serialization with Natural Language Processing (NLP) tools, such as GloVe and Stanford CoreNLP. The system encodes database schemas—including tables, columns, keys, and relationships—into a structured JSON format, enabling efficient and interpretable mapping between query tokens and schema elements. SQL statements are generated using a guided template-driven strategy. Evaluated across three benchmark datasets (IMDB, Yelp, MAS), For easy queries, it achieved 100% execution accuracy on all three datasets. On medium queries, G-SQL reached 95% on IMDB, 85% on Yelp, and 90% on MAS. For hard queries, the accuracy was 78% on IMDB, 65% on Yelp, and 72% on MAS. Finally, on extra-hard queries, G-SQL achieved 55% on IMDB, 45% on Yelp, and 50% on MAS., demonstrating robust performance across varying query complexities.

Cite

CITATION STYLE

APA

Shalaan, H. S., Soliman, T. H. A., & AbdelAziz, A. M. (2025). G-SQL: A Schema-Aware and Rule-Guided Approach for Robust Natural Language to SQL Translation. IEEE Access, 13, 158520–158534. https://doi.org/10.1109/ACCESS.2025.3607879

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free