SQL parsing method based on regular and string cutting

A parsing method and string technology, applied in the field of SQL database, can solve the problems of enterprise property loss, increase the use cost of developers, and increase the use cost, and achieve the effect of reducing the use cost and removing hidden dangers of insecurity.

Active Publication Date: 2018-12-18
韩雪松 +1
View PDF6 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, many enterprises use existing SQL databases for data storage. However, the types of SQL databases of each company are also different, including hivesql, mysql, sqllite, sqlserver, oracle, etc. For different types of SQL databases, the same intention The SQL syntax used for the corresponding operation will also be different, which greatly increases the developer's cost of using SQL
However, due to the increase in the cost of using SQL, the program cannot carefully filter the data entered by the user. Therefore, with the continuous injection of SQL data, the existing SQL database cannot meet the increasingly advanced security requirements, resulting in illegal data intrusion into the system. As a result, the enterprise suffered huge property losses, so the problem of SQL data security needs to be solved urgently
[0003] In addition, the SQL database currently used in my country is provided by foreign countries. Since the Prism Gate incident in 2013, the Chinese government has realized the importance of government data security and has also strengthened the work on government data security. The problem of going to IOE needs to be solved urgently

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 parsing method based on regular and string cutting

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment

[0031] Adopt the SQL parsing method based on regularization and character string cutting provided by the present invention, the following steps can be adopted for parsing the following original SQL statement:

[0032] Original SQL statement---->select*from school where name="Wang Qiang";

[0033] Step 1: Modify the original SQL statement to: SELECT*FROM school WHERE name="Wang Qiang" through case conversion;

[0034] Step 2, through the regular expression, the above statement can be determined as: SELECT query statement;

[0035] Step 3, judge that the above grammar is correct through regular expressions; in the process of judging, it is mainly done through regular expressions, for example, if the original SQL---->CREATE*FROM school WHERE name="Wang Qiang"; CREATE cannot be followed by FROM, so, through verification, it is known that the current statement has a field error;

[0036] Step 4, split the fields of the SQL statement: SELECT*FROM school WHERE name="Wang Qiang" thr...

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 a SQL parsing method based on regularity and character string cutting, which relates to the technical field of SQL database. By splitting the original SQL statement into keywords, type format validation and field resolution, you can get a generic SQL statement, support for compatibility with all database operations, therefore, it reduces the developer's use cost of SQL. Inaddition, by parsing SQL statements to get table and table field structure, we can create our own database model (modeling) according to the parsed field information, so as to remove the hidden dangers of foreign databases such as IOE.

Description

technical field [0001] The invention relates to the technical field of SQL databases, in particular to an SQL parsing method based on regularization and character string cutting. Background technique [0002] At present, many enterprises use existing SQL databases for data storage. However, the types of SQL databases of each company are also different, including hivesql, mysql, sqllite, sqlserver, oracle, etc. For different types of SQL databases, the same intention The SQL syntax used for the operation will also be different, which greatly increases the developer's cost of using SQL. However, due to the increase in the cost of using SQL, the program cannot carefully filter the data entered by the user. Therefore, with the continuous injection of SQL data, the existing SQL database cannot meet the increasingly advanced security requirements, resulting in illegal data intrusion into the system. As a result, the enterprise suffers huge property losses, so the problem of SQL d...

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): G06F17/30
Inventor 韩雪松陈继
Owner 韩雪松
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