SQL code quality evaluation method and system

A code quality and evaluation method technology, applied in the field of SQL code quality evaluation methods and systems, can solve problems such as no possibility of implementation, inability to evaluate SQL quality, and a large number of tools, achieving good interception effect, good preventive effect, and improvement The effect of developing ability

Pending Publication Date: 2021-10-26
CHINA CITIC BANK
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

One is manual inspection by experienced senior engineers, but this requires inspectors to have strong database knowledge and be very familiar with the data in the database
This method is generally used within the enterprise data development team. The amount of tools used in the SQL query system open to the enterprise is too large to be implemented; the other is static code analysis and evaluation, which analyzes the syntax and process of the code. Evaluate the quality of the code, such as sonar and other open source tools. These tools mainly check the syntax accuracy when evaluating SQL, and cannot comprehensively evaluate SQL quality based on information such as warehouse database type, table size information, and enterprise code specifications.

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 code quality evaluation method and system
  • SQL code quality evaluation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] In order to understand the content of the present invention more clearly, it will be described in detail with reference to the drawings and embodiments.

[0041] The first aspect of the embodiment of the present invention relates to a method such as figure 1 The SQL code quality evaluation method of the process shown includes:

[0042] Formulating evaluation rules and deduction rule scores corresponding to the evaluation rules, wherein the evaluation rules include code specification rules and execution performance rules, and the code specification rules include one or more combinations of the following sub-rules: With table aliases, no table alias specified before the field in multi-table query, SQL keywords are not all capitalized, database objects are not all lowercase, use SELECT*, do not use union all to replace or in the where condition, the execution performance rules include One or more combinations of the following sub-rules: the query table contains tables in ...

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 relates to an SQL code quality evaluation method and a system, wherein a code quality evaluation rule is formulated by using Jsqlparser to analyze an SQL statement of a user and analyze grammar and combining characteristics of a data warehouse HIVE cluster and development specifications in an enterprise, an evaluation score can be given, SQL submission quality of non-data development professionals in a query system can be managed and controlled, SQL codes of enterprises are standardized, and the possibility that low-quality query of SQL may harm a data warehouse HIVE cluster is reduced.

Description

technical field [0001] The invention relates to the technical field of database code quality evaluation, in particular to a SQL code quality evaluation method and system. Background technique [0002] At this stage, the popularity of SQL is getting higher and higher, and it has become the first choice for data developers to query and process data. With the continuous popularization of SQL knowledge, the rapid development of enterprise data application systems, and the increasingly urgent demand for data by enterprise personnel, non-data development professionals in enterprises also hope to use SQL for data query. When everyone can use SQL query, how to inspect and evaluate the quality of SQL code is one of the key issues facing enterprise data development tools at this stage. [0003] In the prior art, there are generally two methods for code quality evaluation. One is manual inspection by experienced senior engineers, but this requires inspection personnel to have strong ...

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): G06F11/36G06F8/77
CPCG06F11/3616G06F8/77
Inventor 夏瑜喆刘丕乾
Owner CHINA CITIC BANK
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