CN103020112A - Heterogeneous database synchronizing system and heterogeneous database synchronizing method - Google Patents

Heterogeneous database synchronizing system and heterogeneous database synchronizing method Download PDF

Info

Publication number
CN103020112A
CN103020112A CN2012104375750A CN201210437575A CN103020112A CN 103020112 A CN103020112 A CN 103020112A CN 2012104375750 A CN2012104375750 A CN 2012104375750A CN 201210437575 A CN201210437575 A CN 201210437575A CN 103020112 A CN103020112 A CN 103020112A
Authority
CN
China
Prior art keywords
database
data
sql statement
converted
heterogeneous database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012104375750A
Other languages
Chinese (zh)
Inventor
李盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE ICT Technologies Co Ltd
Original Assignee
ZTE ICT Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE ICT Technologies Co Ltd filed Critical ZTE ICT Technologies Co Ltd
Priority to CN2012104375750A priority Critical patent/CN103020112A/en
Publication of CN103020112A publication Critical patent/CN103020112A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a heterogeneous database synchronizing system. The heterogeneous database synchronizing system comprises a monitoring module, a converting module and an executing module, wherein the monitoring module is used for monitoring the change of a changing data table in a first database; the converting module is used for converting the changing data into SQL (structured query language) statements when the changing data table changes; and the executing module is used for inputting the SQL statements into a second database so as to execute the SQL statements. Correspondingly, the invention further discloses a heterogeneous database synchronizing method. By the technical scheme, the SQL statements causing data change can be obtained according to the change of the changing data table in the database; and the data synchronization between heterogeneous databases can be realized by inputting the SQL statements into another database.

Description

Heterogeneous database synchro system and heterogeneous database synchronization method
Technical field
The present invention relates to the database processing field, in particular to a kind of heterogeneous database synchro system and heterogeneous database synchronization method.
Background technology
The current internet development is at a tremendous pace, and user's quantity is more and more, and the catenet applying pressure is increasing, and the processing power of unit is limited, always has a mxm., and distributed environment is unavoidable.
Because system is continuous dilatation, to be built different periods, the database of isomery appears possibly, can data sharing between the database of isomery, otherwise " information island " will appear.For this reason, process these heterogeneous database information sharings how flexibly, effectively, economically, the problem that data are synchronous becomes a quite concerned research direction.
Therefore, need a kind of new heterogeneous database simultaneous techniques, thereby realize the real-time synchronization between the heterogeneous database.
Summary of the invention
Technical matters to be solved by this invention is, a kind of new heterogeneous database simultaneous techniques is provided, thereby realizes the real-time synchronization between the heterogeneous database.
In view of this, the invention provides a kind of heterogeneous database synchro system, comprising: monitoring module, monitor the variation of change tables of data in the first database; Modular converter when described change tables of data changes, is converted to the SQL(Structured Query Language (SQL) with described change tables of data) statement; Execution module is input to the second database with described SQL statement, to carry out described SQL statement.Use the technical program, according to the variation of data change table in the database, can obtain causing the SQL statement of data variation, be input to another database and can realize the synchronous of data among heterogeneous databases.
In technique scheme, preferably, described modular converter comprises: the first sub-modular converter is converted to described change tables of data in the text of specific format; The second sub-modular converter by described specific format, is described SQL statement with described text-converted.In this technical scheme, therefore the text of specific format will be applicable to different computing machines, should be comparatively general text formatting, thereby guarantees that different computing machines can resolve it, thereby can be converted into SQL statement, realize the synchronous of data.
In technique scheme, preferably, described specific format comprises the XML form.In this technical scheme, XML (eXtensible Markup Language, extending mark language) is one group of standard that International Standards Organization formulates, it provides a kind of method for the text formatting data of description, can usage flag, the option such as attribute comes the data of description content, it has made things convenient for and has carried out mutual information interchange between the different computing machines as a kind of public language.
In technique scheme, preferably, the described second sub-modular converter gathers a plurality of described texts, and is converted to described SQL statement.In this technical scheme, in database, gather the text of a plurality of XML forms, can concentrate to be converted to SQL statement, avoid frequent operation, improve the conversion efficiency of SQL statement, thus realize between data synchronously.
In technique scheme, preferably, described monitoring module arranges trigger, to monitor the variation of described change tables of data.In this technical scheme, use trigger that the variation of change tables of data is monitored, it can catch the delta data of database in real time, and efficient is very high, and is the primary support of database, and the workload of exploitation is little, realizes simple.
According to another aspect of the invention, also provide a kind of heterogeneous database synchronization method, having comprised: step 202, monitor the variation of change tables of data in the first database; Step 204 when described change tables of data changes, is converted to SQL statement with described change tables of data; Step 206 is input to the second database with described SQL statement, to carry out described SQL statement.Use the technical program, according to the variation of data change table in the database, can obtain causing the SQL statement of data variation, be input to another database and can realize the synchronous of data among heterogeneous databases.
In technique scheme, preferably, described step 204 comprises: the text that described change tables of data is converted to specific format; By described specific format, be described SQL statement with described text-converted.In this technical scheme, therefore the text of specific format will be applicable to different computing machines, should be comparatively general text formatting, thereby guarantees that different computing machines can resolve it, thereby can be converted into SQL statement, realize the synchronous of data.
In technique scheme, preferably, described specific format comprises the XML form.In this technical scheme, XML is one group of standard that International Standards Organization formulates, it provides a kind of method for the text formatting data of description, can usage flag, the option such as attribute comes the data of description content, it has made things convenient for and has carried out mutual information interchange between the different computing machines as a kind of public language.
In technique scheme, preferably, described step 204 comprises: gather a plurality of described texts, and be converted to described SQL statement.In this technical scheme, in database, gather the text of a plurality of XML forms, can concentrate to be converted to SQL statement, avoid frequent operation, improve the conversion efficiency of SQL statement, thus realize between data synchronously.
In technique scheme, preferably, described step 202 comprises: trigger is set, to monitor the variation of described change tables of data.In this technical scheme, use trigger that the variation of change tables of data is monitored, it can catch the delta data of database in real time, and efficient is very high, and is the primary support of database, and the workload of exploitation is little, realizes simple.
By above technical scheme, can realize a kind of heterogeneous database synchro system and a kind of heterogeneous database synchronization method, thereby realize the real-time synchronization between the heterogeneous database.
Description of drawings
Fig. 1 shows the according to an embodiment of the invention block diagram of heterogeneous database synchro system;
Fig. 2 shows the according to an embodiment of the invention process flow diagram of heterogeneous database synchronization method;
Fig. 3 shows the according to an embodiment of the invention particular flow sheet of heterogeneous database synchronization method;
Fig. 4 shows the according to an embodiment of the invention process flow diagram of database trigger;
Fig. 5 shows the according to an embodiment of the invention structural drawing of XML standard.
Embodiment
In order more clearly to understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments the present invention is further described in detail.Need to prove, in the situation that do not conflict, the application's embodiment and the feature among the embodiment can make up mutually.
A lot of details have been set forth in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not subjected to the restriction of following public specific embodiment.
Fig. 1 shows the according to an embodiment of the invention block diagram of heterogeneous database synchro system.
As shown in Figure 1, heterogeneous database synchro system 100 comprises according to an embodiment of the invention: monitoring module 102, monitor the variation of change tables of data in the first database; Modular converter 104 when described change tables of data changes, is converted to SQL statement with described change tables of data; Execution module 106 is input to the second database with described SQL statement, to carry out described SQL statement.Use the technical program, according to the variation of data change table in the database, can obtain causing the SQL statement of data variation, be input to another database and can realize the synchronous of data among heterogeneous databases.
In technique scheme, preferably, described modular converter 104 comprises: the first sub-modular converter 1042 is converted to described change tables of data in the text of specific format; The second sub-modular converter 1044 by described specific format, is described SQL statement with described text-converted.In this technical scheme, therefore the text of specific format will be applicable to different computing machines, should be comparatively general text formatting, thereby guarantees that different computing machines can resolve it, thereby can be converted into SQL statement, realize the synchronous of data.
In technique scheme, preferably, described specific format comprises the XML form.In this technical scheme, XML is one group of standard that International Standards Organization formulates, it provides a kind of method for the text formatting data of description, can usage flag, the option such as attribute comes the data of description content, it has made things convenient for and has carried out mutual information interchange between the different computing machines as a kind of public language.
In technique scheme, preferably, the described second sub-modular converter 1044 gathers a plurality of described texts, and is converted to described SQL statement.In this technical scheme, in database, gather the text of a plurality of XML forms, can concentrate to be converted to SQL statement, avoid frequent operation, improve the conversion efficiency of SQL statement, thus realize between data synchronously.
In technique scheme, preferably, described monitoring module 102 arranges trigger, to monitor the variation of described change tables of data.In this technical scheme, use trigger that the variation of change tables of data is monitored, it can catch the delta data of database in real time, and efficient is very high, and is the primary support of database, and the workload of exploitation is little, realizes simple.
Fig. 2 shows the according to an embodiment of the invention process flow diagram of heterogeneous database synchronization method.
As shown in Figure 2, heterogeneous database synchronization method according to an embodiment of the invention comprises: step 202, monitor the variation of change tables of data in the first database; Step 204 when described change tables of data changes, is converted to SQL statement with described change tables of data; Step 206 is input to the second database with described SQL statement, to carry out described SQL statement.Use the technical program, according to the variation of data change table in the database, can obtain causing the SQL statement of data variation, be input to another database and can realize the synchronous of data among heterogeneous databases.
In technique scheme, preferably, described step 204 comprises: the text that described change tables of data is converted to specific format; By described specific format, be described SQL statement with described text-converted.In this technical scheme, therefore the text of specific format will be applicable to different computing machines, should be comparatively general text formatting, thereby guarantees that different computing machines can resolve it, thereby can be converted into SQL statement, realize the synchronous of data.
In technique scheme, preferably, described specific format comprises the XML form.In this technical scheme, XML is one group of standard that International Standards Organization formulates, it provides a kind of method for the text formatting data of description, can usage flag, the option such as attribute comes the data of description content, it has made things convenient for and has carried out mutual information interchange between the different computing machines as a kind of public language.
In technique scheme, preferably, described step 204 comprises: gather a plurality of described texts, and be converted to described SQL statement.In this technical scheme, in database, gather the text of a plurality of XML forms, can concentrate to be converted to SQL statement, avoid frequent operation, improve the conversion efficiency of SQL statement, thus realize between data synchronously.
In technique scheme, preferably, described step 202 comprises: trigger is set, to monitor the variation of described change tables of data.In this technical scheme, use trigger that the variation of change tables of data is monitored, it can catch the delta data of database in real time, and efficient is very high, and is the primary support of database, and the workload of exploitation is little, realizes simple.
Fig. 3 shows the according to an embodiment of the invention particular flow sheet of heterogeneous database synchronization method.
The below is with SQL Server(database, providing the storing process mode to set up remote data base connects) database and Oracle(database, providing the DBLink mode to set up remote data base connects) data between the database are example synchronously, describe the idiographic flow of heterogeneous database synchronization method in detail:
Step 302 utilizes the JDBC(java database to connect) connected mode is connected with SQL Server Database.During successful connection, enter step 304; During connection failure, return failure cause.
Step 304, the variation of SQL Server data base manipulation trigger Real Time Monitoring change tables of data.Wherein, utilize trigger can catch in real time the delta data of database, efficient is high, and is the primary support of database, and the workload of exploitation is little, implements very simple.
Step 306 when the change tables of data changes, utilizes the DOM mode to convert XML document to it.XML is one group of standard that International Standards Organization formulates, it provides a kind of method for the text formatting data of description, can usage flag, the option such as attribute comes the data of description content, as a kind of public language, is convenient to carry out between the different computing machines mutual information interchange.
Step 308, analyzing XML file is converted into SQL statement.
Step 310 is carried out at oracle database, realizes the synchronous of data.
Step 312 is returned synchronous success status or status of fail and reason.
Fig. 4 shows the according to an embodiment of the invention process flow diagram of database trigger,
As shown in Figure 4, the idiographic flow of database trigger is as follows according to an embodiment of the invention:
Database 404 receives the DML(data manipulation language (DML)) order 402, thus database is changed, the variation of database can trigger trigger 408, causes changing tables of data 410 and changes, and this is the primary support of database, does not need extra exploitation.
Fig. 5 shows the according to an embodiment of the invention structural drawing of XML standard.
The XML file that generates need meet the XML standard, and as shown in Figure 5, the XML standard comprises: XML describes, and XML resolves, XML pattern, XML link.Wherein XML describes and comprises: Schema(is used for the logical organization of description and standard XML document), DTD(Document Type Definition, DTD (Document Type Definition)).XML resolves and comprises: DOM(Document Object Model, DOM Document Object Model), SAX (Simple API for XML, simple application programming interfaces document).The XML pattern comprises: CSS (Cascading Style Sheet, style design table), XSL (eXtensible Stylesheet Language, Extensible Stylesheet Language (XSL)).The XML link comprises: XPoint, XLink, XPath.
More than briefly introduced the XML standard, met the document of XML standard, be convenient to different system and it resolved and further obtain corresponding SQL statement.
More than be described with reference to the accompanying drawings technical scheme of the present invention, by technical scheme of the present invention, can have realized a kind of heterogeneous database synchro system and a kind of heterogeneous database synchronization method, realize between the heterogeneous database synchronously
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a heterogeneous database synchro system is characterized in that, comprising:
Monitoring module is monitored the variation of change tables of data in the first database;
Modular converter when described change tables of data changes, is converted to SQL statement with described change tables of data;
Execution module is input to the second database with described SQL statement, to carry out described SQL statement.
2. heterogeneous database synchro system according to claim 1 is characterized in that, described modular converter comprises:
The first sub-modular converter is converted to described change tables of data in the text of specific format;
The second sub-modular converter by described specific format, is described SQL statement with described text-converted.
3. heterogeneous database synchro system according to claim 2 is characterized in that, described specific format comprises the XML form.
4. heterogeneous database synchro system according to claim 2 is characterized in that, the described second sub-modular converter gathers a plurality of described texts, and is converted to described SQL statement.
5. according to claim 1 to 4 each described heterogeneous database synchro systems, it is characterized in that, described monitoring module arranges trigger, to monitor the variation of described change tables of data.
6. a heterogeneous database synchronization method is characterized in that, comprising:
Step 202 is monitored the variation of change tables of data in the first database;
Step 204 when described change tables of data changes, is converted to SQL statement with described change tables of data;
Step 206 is input to the second database with described SQL statement, to carry out described SQL statement.
7. heterogeneous database synchronization method according to claim 6 is characterized in that, described step 204 comprises:
Described change tables of data is converted to the text of specific format;
By described specific format, be described SQL statement with described text-converted.
8. heterogeneous database synchronization method according to claim 7 is characterized in that, described specific format comprises the XML form.
9. heterogeneous database synchronization method according to claim 7 is characterized in that, described step 204 comprises:
Gather a plurality of described texts, and be converted to described SQL statement.
10. each described heterogeneous database synchronization method in 9 according to claim 6 is characterized in that, described step 202 comprises:
Trigger is set, to monitor the variation of described change tables of data.
CN2012104375750A 2012-11-06 2012-11-06 Heterogeneous database synchronizing system and heterogeneous database synchronizing method Pending CN103020112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104375750A CN103020112A (en) 2012-11-06 2012-11-06 Heterogeneous database synchronizing system and heterogeneous database synchronizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104375750A CN103020112A (en) 2012-11-06 2012-11-06 Heterogeneous database synchronizing system and heterogeneous database synchronizing method

Publications (1)

Publication Number Publication Date
CN103020112A true CN103020112A (en) 2013-04-03

Family

ID=47968716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104375750A Pending CN103020112A (en) 2012-11-06 2012-11-06 Heterogeneous database synchronizing system and heterogeneous database synchronizing method

Country Status (1)

Country Link
CN (1) CN103020112A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685543A (en) * 2013-12-23 2014-03-26 中国电子科技集团公司第三十研究所 Method and system for data synchronism between heterogeneous databases
CN103984715A (en) * 2014-05-08 2014-08-13 武汉库百网络技术有限公司 Data synchronizing and checking method, device and system of isomerous database
CN104598531A (en) * 2014-12-25 2015-05-06 广东电子工业研究院有限公司 Incremental data migration method among heterogeneous relational databases based on trigger
CN105824865A (en) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 Distributed type database data synchronization system
CN108108431A (en) * 2017-12-19 2018-06-01 中国民航信息网络股份有限公司 Method of data synchronization and system
CN108228814A (en) * 2017-12-29 2018-06-29 泰康保险集团股份有限公司 Method of data synchronization and device
CN108334621A (en) * 2018-02-08 2018-07-27 平安科技(深圳)有限公司 Database operation method, device, equipment and computer readable storage medium
CN110727693A (en) * 2018-07-16 2020-01-24 中兴通讯股份有限公司 Method, device, equipment, plug-in and storage medium for accessing heterogeneous database
CN115391457A (en) * 2022-08-23 2022-11-25 昆仑数智科技有限责任公司 Cross-database data synchronization method and device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615199A (en) * 2009-07-31 2009-12-30 深圳市珍爱网信息技术有限公司 Heterogeneous database synchronization method and system
CN102063502A (en) * 2011-01-06 2011-05-18 天津神舟通用数据技术有限公司 Method for realizing synchronization of data in heterogeneous database
CN102129478A (en) * 2011-04-26 2011-07-20 广州从兴电子开发有限公司 Database synchronization method and system thereof
CN102567330A (en) * 2010-12-15 2012-07-11 上海杉达学院 Heterogeneous database integration system
CN102567333A (en) * 2010-12-15 2012-07-11 上海杉达学院 Distributed heterogeneous data integration system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615199A (en) * 2009-07-31 2009-12-30 深圳市珍爱网信息技术有限公司 Heterogeneous database synchronization method and system
CN102567330A (en) * 2010-12-15 2012-07-11 上海杉达学院 Heterogeneous database integration system
CN102567333A (en) * 2010-12-15 2012-07-11 上海杉达学院 Distributed heterogeneous data integration system
CN102063502A (en) * 2011-01-06 2011-05-18 天津神舟通用数据技术有限公司 Method for realizing synchronization of data in heterogeneous database
CN102129478A (en) * 2011-04-26 2011-07-20 广州从兴电子开发有限公司 Database synchronization method and system thereof

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685543A (en) * 2013-12-23 2014-03-26 中国电子科技集团公司第三十研究所 Method and system for data synchronism between heterogeneous databases
CN103984715A (en) * 2014-05-08 2014-08-13 武汉库百网络技术有限公司 Data synchronizing and checking method, device and system of isomerous database
CN103984715B (en) * 2014-05-08 2017-04-12 武汉库百网络技术有限公司 Data synchronizing and checking method, device and system of isomerous database
CN104598531B (en) * 2014-12-25 2019-05-07 广东电子工业研究院有限公司 Incremental data moving method between a kind of isomeric relationship type database based on trigger
CN104598531A (en) * 2014-12-25 2015-05-06 广东电子工业研究院有限公司 Incremental data migration method among heterogeneous relational databases based on trigger
CN105824865A (en) * 2015-12-09 2016-08-03 广东亿迅科技有限公司 Distributed type database data synchronization system
CN108108431A (en) * 2017-12-19 2018-06-01 中国民航信息网络股份有限公司 Method of data synchronization and system
CN108228814A (en) * 2017-12-29 2018-06-29 泰康保险集团股份有限公司 Method of data synchronization and device
CN108228814B (en) * 2017-12-29 2022-02-15 泰康保险集团股份有限公司 Data synchronization method and device
CN108334621A (en) * 2018-02-08 2018-07-27 平安科技(深圳)有限公司 Database operation method, device, equipment and computer readable storage medium
WO2019153547A1 (en) * 2018-02-08 2019-08-15 平安科技(深圳)有限公司 Database operation method, apparatus and device, and computer-readable storage medium
CN110727693A (en) * 2018-07-16 2020-01-24 中兴通讯股份有限公司 Method, device, equipment, plug-in and storage medium for accessing heterogeneous database
CN115391457A (en) * 2022-08-23 2022-11-25 昆仑数智科技有限责任公司 Cross-database data synchronization method and device and storage medium
CN115391457B (en) * 2022-08-23 2023-09-12 昆仑数智科技有限责任公司 Cross-database data synchronization method, device and storage medium

Similar Documents

Publication Publication Date Title
CN103020112A (en) Heterogeneous database synchronizing system and heterogeneous database synchronizing method
CN106528129B (en) A kind of Web application interface generation system and method
CN102663103B (en) Configurable method for automatically generating database and accessing data
CN101751382B (en) Data acquisition method based on labels and system thereof
CN103294796B (en) Self-defined XML structure list implementation method in a kind of XML analytic method and medical medical record
CN104182911A (en) Calibration method for realizing CIM (Common Information Model) consistency of power distribution network system
CN103729463A (en) Method for implementing full-text retrieval based on Lucene and Solr
CN103019728A (en) Effective complex report parsing engine and parsing method thereof
CN101609399A (en) Intelligent website development system and method based on modeling
CN103064916B (en) EminDI Data Integration engine and report form generation method
CN107622055A (en) A kind of quick method for realizing data, services issue
Fan et al. A middleware of Internet of Things (IoT) based on Zigbee and RFID
CN105278961A (en) Method and system for generating database table structure document
US8762398B2 (en) Method of integrating data of XML document with database on web
CN102207837A (en) Method and system for acquiring data based on virtual printing manner
CN105550176A (en) Basic mapping method for relational database and XML
CN106682230A (en) Information service system based on HTML5 and CSS3 mobile display technological architecture
CN103399746B (en) Information management system convenient to develop secondarily and development method
CN103353898B (en) The treatment system that a kind of system data transform to CIM XML format
CN103778118A (en) SQL (Structured Query Language)-based method of converting XML (X Exrensible Markup Language) to relational data bases
Jumaa et al. XML based mediation for automating the storage of SCP-ECG data into relational databases
Guoliang et al. Research on IETM Data Processing Based on XML
CN103092591A (en) XML (Extensive Makeup Language) and Web Service based data integration middleware method
Xu The application of heterogeneous database general query in digital campus
CN106560802A (en) Relational database and WEB data mapping method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130403