Unlock instant, AI-driven research and patent intelligence for your innovation.

Database object blocking method and device, equipment and storage medium

A database and object technology, applied in the field of database management, can solve the problems of dictionary blocking global concurrency conflicts and reducing the execution efficiency of database systems.

Active Publication Date: 2020-03-24
SHANGHAI DAMENG DATABASE
View PDF9 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when there are a large number of concurrent operations in the application system, the dictionary lock method in the prior art needs to frequently apply for and release the dictionary lock, so it is necessary to repeatedly call the global critical section object, and the global critical section object has mutual exclusion, and at the same time at most It can only be called by one transaction. Therefore, the existing dictionary locking method will cause global concurrency conflicts in dictionary locking, which will lead to a decrease in the overall execution efficiency of the database system.

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
  • Database object blocking method and device, equipment and storage medium
  • Database object blocking method and device, equipment and storage medium
  • Database object blocking method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] Embodiment 1 of the present invention provides a method for locking a database object. The method can be executed by the locking device of the database object, wherein the device can be implemented by software and / or hardware, generally can be integrated in the database management equipment, and is suitable for dictionary locking of the database object before accessing the database object in the database Condition. figure 1 A schematic flow diagram of a method for locking database objects provided by Embodiment 1 of the present invention, as shown in figure 1 As shown, the blocking method of the database object includes:

[0026] S110. Obtain the current dictionary lock information table of the current transaction and the type information of the target dictionary lock that the current transaction needs to add to the current database object being accessed.

[0027] Specifically, when it is determined that the current transaction needs to access the current database obj...

Embodiment 2

[0049] figure 2 It is a schematic flowchart of a database object locking method provided by Embodiment 2 of the present invention. On the basis of the above embodiments, this embodiment optimizes "adding a target dictionary lock to the current database object according to the type information" as : Calling the global critical section object to create a target dictionary lock that matches the type information, marking the target dictionary lock as occupied, and adding the target dictionary lock to the global dictionary lock information table; adding the target dictionary lock A lock is added to the current dictionary lock information table, so as to lock the current database object with the target dictionary lock.

[0050] Further, before adding the target dictionary lock to the global dictionary lock information table, it also includes: determining that there is no target conflicting dictionary lock in an occupied state in the global dictionary lock information table, and the...

Embodiment 3

[0094] Embodiment 3 of the present invention provides a database object locking device. This device can be realized by software and / or hardware, and generally can be integrated in the database management equipment, is applicable to the situation that database object is carried out dictionary lock before accessing the database object in the database, can lock the database object by executing the lock method of database object to block. image 3 A schematic structural diagram of the locking device for database objects provided by Embodiment 3 of the present invention, as shown in image 3 As shown, the device includes an information acquisition module 301 and a lock determination module 302, wherein,

[0095] The information acquisition module 301 is used to obtain the current dictionary lock information table of the current transaction and the type information of the target dictionary lock that the current transaction needs to add to the current database object accessed;

[0...

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 embodiment of the invention discloses a database object blocking method and device, equipment and a storage medium. The method comprises the steps of obtaining a current dictionary lock information table of a current transaction and type information of a target dictionary lock needing to be added to an accessed current database object by the current transaction; if a non-conflict dictionary lock which is consistent with the type information and is in an unoccupied state exists in the current dictionary lock information table, determining the non-conflict dictionary lock as a target dictionary lock, and marking the target dictionary lock from an unoccupied state to an occupied state so as to lock the current database object by adopting the target dictionary lock. According to the embodiment of the invention, by adopting the technical scheme, the creation frequency of the dictionary lock can be reduced, so that the frequency of occupying the global critical region object due to creation of the dictionary lock is reduced, the probability of global concurrent conflict caused by dictionary blocking is reduced, and the execution efficiency of a database system is improved.

Description

technical field [0001] The invention relates to the technical field of database management, in particular to a database object blocking method, device, equipment and storage medium. Background technique [0002] Data blocking is an important technical means for database management system to control concurrency. It is used to manage concurrent access to database shared resources and ensure that multiple transactions can access correct and consistent database objects during concurrent execution. Locks used to block database objects are called dictionary locks. [0003] Before accessing any database object, it is necessary to lock the database object with a dictionary lock, otherwise, a system exception may be caused due to changes in the definition of the database object in a concurrent scenario. For example, a user is executing the operation of updating the C1 column data in the T1 data table, and another user initiates the operation of deleting the C1 column in the T1 data ...

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): G06F16/23
CPCG06F16/2343
Inventor 韩朱忠王海龙
Owner SHANGHAI DAMENG DATABASE