Method and device for realizing row lock of database

A data row and database technology, applied in the database field, can solve the problems of inability to meet the needs, consumption, and multiple system resources with system overhead, and achieve the effect of reducing system overhead.

Active Publication Date: 2014-06-25
BEIJING SOHU NEW MEDIA INFORMATION TECH
View PDF7 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this implementation, since each data row has an exclusive row lock, the transaction concurrency for different data rows is better, but when there are a large number of data rows in the database, a large number of row locks will consume more resources. system resource
[0004] Therefore, the implementation of the lock of the prior art database cannot meet the needs in terms of system overhead

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
  • Method and device for realizing row lock of database
  • Method and device for realizing row lock of database
  • Method and device for realizing row lock of database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] In order to make the above objects, features and advantages of the present invention more comprehensible, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0017] For example, in a possible implementation manner of the embodiment of the present invention, it can be used to implement row locks of semi-structured databases such as NoSQL, which are widely used in the Internet mode. Transaction operations provided by semi-structured databases usually include write (Put), read (Get), scan (Scan) and delete (Delete). In the Internet mode, it is very common for multiple users to initiate write operations on the same data row in the database at the same time. Therefore, it is very important to rely on row locks to avoid operation inconsistencies in semi-structured databases. However, in view of the huge amount of data rows in the semi-structured database in the ...

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 invention discloses a method for realizing a row lock of a database in order to reduce system overhead. For example, the method can include the first step of responding to a transaction request, received into the database, of a data row and judging whether the row lock occupied by the data row exists according to the corresponding relation between the data row recorded in a row lock recording region and the row lock occupied by the data row, the second step of obtaining an idle row lock if the row lock occupied by the data row does not exist, and enabling the idle row lock to be the row lock occupied by the data row according to the corresponding relation between the data row recorded in the row lock recording region and the idle row lock, the third step of obtaining the row lock occupied by the data row according to the corresponding relation if the row lock occupied by the data row exists, the fourth step of returning the row lock occupied by the data row, and the fifth step of responding to and judging whether transactions of the data row are completely executed and canceling the corresponding relation between the data row recorded in the row lock recording region and the row lock to enable the data row to cancel occupation on the row lock. In addition, the invention further discloses a device for realizing the row lock of the database.

Description

technical field [0001] The invention relates to the field of databases, in particular to a method and device for realizing database row locks. Background technique [0002] With the explosive growth of data scale in the information age, there are more and more cases where multiple users issue transaction operation requests to the same data row of the database at the same time. In order to avoid conflicts in database write operations between users, locks are usually used to ensure the atomicity of transactions on data operations. [0003] At present, the main implementation method of database lock is to pre-allocate a row lock for the index of each data row. When a transaction operation needs to be performed on a data row, the row lock can be obtained through the index of the data row, and the transaction that obtains the row lock can perform transaction operations on the data row. In this implementation, since each data row has an exclusive row lock, the transaction concur...

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): G06F17/30
CPCG06F16/2343
Inventor 严林
Owner BEIJING SOHU NEW MEDIA INFORMATION TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products