Supercharge Your Innovation With Domain-Expert AI Agents!

SQL (Structured Query Language) statement syntax migration method and system between databases

A statement syntax and database technology, applied in the field of database processing, can solve the problems of reducing the maintainability of migration tools, restricting the scalability of the database, and restricting the scalability, so as to facilitate maintenance and expansion, improve scalability, and improve scalability. Effect

Pending Publication Date: 2021-05-07
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF0 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since each statement that needs to be migrated requires a separate process, the cost of developing this part of the code, especially the syntax migration between multiple databases, is too expensive and limits scalability
When the syntax of the migrated database changes, the syntax migration code needs to be refactored, which greatly reduces the maintainability of the migration tool
On the other hand, when a new database syntax migration is required, the above work needs to be done again, which limits the scalability of the database afterwards

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • SQL (Structured Query Language) statement syntax migration method and system between databases
  • SQL (Structured Query Language) statement syntax migration method and system between databases
  • SQL (Structured Query Language) statement syntax migration method and system between databases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] A method for migrating SQL statement syntax between databases, the specific steps of the method comprising:

[0033] S1 performs grammatical analysis on the sql statement to generate an abstract syntax tree;

[0034] S2 extracts the rules for reconstructing the abstract syntax tree;

[0035] S3 writes rules to automatically generate tree structure conversion code;

[0036] S4 calls the generated code to convert SQL statements between different databases;

[0037] When the method of the present invention is used, the rules for reconstructing the abstract syntax tree produced by the grammatical analysis of the sql statement are extracted abstractly, and the rules are automatically generated to convert the code of the tree structure, and the grammatical conversion work of different database statements can be directly completed by calling the generated code. ;

[0038] Further, the specific steps of extracting the rules for reconstructing the abstract syntax tree in the ...

Embodiment 2

[0048] A SQL statement syntax migration system between databases, the system specifically includes a syntax analysis module, a rule extraction module, a code writing module and a statement conversion module:

[0049] Grammatical analysis module: perform grammatical analysis on sql statements to generate an abstract syntax tree;

[0050] Rule extraction module: extract the rules for reconstructing the abstract syntax tree;

[0051] Code writing module: write rules to automatically generate tree structure conversion code;

[0052] Statement conversion module: call generated code to convert SQL statements between different databases.

[0053] Further, the rule extraction module specifically includes a first extraction module and a second extraction module:

[0054] The first extraction module: extract the transformation rules of the abstract syntax tree to obtain the basic rules of tree structure transformation;

[0055] The second extraction module: write the rules for tree s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an SQL statement syntax migration method and system between databases, and belongs to the field of database processing. The method comprises the following specific steps: S1, performing syntactic analysis on an sql statement to generate an abstract syntax tree; S2, extracting a rule for reconstructing the abstract syntax tree; s3, compiling a code converted by a regular automatic spanning tree structure; and S4, calling the generated codes to convert sql statements among different databases. Different parts of two kinds of database grammar often need to be independently processed in a traditional mode, code development is manually carried out, the method used in the method is converted into extraction of tree structure conversion rules and automatic generation of tree structure conversion codes, the development mode is simpler and more convenient, and the production cost can be reduced.

Description

technical field [0001] The invention discloses a SQL statement syntax migration method and system between databases, and relates to the technical field of database processing. Background technique [0002] The Sql language is a language for database query. At present, the SQL language has an international standard and has become the nominal and actual standard for defining and operating relational databases. However, different database vendors have different implementations of the SQL standard. At the same time, different vendors will also implement some convenient and complex functions that the SQL standard does not support. When users change database products, they often need to pay a large learning cost, which promotes the generation of grammar migration tools. [0003] Essentially, the abstract syntax trees generated by all Sql statements after grammatical analysis should be similar or similar. The development of traditional migration tools needs to process and analyze...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/2453G06F16/28G06F40/154
CPCG06F16/284G06F16/24534G06F40/154
Inventor 樊鑫源蒋家超颜亮
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More