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

Database synchronization method, device, equipment and storage medium

A database and synchronization configuration technology, applied in the database field, can solve problems such as failure of business database data synchronization

Active Publication Date: 2021-09-17
SUZHOU DAJIAYING INFORMATION TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The embodiment of the present invention provides a database synchronization method, device, equipment and storage medium to overcome the defects of the existing technology and solve the problem of data synchronization failure due to the special attribute of the business database field

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 synchronization method, device, equipment and storage medium
  • Database synchronization method, device, equipment and storage medium
  • Database synchronization method, device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] figure 1 It is a flow chart of a database synchronization method provided by Embodiment 1 of the present invention, which is applicable to the situation of data warehouse ODS layer database synchronization, especially when there are special field attributes in the business database (for example, there are virtual keys, specific attributes, etc. in the business database) NOT NULL) is likely to cause data synchronization failure, the method can be executed by the database synchronization device provided by the embodiment of the present invention, the device can be implemented in software and / or hardware, and can generally be integrated into the processor of a computer.

[0028] Such as figure 1 As shown, the method of this embodiment specifically includes:

[0029] S110. Obtain table structure information of the source database and the target database.

[0030] In this embodiment, the synchronization of the database refers to synchronizing the data changes of the source...

Embodiment 2

[0079] figure 2 It is a flow chart of a database synchronization method provided by Embodiment 2 of the present invention. This embodiment is embodied on the basis of the above embodiments, wherein the updated data matching the table structure change information in the acquisition source database is synchronized to the Before the above target database, also include:

[0080] Update the data table synchronization configuration table according to the newly added table name of the newly added delete change information.

[0081] Further, the update data matching the table structure change information obtained in the source database is synchronized to the target database, specifically:

[0082] If it is determined that there is no new table and new field according to the newly added, deleted, and changed information, use the current ETL project to perform incremental data synchronization corresponding to the data table to be synchronized in the data table synchronization configur...

Embodiment 3

[0128] On the basis of the above embodiments, this embodiment provides a specific implementation mode for the specific application scenario of ODS database synchronization, taking synchronization of a business database to the ODS layer as an example, wherein, as Figure 3A As shown, the table structure synchronization part in the database synchronization method provided by this embodiment specifically includes:

[0129] S310. Create database connections with the service database and the ODS database respectively according to the connection association information in the pre-established database connection configuration table, and obtain table structure information of the service database and the ODS database.

[0130] S320. Determine, according to the table structure information of the business database and the table structure information of the ODS database, information about addition, deletion, and modification of data tables or fields associated with the table structure.

...

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 embodiment of the invention discloses a database synchronization method, device, equipment and storage medium. The method includes: obtaining table structure information of a source database and a target database; determining table structure change information according to the table structure information of the source database and the table structure information of the target database, and a preset field attribute capture rule; The table structure change information generates a change statement, and controls the target database to execute the change statement to update the table structure information of the target database; obtain the update data in the source database that matches the table structure change information Synchronized to the target database. The technical solution of the embodiment of the present invention overcomes the disadvantages of the prior art, and also realizes the synchronization function that the database table field has multiple attributes and the content can be filtered, and solves the problem of data synchronization failure caused by the special attribute of the source database field.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of databases, and in particular, to a database synchronization method, device, device, and storage medium. Background technique [0002] ODS (Operational Data Store, operational data storage) is used as an intermediate data layer between DW (Data Warehouse, data warehouse) and business systems, used to store data directly extracted from business systems, and needs to be synchronized with business data sources, specifically It is to synchronize with the table structure and data of the business database. [0003] In the prior art, it is generally to perceive the table structure change and data change of the business database by designing an external program, and then generate a SQL (Structured Query Language, Structured Query Language) statement by parsing the change information and make the target database execute the SQL statement, so as to To achieve the effect of database synchro...

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/23G06F16/27G06F16/25
Inventor 赵志洲
Owner SUZHOU DAJIAYING INFORMATION TECH CO LTD
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