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

Method and device for synchronously updating data in batches 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: 2021-04-16
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 synchronously updating data in batches in database
  • Method and device for synchronously updating data in batches in database
  • Method and device for synchronously updating data in batches 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 step 101 to step 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-rel...

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 a device for synchronously updating data in batches in a database. The method mainly comprises the steps of obtaining source updating operation needing to be synchronized in a source end database; obtaining a condition column information set and an updating column information set in each source updating operation; generating a target update statement for synchronization according to the condition column information set and the update column information set of all the source update operations; according to the value of the condition column in the condition column information set and the value of the updating column in the updating column information set, generating a binding data row for the condition column and the updating column of the target updating statement; and submitting the target update statement as a target update operation to a target end database, and updating the target database in batches by using the values in the bound data line. According to the method and the device, the batch binding of the data lines cannot be realized by using multiple source updating operations of the batch binding of the data lines at present, and the data synchronization is completed by using the batch binding of the data lines, so that the effect of reducing the synchronization delay is achieved.

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 Applications(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