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

A database modification method, device, equipment and storage medium

A database and data modification technology, applied in the computer field, can solve problems such as being too conservative, reducing transaction processing speed, non-conflicting transaction blocking, etc., and achieve the effect of improving concurrency

Active Publication Date: 2021-04-27
SHANGHAI DAMENG DATABASE
View PDF12 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the X lock is used, after the transaction corresponding to the TID lock is committed or rolled back, only one transaction will be awakened, and other transactions will continue to block. This method helps to reduce invalid concurrency conflicts, but this method is different for different transactions. In the data scenario, it is too conservative, causing non-conflicting transactions to be blocked and reducing the processing speed of transactions

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 database modification method, device, equipment and storage medium
  • A database modification method, device, equipment and storage medium
  • A database modification method, device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] Figure 1A It is a flow chart of a database modification method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of database modification. The method can be executed by the database modification device in the embodiment of the present invention. The device can use software and / or or hardware implementation, such as Figure 1A As shown, the method specifically includes the following steps:

[0027] S110, when the modification instruction of the transaction is acquired, read the transaction number of the data to be modified corresponding to the transaction.

[0028] Wherein, the transaction is a modification transaction, for example, the transaction is to modify the data in the second row of Table 1 to A.

[0029] Wherein, the modification instruction is an instruction for modifying data in the database.

[0030] Wherein, the transaction number is a TID value corresponding to the transaction.

[0031] Wherein, the transac...

Embodiment 2

[0062] figure 2 It is a flowchart of a database modification method in Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above-mentioned Embodiment 1. In this embodiment, blocking the transaction number corresponding to the transaction through an exclusive lock includes: The exclusive lock blocks the transaction number corresponding to the transaction to obtain a second transaction lock, and calculates the hash value of the second transaction lock according to the transaction number of the transaction; Two transaction locks are stored in a hash table, wherein the hash table includes locks corresponding to transactions in execution state. After blocking the transaction number of the data to be modified by the shared lock, it also includes: calculating the hash value of the first transaction lock according to the transaction number of the data to be modified; according to the hash value of the first transaction lock The first transaction loc...

Embodiment 3

[0086] image 3 It is a schematic structural diagram of a database modifying device provided by Embodiment 3 of the present invention. This embodiment is applicable to the situation of database modification, and the device can be realized by software and / or hardware, and the device can be integrated in any device that provides database modification function, such as image 3 As shown, the database modifying device specifically includes: a reading module 310 , a blocking module 320 , an updating module 330 and a modifying module 340 .

[0087] Wherein, the reading module 310 is configured to read the transaction number of the data to be modified corresponding to the transaction when the modification instruction of the transaction is obtained;

[0088] Blocking module 320, configured to block the transaction number of the data to be modified through a shared lock if the transaction state corresponding to the transaction number of the data to be modified is an execution state, a...

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 modification method, device, equipment and storage medium. The method includes: reading the transaction number of the data to be modified corresponding to the transaction when the modification instruction of the transaction is obtained; Describe the transaction number of the data to be modified, and record the modification location information carried in the modification instruction; update the lock waiting array according to the modification location information; if the updated lock waiting array is empty, then modify it according to the modification location information The data to be modified, and the transaction number of the data to be modified is replaced by the transaction number corresponding to the transaction. Through the technical solution of the present invention, all transactions without concurrent conflicts can be awakened, allowing concurrent execution of these transactions , so as to further improve the concurrency of the system.

Description

technical field [0001] The embodiment of the present invention relates to computer technology, in particular to a method, device, equipment and storage medium for modifying a database. Background technique [0002] The database system allows multiple users to access and modify data concurrently, and the concurrent operations of different users are ultimately reflected in the concurrent execution of different transactions. There may be multiple transactions accessing or modifying the same row of data at the same time. In order to ensure the correctness and consistency of the data, the database system must implement concurrency control, and the most commonly used method is blocking. Before modifying the data, X locks the database object first. During this period, the access and modification actions of other transactions will be blocked. After the data modification is completed, the X lock is released to ensure the correctness and integrity of the data under concurrent conditio...

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): G06F16/2453G06F9/52
Inventor 王蒙蒙王海龙
Owner SHANGHAI DAMENG DATABASE