{"title":"SQL ChatBot – using Context Free Grammar","authors":"Rajvardhan Patil, Sorio Boit, Nathaniel Bowman","doi":"10.1109/iemtronics55184.2022.9795814","DOIUrl":null,"url":null,"abstract":"In this work, we derive the semantics of a given English query and convert it into its equivalent SQL query. Instead of using neural networks for semantic analysis of English queries, we opt for a Context Free Grammar approach. Most neural-network-based systems can handle only one semantic at a time, whereas, because of the flexibility offered by our CFG approach, our system manages to handle simultaneous usage of conjunctive, disjunctive, and negative semantics. It also handles complex statements comprising of main as well as dependent clauses. In addition, the system also takes into account aggregate functions and constructs the required GROUP-BY and HAVING clauses. We describe how the system analyzes English queries by understanding the role that each part-of-speech has to play in constructing SQL queries. Numerous examples demonstrate the effectiveness of our approach where state-of-the-art techniques relying on deep learning algorithms fail to deliver.","PeriodicalId":442879,"journal":{"name":"2022 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS)","volume":"11 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/iemtronics55184.2022.9795814","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
In this work, we derive the semantics of a given English query and convert it into its equivalent SQL query. Instead of using neural networks for semantic analysis of English queries, we opt for a Context Free Grammar approach. Most neural-network-based systems can handle only one semantic at a time, whereas, because of the flexibility offered by our CFG approach, our system manages to handle simultaneous usage of conjunctive, disjunctive, and negative semantics. It also handles complex statements comprising of main as well as dependent clauses. In addition, the system also takes into account aggregate functions and constructs the required GROUP-BY and HAVING clauses. We describe how the system analyzes English queries by understanding the role that each part-of-speech has to play in constructing SQL queries. Numerous examples demonstrate the effectiveness of our approach where state-of-the-art techniques relying on deep learning algorithms fail to deliver.