The research on natural language to SQL (NL2SQL) has high application value. With the maturity of deep learning technology, increasingly more researchers have begun to apply deep learning technology to NL2SQL tasks. This study reviews the research status of NL2SQL in English and Chinese fields and summarizes the datasets and models published by year. Additionally, it compares the characteristics of the four major Chinese NL2SQL datasets and expounds on the basic framework of NL2SQL tasks based on deep learning and typical models for simple single-table problems and complex cross-table problems in Chinese NL2SQL fields. Finally, the commonly adopted model evaluation methods are introduced, and future research directions are put forward.
[1] Woods WA. Progress in natural language understanding: An application to lunar geology. Proceedings of the 1973 National Computer Conference and Exposition. New York: ACM, 1973. 441–450.
[2] Sacerdoti ED. Language access to distributed data with error recovery. Proceedings of the 5th International Joint Conference on Artificial Intelligence. Cambridge: Morgan Kaufmann Publishers Inc., 1977. 196–202.
[3] Warren DHD, Pereira FCN. An efficient easily adaptable system for interpreting natural language queries. Computational Linguistics, 1982, 8(3–4): 110–122.
[4] Popescu AM, Etzioni O, Kautz H. Towards a theory of natural language interfaces to databases. Proceedings of the 8th International Conference on Intelligent User Interfaces. Miami: ACM, 2003. 149–157.
[5] Price PJ. Evaluation of spoken language systems: The ATIS domain. Proceedings of the 1990 Workshop on Speech and Natural Language. Stroudsburg: ACL, 1990. 91–95.
[6] Tang LR, Mooney RJ. Using multiple clause constructors in inductive logic programming for semantic parsing. Proceedings of the 12th European Conference on Machine Learning. Freiburg: Springer, 2001. 466–477.
[7] Iyer S, Konstas I, Cheung A, et al. Learning a neural semantic parser from user feedback. Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Vancouver: ACL, 2017. 963–973.
[8] Li F, Jagadish HV. Constructing an interactive natural language interface for relational databases. Proceedings of the VLDB Endowment, 2014, 8(1): 73–84.
[9] Zhong V, Xiong CM, Socher R. Seq2SQL: Generating structured queries from natural language using reinforcement learning. arXiv:1709.00103, 2017.
[10] Xu XJ, Liu C, Song D. SQLNet: Generating structured queries from natural language without reinforcement learning. arXiv:1711.04436, 2017.
[11] Yu T, Li ZF, Zhang ZL, et al. TypeSQL: Knowledge-based type-aware neural text-to-SQL generation. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. New Orleans: ACL, 2018. 588–594.
[12] Sun YB, Tang DY, Duan N, et al. Semantic parsing with syntax- and table-aware SQL generation. Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics. Melbourne: ACL, 2018. 361–372.
[13] Dong L, Lapata M. Coarse-to-fine decoding for neural semantic parsing. Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics. Melbourne: ACL, 2018. 731–742.
[14] Shi TZ, Tatwawadi K, Chakrabarti K, et al. IncSQL: Training incremental text-to-SQL parsers with non-deterministic oracles. arXiv:1809.05054, 2018.
[15] Hwang W, Yim J, Park S, et al. A comprehensive exploration on WikiSQL with table-aware word contextualization. arXiv:1902.01069, 2019.
[16] He PC, Mao Y, Chakrabarti K, et al. X-SQL: Reinforce schema representation with context. arXiv:1908.08113, 2019.
[17] Lyu Q, Chakrabarti K, Hathi S, et al. Hybrid ranking network for text-to-SQL. arXiv:2008.04759, 2020.
[18] Xu K, Wang YB, Wang YL, et al. SeaD: End-to-end text-to-SQL generation with schema-aware denoising. Proceedings of the 2022 Findings of the Association for Computational Linguistics. Seattle: ACL, 2022. 1845–1853.
[19] Yu T, Zhang R, Yang K, et al. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Brussels: ACL, 2018. 3911–3921.
[20] Yu T, Yasunaga M, Yang K, et al. SyntaxSQLNet: Syntax tree networks for complex and cross-domain text-to-SQL task. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Brussels: ACL, 2018. 1653–1663.
[21] Lee D. Clause-wise and recursive decoding for complex and cross-domain text-to-SQL generation. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). Hong Kong: ACL, 2019. 6045–6051.
[22] Guo JQ, Zhan ZC, Gao Y, et al. Towards complex text-to-SQL in cross-domain database with intermediate representation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Florence: ACL, 2019. 4524–4535.
[23] Choi DH, Shin MC, Kim EG, et al. RYANSQL: Recursively applying sketch-based slot fillings for complex text-to-SQL in cross-domain databases. Computational Linguistics, 2021, 47(2): 309–332.
[24] Rubin O, Berant J. SmBoP: Semi-autoregressive bottom-up semantic parsing. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. ACL, 2020. 311–324.
[25] Lin XV, Socher R, Xiong CM. Bridging textual and tabular data for cross-domain text-to-SQL semantic parsing. Proceedings of the 2020 Findings of the Association for Computational Linguistics. ACL, 2020. 4870–4888.
[26] Xu P, Kumar D, Yang W, et al. Optimizing deeper Transformers on small datasets. arXiv:2012.15355, 2021.
[27] Bogin B, Gardner M, Berant J. Global reasoning over database structures for text-to-SQL parsing. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). Hong Kong: ACL, 2019. 3659–3664.
[28] Wang BL, Shin R, Liu XD, et al. RAT-SQL: Relation-aware schema encoding and linking for text-to-SQL parsers. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. ACL, 2019. 7567–7578.
[29] Chen Z, Chen L, Zhao YB, et al. ShadowGNN: Graph projection neural network for text-to-SQL parser. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. ACL, 2021. 5567–5577.
[30] Cao RS, Chen L, Chen Z, et al. LGESQL: Line graph enhanced text-to-SQL model with mixed local and non-local relations. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing. ACL, 2021. 2541–2555.
[31] Hui BY, Geng RY, Wang LH, et al. S2SQL: Injecting syntax to question-schema interaction graph encoder for text-to-SQL parsers. Proceedings of the 2022 Findings of the Association for Computational Linguistics. Dublin: ACL, 2022. 1254–1262.
[32] Tie J, Fan ZQ, Sun C, et al. INSL: Text2SQL generation based on inverse normalized schema linking. Proceedings of the 4th International Conference on Artificial Intelligence in China. Springer, 2023. 195–202.
[33] Yu T, Zhang R, Yasunaga M, et al. SParC: Cross-domain semantic parsing in context. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Florence: ACL, 2019. 4511–4523.
[34] Yu T, Zhang R, Er HY, et al. CoSQL: A conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing. Hong Kong: ACL, 2019. 1962–1979.
[35] Zhang R, Yu T, Er HY, et al. Editing-based SQL query generation for cross-domain context-dependent questions. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). Hong Kong: ACL, 2019. 5338–5349.
[36] Kelkar A, Relan R, Bhardwaj V, et al. Bertrand-DR: Improving text-to-SQL using a discriminative re-ranker. arXiv:2002.00557, 2020.
[37] Zheng YZ, Wang HB, Dong BH, et al. HIE-SQL: History information enhanced network for context-dependent text-to-SQL semantic parsing. Proceedings of the 2022 Findings of the Association for Computational Linguistics. Dublin: ACL, 2022. 2997–3007.
[38] Dou LX, Gao Y, Pan MY, et al. UniSAr: A unified structure-aware autoregressive language model for text-to-SQL. arXiv:2203.07781, 2022.
[39] Qi JX, Tang JY, He ZW, et al. RASAT: Integrating relational structures into pretrained Seq2Seq model for text-to-SQL. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing. Abu Dhabi: ACL, 2022. 3215–3229.
[40] Xiao DL, Chai LZ, Zhang QW, et al. CQR-SQL: Conversational question reformulation enhanced context-dependent text-to-SQL parsers. Proceedings of the 2022 Findings of the Association for Computational Linguistics. Abu Dhabi: ACL, 2022. 2055–2068.
[41] Pourreza M, Rafiei D. DIN-SQL: Decomposed in-context learning of text-to-SQL with self-correction. arXiv:2304.11015, 2023.
[42] Sun RX, Arik SO, Nakhost H, et al. SQL-PaLM: Improved large language model adaptation for text-to-SQL. arXiv:2306.00739, 2023.
[45] Shen R, Sun G, Shen H, et al. SPSQL: Step-by-step parsing based framework for text-to-SQL generation. arXiv:2305.11061, 2023.
[46] Min QK, Shi YF, Zhang Y. A pilot study for Chinese SQL semantic parsing. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing. Hong Kong: ACL, 2019. 3652–3658.
[47] Sun NY, Yang XF, Liu YF. TableQA: A large-scale Chinese text-to-SQL dataset for table-aware SQL generation. arXiv:2006.06434, 2020.
[48] Zhang XY, Yin FJ, Ma GJ, et al. M-SQL: Multi-task representation learning for single-table Text2SQL generation. IEEE Access, 2020, 8: 43156–43167.
[49] Zhang XY, Yin FJ, Ma GJ, et al. F-SQL: Fuse table schema and table content for single-table Text2SQL generation. IEEE Access, 2020, 8: 136409–136420.
[50] Wang LJ, Zhang A, Wu K, et al. DuSQL: A large-scale and pragmatic Chinese text-to-SQL dataset. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing. ACL, 2020. 6923–6935.
[51] Guo JQ, Si ZL, Wang Y, et al. CHASE: A large-scale and pragmatic Chinese dataset for cross-database context-dependent text-to-SQL. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing. ACL, 2021. 2316–2331.