Db-text-to-sql for different sq1 grammar of different databases
The invention relates to the technical field of databases, in particular to a method for different sql grammar db-text-to-sql for different databases, which comprises the following steps: S1, connecting databases, and loading templates and pre-training sql of the databases according to database type...
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention relates to the technical field of databases, in particular to a method for different sql grammar db-text-to-sql for different databases, which comprises the following steps: S1, connecting databases, and loading templates and pre-training sql of the databases according to database types; s2, traversing table establishment statements of all tables in the data source database and the database; s3, initializing the model, and finely adjusting the model; s4, judging whether the sql is of a query type or not; s5, recording in a pre-training sql library; and S6, if judging that the sql is not the query type, outputting the sql. And the data query efficiency is improved.
本发明涉及数据库技术领域,尤其涉及一种针对不同数据库不同sq1语法db-text-to-sql,包括,S1,连接数据库,根据数据库类型进行加载模板和数据库预训练sql;S2,遍历数据源数据库和数据库中的所有表的建表语句;S3,初始化模型,对模型进行微调;S4,判断sql是否是查询类型的;S5,记录到预训练sql库中;S6,若判断sql不是查询类型原样输出sql。提高了数据查询效率。 |
---|