Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for batch synchronous update of data in database

A synchronous update and database technology, applied in the database field, can solve the problems of different update columns, unable to bind data row data synchronization in batches, etc., and achieve the effect of reducing synchronization delay

Active Publication Date: 2022-05-13
WUHAN DAMENG DATABASE
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of the above defects or improvement needs of the prior art, the present invention solves the problem that data synchronization cannot be performed by batch binding data rows due to different update columns in source update operations that need to be synchronized

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 batch synchronous update of data in database
  • Method and device for batch synchronous update of data in database
  • Method and device for batch synchronous update of data in database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] In the database operation, the SQL statement corresponding to the UPD operation of the database is an update statement, and each time the statement is executed, one or more rows of data in the database that meet the execution conditions will be changed. When performing database synchronization, if the UPD operation is performed in the source database, the same data update needs to be performed on one or more rows of data that meet the same execution conditions in the destination database to ensure that the data in the destination database is consistent with the source database. When database operations are submitted, not every operation is executed immediately to avoid data conflicts, or due to other database scheduling reasons, which causes synchronization delays. In order to avoid synchronization delay, you can bind the parameters of multiple update statements in one UPD operation by batch-binding data rows, and update multiple rows of data through the execution of one...

Embodiment 2

[0050] In the specific implementation scenario of this embodiment, the specific steps provided in this embodiment can be used to complete steps 101 to 105 provided in Embodiment 1, so as to realize the merging of source update operations.

[0051] In a specific implementation scenario, database table t1 is included. Table 1 below shows the data before t1 is updated. The first column in Table 1 is the row number of the data row, and the second to sixth columns are the column values ​​of the column names c1, c2, c3, c4, and c5 respectively.

[0052] 102 1 2 3 4 A 103 1 2 3 4 A 104 1 2 3 4 A

[0053] Table 1

[0054] Between two database synchronizations, the source database sequentially performs the following three consecutive update operations on table t1. In a specific implementation scenario, the following three operations can be divided into one transaction for processing, so as to improve processing efficiency by using transaction-related...

Embodiment 3

[0128] On the basis of the method for batch synchronous update of data in the database provided by the above-mentioned embodiment 1 to embodiment 2, the present invention also provides a device that can be used to realize the batch synchronous update of data in the database of the above method, such as Figure 5 Shown is a schematic diagram of the device architecture of the embodiment of the present invention. The apparatus for synchronously updating data in batches in a database in this embodiment includes one or more processors 21 and memory 22 . in, Figure 5 A processor 21 is taken as an example.

[0129] Processor 21 and memory 22 can be connected by bus or other means, Figure 5 Take connection via bus as an example.

[0130]The memory 22 is a non-volatile computer-readable storage medium used as a batch synchronous update method for data in the database, and can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, su...

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 relates to the field of databases, in particular to a method and device for synchronously updating data in batches in a database. It mainly includes: obtaining source update operations that need to be synchronized in the source database; obtaining condition column information sets and update column information sets in each source update operation; generating It is used to update the statement for the purpose of synchronization; according to the value of the condition column in the condition column information set and the value of the update column in the update column information set, a bound data row is generated for the condition column and update column of the purpose update statement; the purpose update statement is used as The target update operation is submitted to the target database, and the target database is updated in batches using the values ​​in the bound data row. The present invention can realize batch binding of data rows by multiple source update operations that currently cannot be used to bind data rows in batches, and complete data synchronization by using batch binding of data rows to achieve the effect of reducing synchronization delay.

Description

【Technical field】 [0001] The invention relates to the field of databases, in particular to a method and device for synchronously updating data in batches in a database. 【Background technique】 [0002] Synchronization performance is a key index in real-time synchronization system of database data. In a data synchronization system, when an update (update, abbreviated as: UPD) operation of the source database is synchronized to the destination database, there may be a waiting situation between each operation, so synchronization delays often occur. In order to reduce the synchronization delay, multiple SQL statements can be combined into one, and then multiple rows of data can be bound to the combined SQL statement in batches, and multiple UPD operations can be completed through one SQL statement, and the waiting time between different operations can be removed to reduce The delay between each statement. [0003] When binding data rows in batches, in order to combine multiple ...

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/27G06F16/23
Inventor 孙峰刘启春余院兰
Owner WUHAN DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products