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

CN106383855BActive Publication Date: 2019-08-02TSINGHUA UNIV
3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2019-08-02

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a static authentication method capable of aiming at SQL (Structured Query Language) analytical query. The method comprises the following steps of: S1: obtaining the SQL analytical query submitted by a user; S2: constructing a genealogical tree from the SQL analytical query; S3: on the basis of the genealogical tree, extracting a data access request of the SQL analytical query; and S4: on the basis of an access control rule, authenticating the data access request. Compared with an existing database access control technology, the static authentication method combines the characteristics of the analytical query to support simultaneous access to a plurality of columns and control for an operation. Therefore, by use of the method, the SQL analytical query can be more flexibly and accurately authenticated. Meanwhile, by use of the method, an administrator is permitted to carry out permission management through the compiling of the access control rule, in addition, no extra burdens are brought to users, and therefore, the static authentication method exhibits better availability. Finally, the method carries out authentication only on the basis of the SQL analytical query, so that an authentication process is more efficient, and the method is suitable for a large-scale data analysis scene.
Need to check novelty before this filing date? Find Prior Art

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...