Unlock instant, AI-driven research and patent intelligence for your innovation.
Control method and device for updating database records
What is Al technical title?
Al technical title is built by PatSnap Al team. It summarizes the technical point description of the patent document.
A technology for updating data and control methods, applied in 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: 2018-10-16
CHINA CONSTRUCTION BANK
View PDF3 Cites 0 Cited by
Summary
Abstract
Description
Claims
Application Information
AI Technical Summary
This helps you quickly interpret patents by identifying the three key elements:
Problems solved by technology
Method used
Benefits of technology
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
Click on the blue label to locate the original text in one second.
Reading with bidirectional positioning of images and text.
Smart Image
Examples
Experimental program
Comparison scheme
Effect test
Embodiment 1
[0047] see figure 1 , figure 1 It is a flowchart of a control method for 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 no row-level lock is added to the select statement.
[0050] Step S102, using 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, updating the first pre-update field, and adding 1 to the version number of the database record in the control memory;
[0053] Step S104, during 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...
Embodiment 2
[0061] see figure 2 , figure 2 It is a flow chart of another control method for updating database records provided by the embodiment of the present invention. Such as figure 2 As shown, the method includes:
[0062] Step S201, obtaining a pre-updated database record;
[0063] Step S202, using the primary key to locate the database record;
[0064] Step S203, searching for the first pre-update field, obtaining first update data input by the user corresponding to the first pre-update field, and updating 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 add 1;
[0067] Step S205, during the process of updating the first pre-update field, when an update request for the second pre-update field is ...
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
Login to View More
Abstract
The invention discloses a databaserecord updating control method and device. The method includes the steps that a databaserecord to be updated is obtained; the databaserecord 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 invention relates to the technical field of software, 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 support multiple transactions to be executed at the same time, which can effectively improve the operating efficiency of the database management system. A transaction is an operation performed on a database. When developing multi-user database applications, it is often necessary to strive for the maximum concurrent access. However, when multiple users access the database concurrently, multiple transactions often update the same record at the same time. Since the processing time required by different transactions is different, the modification operation of the long transaction will overwrite the modification of the record by the short transaction. Condition. [0003] In order to avoid the...
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
Application Date:The date an application was filed.
Publication Date:The date a patent or application was officially published.
First Publication Date:The earliest publication date of a patent with the same application number.
Issue Date:Publication date of the patent grant document.
PCT Entry Date:The Entry date of PCT National Phase.
Estimated Expiry Date:The statutory expiry date of a patent right according to the Patent Law, and it is the longest term of protection that the patent right can achieve without the termination of the patent right due to other reasons(Term extension factor has been taken into account ).
Invalid Date:Actual expiry date is based on effective date or publication date of legal transaction data of invalid patent.