Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Database record updating control method and device

A technology for updating data and control methods, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as reducing concurrency efficiency and deadlock, and achieve the effect of improving concurrency efficiency

Active Publication Date: 2015-02-25
CHINA CONSTRUCTION BANK
View PDF3 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, this concurrency control method in the prior art is likely to cause deadlock, which will greatly reduce concurrency efficiency

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 record updating control method and device
  • Database record updating control method and device
  • Database record updating control method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] See figure 1 , figure 1 This is a flowchart of a method for controlling updating database records provided by an embodiment of the present invention. Such as figure 1 As shown, the method includes:

[0048] Step S101, obtaining a pre-updated database record;

[0049] Specifically, a pre-updated database record is obtained through a select statement, and the select statement does not add a row-level lock.

[0050] Step S102, use the primary key to locate the database record;

[0051] Specifically, the primary key is field information that uniquely identifies a record in the Constraint database.

[0052] Step S103, update the first pre-update field, and control the version number of the database record in the memory to increase by one;

[0053] Step S104, in the process of updating the first pre-update field, when an update request for the second pre-update field is obtained, use the primary key to locate the database record;

[0054] Specifically, the second pre-update field is loc...

Embodiment 2

[0061] See figure 2 , figure 2 This is a flowchart of another control method for updating database records provided by an embodiment of the present invention. Such as figure 2 As shown, the method includes:

[0062] Step S201: Obtain a pre-updated database record;

[0063] Step S202, use the primary key to locate the database record;

[0064] Step S203: Search for the first pre-update field, obtain first update data input by the user and corresponding to the first pre-update field, and update the first pre-update field;

[0065] Specifically, the first pre-update field is located in the database record.

[0066] Step S204: Read the version number of the database record in the database, store the version number of the database record in the memory, and control the version number of the database record in the memory to increase by one;

[0067] Step S205, in the process of updating the first pre-update field, when an update request for the second pre-update field is obtained, use the p...

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 database record updating control method and device. The method includes the steps that a database record to be updated is obtained; the database record is positioned through a main key; a first field to be updated is updated, and the version number of the database record in a memory is controlled to add one to the version number; in the process of updating the first field to be updated, when an updating request for updating a second field to be updated is obtained, the database record is positioned through the main key; the second field to be updated is located in the database record; the version number of the database record in the memory and the version number of the database record in a database are obtained; when the difference value generated by subtracting the version number of the database record in the database from the version number of the database record in the memory is one, the second field to be updated is updated. By the adoption of the technical scheme, the problems that in the prior art, a concurrency control method is prone to causing deadlock and the concurrency efficiency can be lowered can be avoided.

Description

Technical field [0001] The present invention relates to the field of software technology, in particular to a control method and device for updating database records. Background technique [0002] Database is the core and foundation of information system. Now mainstream database management systems all support the simultaneous execution of multiple transactions, which can effectively improve the operating efficiency of the database management system. Transaction refers to an operation completed on the database. To develop multi-user database applications, it is often necessary to strive for maximum concurrent access. However, when multiple users access the database concurrently, multiple transactions often update the same record at the same time. Due to the different processing time required by different transactions, the modification operation of the long transaction will overwrite the modification of the record by the short transaction. Happening. [0003] In order to prevent t...

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/2308G06F16/2315
Inventor 舒展陈炙聂砂刘海李拓曲麟智
Owner CHINA CONSTRUCTION BANK
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
Eureka Blog
Learn More
PatSnap group products