This post is a brief summary about the paper that I read for my study and curiosity, so I shortly arrange the content of the paper, titled Recent Advances in Text-to-SQL: A Survey of What We Have and What We expect (Deng et al., Coling 2022), that I read and studied.

Text2SQL has attracted attention from both natural language processing and database communities. That is beacuase the ability to convert the semantics in natural language into SQL queries. There are three challenges on Text2SQL: 1) extracting the meaning of natural utterance (encoding); 2) transforming the extracted meaning into another expression which is pragmatically equivalent to the NL meaning (translating); and 3) producing the corresponding SQL queries (decoding).

Text-to-SQL is to convert natural utterance into SQL queries as in the following figure 1. As you can see the figure 1, given a user utterance “What are the major cities in the state of Kansas?”, the system outputs a corresponding SQL that can be used for retrieving the answer from a database.

In the paper, they summarized the recent progress on text-to-SQL, from 1) datasets and 2) methods to 3) evaluation.

Deng et al., Coling 2022

As shown in Table 1, existing text2SQL datasets can be calssified into three categories: 1) single domain dataset, 2) cross-domain, and others.

Deng et al., Coling 2022

In the case of method for Text2SQL parsing, they divide the methods employed in text-to-SQL research into 1) Data Augmentation, 2) Ecoding, 3) Decoding, 4) Learnig Techniques, and 5) Miscellanenous.

The following is the typical methods used for encoding in the Text2SQL.

They group encoding methods into five categories as shown in Table 2.

  • Ecnode Type Method indicates that a token in the quesion mapping a type embedding to recognize entities and nubers in questions.
  • Graph-based Method utilizes the rich structural information of database schemas with graph neural network.
  • Self-attention indicates attention technique to be aware of a certain of information.
  • Adpat PLM indicates leveraging the knowledge in pre-trained language models (PLMs) to better align PLM with the text-to-SQL task.
  • Pre-training propose different pre-training objectives for Text2SQL task.

Deng et al., Coling 2022

The following is typical mtehods used for decoding in text-to-SQL.

Deng et al., Coling 2022

The following is the summary of metrics, datasets that use these metrics, and their potentional error cases.

Deng et al., Coling 2022

For detailed experiment and explanation, refer to the paper, titled Recent Advances in Text-to-SQL: A Survey of What We Have and What We expect (Deng et al., Coling 2022)