A static authorization method for SQL analysis query
A static and query statement technology, applied in the database field, can solve problems such as large overhead, restrictions, and does not support simultaneous access to multiple columns, and achieve the effect of efficient and accurate authorization in the authorization process
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2019-08-02
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the technical field of databases, in particular to a static authorization method suitable for SQL analysis and query. Background technique
[0002] In practice, SQL queries are usually divided into transactional queries and analytical queries. Among them, analytical queries access a large number of records simultaneously for statistical analysis. However, since databases usually contain sensitive information and different users have different data access rights, SQL queries need to be controlled and authorized.
[0003] Currently, the SQL language standard includes simple access control mechanisms. This mechanism allows administrators to grant access to database tables and columns to different users. However, for SQL analysis queries, this technology has the following deficiencies. First, the mechanism only allows individual grants on columns. However, SQL analysis queries usually access multiple columns at the same time f...
Examples
Embodiment Construction
[0028] The present invention proposes a static authorization method for SQL analysis and query, which is described as follows in conjunction with the accompanying drawings and embodiments.
[0029] Such as figure 1 As shown, the method includes the following steps S1-S4.
[0030] S1: Get the SQL analysis query submitted by the user. The SQL analysis query includes: output and a column for condition judgment.
[0031] Intercept, analyze and authorize SQL analysis queries before they are executed. When the authorization is successful, the SQL analysis query continues to be executed; otherwise, the SQL analysis query will be blocked and returned to the user for modification.
[0032] S2: Calculate the genealogy tree corresponding to the SQL analysis query by using the output in the SQL analysis query and the columns used for condition judgment. A genealogy tree is a tree consisting of columns and transformation operations in database tables, where leaf nodes are columns and n...