A method and system for static detection of stored procedures based on database dictionary

A stored procedure and static detection technology, applied in error detection/correction, electrical digital data processing, software testing/debugging, etc., can solve problems such as limiting static detection capabilities, lack of table structure information, and inability to check implicit conversion of WHERE conditions , to achieve the effect of powerful ability and simplified syntax analysis process

Active Publication Date: 2019-03-12
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The common feature of these tools and methods is that the code file is the scanning object. This method has many defects for the database storage process, which limits the static detection ability.
Taking the SonarCuber tool as an example, due to the lack of table structure information involved in the stored procedure, it is impossible to check the implicit conversion in the WHERE condition, and it is impossible to judge whether there is a risk of string length overflow in the SELECT INTO statement, and these check items are exactly database storage. Very important static detection content in the process

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
  • A method and system for static detection of stored procedures based on database dictionary
  • A method and system for static detection of stored procedures based on database dictionary
  • A method and system for static detection of stored procedures based on database dictionary

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The technical means adopted by the present invention to achieve the intended invention purpose are further described below in conjunction with the drawings and preferred embodiments of the present invention.

[0029] In the embodiment of the present invention, the expressions of some terms are involved, which are explained as follows:

[0030] 1. Abstract syntax tree: Abbreviated as syntax tree, it is a tree representation of the abstract syntax structure of the code. Each node on the tree represents a structure in the code. Using abstract syntax tree can greatly reduce the complexity of static detection method.

[0031] 2. Symbol table: It is an important data structure for static detection, which records the type, characteristics and other related information of each identifier in the code. In the present invention, the symbol table is a mapping table of character strings and information, which can quickly retrieve symbol information. Symbols belonging to the same ...

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 present invention discloses a database dictionary based storage process static detection method and system. The method comprises: step one, establishing a connection with a database dictionary server; step two, querying a database dictionary table, acquiring all storage process objects of a current database user, and constructing a to-be-detected object list; step three, determining whether an undetected object exists in the to-be-detected object list, and if exists, performing code parsing on a storage process of the undetected object to generate a syntax tree and an annotation list, and adding the undetected object to a global symbol tree; step four, according to the syntax tree and annotation list that are generated in step three and the global symbol tree, generating a local symbol stack in an abstract syntax tree traversing process and calling a static detection component, and performing static detection on the storage process of the undetected object, so as to obtain a static detection result; and step five, generating a static detection report according to the static detection result.

Description

technical field [0001] The invention relates to the field of static testing, and belongs to computer-aided static testing technology, in particular to a method and system for static testing of stored procedures based on database dictionaries. Background technique [0002] Static testing means that the program under test does not run on the machine, but uses manual detection and computer-aided static detection to detect documents or programs. With the continuous development of computer technology and the continuous expansion of software scale, computer-aided static testing has become the most important means of program static testing. Computer-aided static detection refers to scanning the program code through lexical analysis, syntax analysis and other technologies, and then detecting the syntax, structure, process, interface, etc. of the code to verify whether the code meets the normative, security, reliability, maintainability, etc. A code instrumentation technique for met...

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 Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3668
Inventor 魏亚东何正平姚辰许振峰
Owner INDUSTRIAL AND COMMERCIAL BANK OF CHINA
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