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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


