Method for data synchronization between heterogeneous relational databases

A data synchronization and database technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as failure to meet the business needs of Sqlserver database, use maintenance and upgrade problems, etc., to achieve flexible expansion of synchronization range, reduce The effect of small resource overhead

Pending Publication Date: 2018-10-12
XIAMEN HYMAKE TECH
View PDF3 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, these two open source tool frameworks only support Oracle and Mysql, but not Sqlserver, which cannot meet the business needs of synchronizing with the Sqlserver database
In addition, as databus and otter are open source frameworks, there are certain risks of using maintenance and upgrading

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 for data synchronization between heterogeneous relational databases
  • Method for data synchronization between heterogeneous relational databases
  • Method for data synchronization between heterogeneous relational databases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0062] The embodiment of the present invention provides a data synchronization method between heterogeneous relational databases, which is applied to the target database to synchronize the source database, as shown in the attached figure 1 Shown, specifically include the following:

[0063] Step S11, according to business requirements, respectively determine the source database for synchronization, the target database for synchronization, the database type, and the database table of the source database and the database table of the target database involved; the database table is a set of a series of two-dimensional arrays, Used to represent and store relationships between data objects;

[0064] Step S12, using java language to write the function code of the synchronization service, and performing targeted adaptation to the SQL syntax for the source database and the target database type, and packaging the function code of the synchronization service into a deployable jar file; ...

Embodiment 2

[0082] In order to achieve bidirectional synchronization between the first database and the second database at the same time in the method of Embodiment 1, triggers are added to both databases. In this case, synchronization services a and b can be reused, that is, synchronization services a and b each periodically perform "pull from the message queue" - "assemble data and write" - "query local messages to be synchronized" - — The process of "assembling a message and delivering it".

[0083] The embodiment of the present invention provides that the present invention also provides another data synchronization method between heterogeneous relational databases, which can realize two-way synchronization between the first database and the second database, as shown in the attached figure 2 As shown, the specific implementation method includes the following steps:

[0084] Step S21, respectively determine the first database, the second database, the database type, and the database t...

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 data synchronization between heterogeneous relational databases. The method comprises the following steps of: respectively determining a synchronous source data, asynchronous target database, database types and referred database table according to business demands; compiling a function code of a synchronization service and packaging a deployable jar file; respectively erecting Tomcat services at the source database and the target database, deploying and constructing an independent message queue service queue and establishing a synchronization recording table in the source database; compiling a trigger script and executing the trigger script in a source database engine; periodically querying the synchronization recording table, obtaining non-synchronized records in batches, packaging the records and delivering the packaged records into the message queue service queue; after a synchronization service A is successfully delivered, modifying the synchronization recording table; and periodically pulling synchronization records from the message queue service queue in batches by a synchronization service b, analyzing the synchronization records and executing the synchronization records to realize synchronization. The method for data synchronization is capable of supporting Sqlserver, Oracle and Mysql, and adopts protogenetic trigger mechanism of relational databases without using too much middleware or third-party software.

Description

technical field [0001] The invention relates to a data synchronization technology between databases, in particular to a data synchronization method between databases, which is applicable to a plurality of application systems each using a different relational database, and low-delay synchronization application of data among them. Background technique [0002] Relational databases are widely used in massive application system data storage and query, and there are many different implementations. The more mainstream relational databases include Oracle, MS Sqlserver, and Mysql, and each has many versions. [0003] Although the structures of different relational databases are similar, there are still differences in field types, value storage, and SQL syntax. Data synchronization between different relational databases cannot be directly achieved through simple replication. Structured Query Language SQL (Structured Query Language) is a database query and programming language for ac...

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
Inventor 李宁
Owner XIAMEN HYMAKE 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