SQL analysis method and SQL analyzer

A parsing method and grammar technology, applied in the database field, can solve the problems of narrow scope of application, poor flexibility, fixed functions, etc., to achieve the effect of improving flexibility and scope of application

Inactive Publication Date: 2019-07-16
CHINA MOBILE GROUP ZHEJIANG +1
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Existing SQL parsers are generally highly coupled in large-scale projects, and a single type of database general specification is usually configured in large-scale projects. Therefore, existing SQL parsers usually only support SQL parsing for a single type of database. That is, the parsing function is aimed at a specific type of SQL statement
Moreover, the existing SQL parsers usually embed the lexical rule base, grammar rule base, abstract syntax tree parsing relationship, etc. required in the parsing of SQL statements into the program code, with fixed functions and cannot be modified at the application level
In this way, when faced with the analysis requirements of different types of SQL statements, the existing SQL parser cannot meet the above requirements, and has poor flexibility and narrow application range.

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 analysis method and SQL analyzer
  • SQL analysis method and SQL analyzer
  • SQL analysis method and SQL analyzer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0029] As used herein, terms such as "module" and "means" are intended to include computer-related entities such as, but not limited to, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a module may be, but is not limited to being limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. For example, both an application running on a computing device and the computin...

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 embodiment of the invention provides an SQL analysis method and an SQL analyzer, and the method comprises the steps: generating a character data flow with an SQL type label according to a to-be-analyzed source structured query language SQL statement and a corresponding SQL type; analyzing the character data stream into a corresponding grammar mark stream according to a lexical rule and a grammar rule which are matched with the character data stream and are found based on the SQL type tag; generating a corresponding abstract syntax tree according to the syntax expression of each syntax phrase in the syntax mark flow; and converting the abstract syntax tree into an output data stream with an output type configured corresponding to the source SQL statement, and outputting the output datastream. By applying the scheme provided by the embodiment of the invention, the analysis of SQL statements of various SQL types can be supported, the application range is expanded, and the flexibilityand the expandability are improved.

Description

technical field [0001] The embodiment of the present invention relates to the technical field of databases, in particular to an SQL parsing method and an SQL parser. Background technique [0002] With the rapid development of information technology, the application of database is becoming more and more common. SQL (Structured Query Language, Structured Query Language) is a set of operation commands specially established for databases, and is a fully functional database language. When using it, you only need to issue the "what to do" command, and the "how to do it" does not need to be considered by the user. SQL is powerful, easy to learn, and easy to use. It has become the basis of database operations, and now almost all databases support SQL. [0003] Currently, most of the work performed on a database is done with SQL statements. In order to execute the SQL statement, it is necessary to analyze the SQL statement, generate a logical execution plan, and generate a physica...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/242G06F16/2453
CPCG06F16/2433G06F16/2453
Inventor 郭岳潘宇虹唐小丹
Owner CHINA MOBILE GROUP ZHEJIANG
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products