Skip to main content

A Natural Language Understanding Sequential Model for Generating Queries with Multiple SQL Commands

  • Conference paper
  • First Online:
Intelligent Sustainable Systems (WorldS4 2023)

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 812))

Included in the following conference series:

  • 146 Accesses

Abstract

With the increasing amount of textual data and the growing demand for data-driven decision-making, automated SQL generation systems have gained significant attention in recent years. This paper presents GenSQL, a novel natural language sequential model for generating queries with multiple SQL commands. GenSQL is designed to simplify the query writing process for individuals who do not have advanced SQL knowledge, by allowing them to generate queries through natural language input. GenSQL consists of a template-based approach to handle various SQL commands and their respective parameters. Experimental results show that GenSQL achieves high accuracy in generating multi-command queries, outperforming other state-of-the-art models. The system has the potential to improve query generation efficiency, reduce errors, and improve accessibility for users who are not SQL specialists. The preliminary results show that the system has a 91.80% chance of producing accurate results. Ultimately, the goal of natural language text to SQL generation is to enable users to query databases more efficiently and accurately and to reduce the need for specialized skills in writing SQL queries.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 149.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 199.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Kate A, Kamble S, Bodkhe A, Joshi M (2018) Conversion of natural language query to SQL query. In: Proceedings of the 2nd international conference on electronics, communication and aerospace technology, ICECA 2018, pp 488–491. https://doi.org/10.1109/ICECA.2018.8474639

  2. Sanyal H, Shukla S, Agrawal R (2021) Natural language processing technique for generation of SQL queries dynamically. In: 2021 6th international conference for convergence in technology, I2CT 2021. https://doi.org/10.1109/I2CT51068.2021.9418091

  3. Khurana D, Koli A, Khatter K, Singh S (2022) Natural language processing: state of the art, current trends and challenges. Multimed Tools Appl 1–32.https://doi.org/10.1007/S11042-022-13428-4/FIGURES/3

  4. Von Däniken P, Deriu J, Agirre E et al (2022) Improving NL-to-query systems through re-ranking of semantic hypothesis

    Google Scholar 

  5. Wong A, Joiner D, Chiu C et al (2021) A survey of natural language processing implementation for data query systems. In: RASSE 2021 of IEEE international conference on recent advances in systems science and engineering, proceedings. https://doi.org/10.1109/RASSE53195.2021.9686815

  6. Arefin M, Hossen KM, Uddin MN (2021) Natural language query to SQL conversion using machine learning approach. In: 2021 3rd international conference on sustainable technologies for industry 40, STI 2021. https://doi.org/10.1109/STI53101.2021.9732586

  7. Baik C, Jagadish HV, Li Y (2019) Bridging the semantic gap with SQL query logs in natural language interfaces to databases. In: Proceedings of international conference on data engineering, April 2019, pp 374–385. https://doi.org/10.1109/ICDE.2019.00041

  8. Xu X, Liu C, Song D (2017) SQLNet: generating structured queries from natural language without reinforcement learning

    Google Scholar 

  9. Yu T, Zhang R, Yang Er H et al (2019) CoSQL: a conversational Text-to-SQL challenge towards cross-domain natural language interfaces to databases

    Google Scholar 

  10. Guo T, Gao H Using database rule for weak supervised Text-to-SQL generation

    Google Scholar 

  11. Li N, Keller B, Cer D, Butler M (2020) SeqGenSQL—a robust sequence generation model for structured query language

    Google Scholar 

  12. Ni P, Okhrati R, Guan S, Chang V (2022) Knowledge graph and deep learning-based Text-to-GQL model for intelligent medical consultation Chatbot. Inf Syst Front 1:1–20. https://doi.org/10.1007/S10796-022-10295-0/FIGURES/13

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tharushi C. Sonnadara .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sonnadara, T.C., Priyadarshana, Y.H.P.P. (2024). A Natural Language Understanding Sequential Model for Generating Queries with Multiple SQL Commands. In: Nagar, A.K., Jat, D.S., Mishra, D., Joshi, A. (eds) Intelligent Sustainable Systems. WorldS4 2023. Lecture Notes in Networks and Systems, vol 812. Springer, Singapore. https://doi.org/10.1007/978-981-99-8031-4_12

Download citation

Publish with us

Policies and ethics