CN101526940A - Method for synchronizing data of physical database and main memory database of application system - Google Patents

Method for synchronizing data of physical database and main memory database of application system Download PDF

Info

Publication number
CN101526940A
CN101526940A CN200810066308A CN200810066308A CN101526940A CN 101526940 A CN101526940 A CN 101526940A CN 200810066308 A CN200810066308 A CN 200810066308A CN 200810066308 A CN200810066308 A CN 200810066308A CN 101526940 A CN101526940 A CN 101526940A
Authority
CN
China
Prior art keywords
data
database
application system
memory database
sync
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.)
Granted
Application number
CN200810066308A
Other languages
Chinese (zh)
Other versions
CN101526940B (en
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 Corp
Original Assignee
ZTE Corp
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 Corp filed Critical ZTE Corp
Priority to CN2008100663080A priority Critical patent/CN101526940B/en
Publication of CN101526940A publication Critical patent/CN101526940A/en
Application granted granted Critical
Publication of CN101526940B publication Critical patent/CN101526940B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a method for synchronizing data of a physical database and a main memory database of an application system, which is used in a life cycle of the application system and comprises the following steps that: the application system runs a required main memory database table to set a data storing process used for realizing new increase of data, and a data deleting process used for realizing data deletion; the data storing process and the data deleting process of the main memory database table are adopted to realize an atom synchronization process of data synchronization for each table; a list synchronization process of the data synchronization is realized on the basis of the atom synchronization process; and a master-control synchronization process for controlling synchronization of all table data is realized on the basis of the list synchronization process. The method fully utilized characteristics of the database table requiring the operation of synchronizing data in the main memory database, realizes any data synchronization operation between database tables needing synchronizing the data of the physical database and the main memory database under the online condition, and greatly strengthens the reliability of application.

Description

The method of data synchronization of a kind of application system physical database and memory database
Technical field
The present invention relates to the method that relational database is used in a kind of research and development of software field, in particular a kind of relationship memory database that utilizes improves data retrieval performance and solution and the synchronous method of physical relation database data.
Background technology
The relational database management system of prior art is one of most crucial ingredient in the industrial application software field, it mainly is responsible for the various data that produce in the application process are carried out persistence, these data are carried out association by the various relational models that are based upon in the database, and provide special standardized structural procedural language method (SQL, Structured Query Language) to come data are increased, delete, revise and inquire about.
Along with the develop rapidly of computer application software technology, all trades and professions have been set up numerous, and are varied, various application systems, some application system even moved the several years continuously.The develop rapidly of client amount and portfolio causes the big bang of information, and causes that the relation between each model is complicated day by day in the database of these application systems.
Relation causes the retrieval rate of data to reach insufferable degree between the data of magnanimity and complicated model.Even database technology also is with rapid changepl. never-ending changes and improvements, each database manufacturer has also used level best up to this situation, but can't solve this realistic problem fully.
Each application software developer attempts to solve this problem by other approach, has occurred this simplification relational database system with respect to physical database of memory database thus.The same with the physics relational database, relation in the memory database between each data is also set up with relational model, equally also support structuring query language (SQL), but maximum difference is that model and data that they are all leave in the internal memory, insert, delete and revise and all carry out in internal memory, this has just accelerated the renewal and the retrieval rate (particularly retrieval rate) of database greatly.
Therefore, based on so a kind of technology, a lot of application software projects are just retrieving frequent and complicated deposit data in memory database, operate in internal memory by structurized query language then, so just improve the speed of retrieval greatly, improved the operational efficiency of application system.
The use of memory database technology has improved the efficient that application system is handled and moved really greatly, but along with going deep into of system's operation, data constantly change and upgrade, just various complicated problems occurred, wherein one of distinct issues are the data synchronization problems of memory database and physical database.
Below from the whole service life-cycle processes that application system starts, moves, stops, physical database that the angle analysis of the whole life that data exist in database may exist and the data synchronization problems between memory database:
(1) application system starts
Need during startup being synchronized to the memory database from physical database by the data of main memory DBM, thus in system starting process or when for the first time using data, by software code flow process control, the data sync in the physical database in memory database.At this moment can find whether to occur in the synchronizing process unusual by exception catching mechanism.
It is as follows unusual situation to occur:
1. code issue
This can realize repairing unusually by repairing code early stage, does not have the process exception problem.
2. physical database and memory database spatial database entity object structure are inconsistent
This can repair entity object structure between two kinds of databases by early stage unusually, they is consistent solves problem, does not have the use abnormal problem.
3. start data sync aborted midway
This may cause the success of data sync part unusually, and data synchronization mechanism realization data sync again need be provided.
(2) application system is in service
In system's operational process, application data is along with deeply constantly changing of using, as the increasing, delete, change of data, just this moment occurred complicated physical database and the data synchronization problems of memory database when data change.Situation is enumerated as follows:
1. data are newly-increased
The only newly-increased physical database of i, not newly-increased memory database;
The only newly-increased memory database of ii, not newly-increased physical database;
2. data modification
I only revises physical database, does not revise memory database;
Ii only revises memory database, does not revise physical database;
3. data deletion
I deletion of physically database do not deleted memory database;
Ii only deletes memory database, does not have the deletion of physically database;
More than three kinds of data sync have following several situation unusually:
1.. code issue
This can realize repairing unusually by repairing code early stage, does not have the use abnormal problem.
2.. physical database and memory database spatial database entity object structure are inconsistent
This can repair that the entity object structure is consistent between two kinds of databases deals with problems by early stage unusually, does not have the process exception problem.
3.. not by application system, directly insert data from physical database
Online data synchronization mechanism need be provided, and the system that do not influence normally moves synchrodata
4.. not by application system, directly revise data from physical database
Online data synchronization mechanism need be provided, and the system that do not influence normally moves synchrodata.
5.. not by application system, directly from the physical database deleted data
Online data synchronization mechanism need be provided, and the system that do not influence normally moves synchrodata.
(3) stop application system
There is not data synchronization problems in the application system shut-down operation, only needs to reclaim internal memory by virtual machine or operating system in using stopped process, and model and the data of removing in the memory database automatically get final product simultaneously.
To sum up, in the whole life process of prior art application system, from system start-up, run to and stop, Fu Za data variation process abrim, thereby the data that can cause memory database and physical database are inconsistent, cause the application system operation exception, cause system's fluctuation of service.
Therefore, also there is defective in prior art, and awaits improving and development.
Summary of the invention
The method of data synchronization that the purpose of this invention is to provide a kind of application system physical database and memory database, when in the industrial application software design, being applied to physical relation database and relationship memory database technology in order to overcome, the asynchronous problem of the data that may exist between the two, designing a kind of perfect method of data synchronization avoids guaranteeing the normal operation of system owing to the asynchronous application problem that causes of data.
Technical scheme of the present invention comprises:
The method of data synchronization of a kind of application system physical database and memory database is used in the life cycle of this application system, and may further comprise the steps:
The required main memory database table of A, application system operation is provided with one and is used to realize that the newly-increased data of data preserve process, and a data deletion process that is used to realize data deletion;
B, employing show to realize the atom synchronizing process of a data sync to the data preservation process and the data deletion process of main memory database table for each;
C, on described atom synchronizing process basis, realize the class table synchronizing process of data sync;
D, on class table synchronizing process basis, realize master control synchronizing processes of all table data sync of control.
Described method, wherein, described step B comprises:
For whether synchronous each table be provided with a sync id, and this sync id is judged whether synchronous in B2, the application system;
If the described sign of B3 is not synchronous, then delete all records of this table in the memory database;
B4, obtain all records of this table in the described physical database, and be saved in the corresponding tables of described memory database;
B5 and be provided with change this table sync id for synchronous.
Described method, wherein, before described step B2, also carry out:
B1, lock for the data sync operating process of this table; And, after described step B5, carry out:
B6, to this data sync operating process release.
Described method wherein, also comprises step:
E, design corresponding interface and realize that a key data is synchronous, call described atom synchronizing process, class table synchronizing process and master control synchronizing process respectively according to using actual conditions.
Described method, wherein, described application system is a telecommunications OSS field integrated network activation system.
Described method, wherein, the class table of described application system comprises: static list of data, rule list, and command list.
Described method, wherein, the table of described application system comprises: the single type list of worker, NE type table, type of service table, business rule table, transformation rule table, instantiation rule list and command template table.
The method of data synchronization of a kind of application system physical database provided by the present invention and memory database, owing to made full use of the characteristic that to carry out memory database data synchronous operation storehouse table, needing arbitrarily under the online situation to realize the data sync between physical database and the synchronous storehouse of memory database data table to operate, strengthened reliability of applying greatly.
Description of drawings
Fig. 1 is the synchronous process flow diagram of atom of the method for data synchronization of application system physical database of the present invention and memory database;
Fig. 2 is the class table synchronizing process figure of the method for data synchronization of application system physical database of the present invention and memory database;
Fig. 3 is the master control synchronizing process figure of the method for data synchronization of application system physical database of the present invention and memory database;
Fig. 4 is the INTERFACE DESIGN method figure of the method for data synchronization of application system physical database of the present invention and memory database.
Embodiment
Below in conjunction with accompanying drawing, will be described in more detail each preferred embodiment of the present invention.
The method of data synchronization of application system physical database of the present invention and memory database is by the research summary to the application system that is applied to physical relation database and relationship memory database, and discovery need be synchronized to it memory database from physical database generally has following characteristic with the storehouse table that improves application performance:
1, in key business, frequently uses;
2, inquiry mode is complicated;
3, table factor in big data quantity storehouse too much is not suitable for memory-resident according to committed memory, so data volume is generally not huge;
4, often related with the big data quantity database table.
But the database table that meets these characteristics generally has typical classification features attribute, and a kind of saying of more pressing close to application system is that rule, order or the static data of general main storage application need shown in these storehouses.The application rule of storing in the rule list need be in the applied logic process be frequently used, judge applied logic possible move towards flow process; The static data of storing in the static list of data has generally shown parameter coding, title or other attribute that application system is often used, and these static datas are generally often related with large data volume table to present title associated with the data or attribute in the inquiry of big data quantity.The structure of these storehouse tables is generally all more fixing in the application system of a good design, just can occur the variation of data in the use, as: increase, delete, change etc.
Like this, a physical data database data and memory database data synchronizing process are write in data variation such as the additions and deletions that the inventive method can be every table with these features change operation, abbreviate the atom synchronizing process as at this, can finish the data sync of a certain class table then according to the combinations of attributes sorted out (or combination in any) the atom synchronizing process of these tables, abbreviate class table synchronizing process as at this, then can utilize the combination of class table synchronizing process to control need be by the data sync of all synchronous tables, and being called for short this process at this is the master control synchronizing process.
The inventive method is in application system startup, operational process; object structure causes unusually between unusual or non-physical database of non-code and memory database two kinds of database datas occur when inconsistent, can needing realize synchronous storehouse table to carry out the data sync operation by calling these processes.
Be applied as example with integrated network activation system in the telecommunications OSS field below, the implementation procedure of the inventive method technical scheme is described.
Integrated network activates to telecom operation and supports the activation part of field integrated network in opening, and it mainly is responsible for according to construction worker list telecommunication service being opened or being changed.In application process, need to be applied to some static datas or business rule, be exemplified below:
1.. static list of data:
The single type list of worker,
The NE type table,
Type of service table etc.;
2.. rule list:
The business rule table,
The transformation rule table,
Instantiation rule list etc.
3.. command list
The command template table.
The inventive method is as follows to the physical database and the synchronous performing step of memory database data of this three classes table:
Step 1, for the single type list of worker, NE type table, type of service table, business rule table, transformation rule table, instantiation rule list, command template table etc. design a data store method respectively, this method can realize the newly-increased of data.
Step 2, for the single type list of worker, NE type table, type of service table, business rule table, transformation rule table, instantiation rule list, command template table etc. design a data delet method respectively, this method can realize the deletion of data.
Step 3, in step 1, be respectively each table on the basis of step 2 and realize a data method for synchronous, this method is the atom synchronizing process, the realization flow of atom synchronizing process is as shown in Figure 1.
Step 4, on the atom synchronizing process basis that step 3 realizes, realize static data, rule respectively and order the class table synchronizing process of three class tables that the implementation procedure of class table synchronizing process is as shown in Figure 2.
Step 5, on the class table synchronizing process basis that step 4 realizes, realize the master control synchronizing process of all static list of data of control, rule list, command list data, the implementation procedure of this master control synchronizing process as shown in Figure 3.
Step 6, design data synchronization interface, can design corresponding interface according to the application actual conditions and realize that a key data is synchronous, these synchronization interface can realize each data synchronization process by invocation step three, step 4, step 5, and its Interface Design method as shown in Figure 4.
Be illustrated in figure 1 as the process flow diagram of atom synchronizing process of the present invention, wherein specifically comprise:
Step 101, for this operating process locks, to guarantee the exclusiveness of this flow process, cause the confusion of data to prevent the same operation of other process or thread execution;
For whether synchronous every table be provided with a sign, and this sign is judged whether synchronous in step 102, the application system; If the judged result that should show then forwards step 107 release to for synchronous, finish then;
All records that should show in step 103, the deletion memory database;
Step 104, obtain all records of this table in the physical database, and be saved in the tabulation;
Step 105, the change record tabulation circulation that described step 104 is got access to are saved in this table of memory database;
Step 106, the sync id of change is set for synchronous;
Step 107, release;
Step 108, end.
Be illustrated in figure 2 as the class table synchronizing process of the inventive method, it is that example describes that this figure activates with the integrated network in the technical scheme, comprising concrete steps:
Step 201, synchronous service rule list are to memory database;
Step 2011, the sync id of business rule table is set for not synchronous;
Step 2012, atom synchronizing process this table data synchronously of calling the business rule table, synchronously after this table corresponding identification be changed to synchronous.
Step 202, synchronous transformation rule table are to memory database, and concrete steps are finished the data synchronization process of this synchronous transformation rule table with reference to step 2011 and 2012.
Step 203, synchronous instantiation rule list are to memory database, and concrete steps are finished the data synchronization process of this synchronous instantiation rule list with reference to step 2011 and 2012
Carry out the data synchronization process of follow-up each table successively, its process comprises that the synchronous flow process in the inside of step 202, step 203 is all similar with step 201; And, in actual applications, step 201,202,203 and data synchronization process of other each table between all do not have ordinal relation, can change arbitrarily.
Be illustrated in figure 3 as the master control synchronizing process figure of the inventive method, comprising following concrete steps:
Step 301, call the rule class table synchronizing process;
Step 302, call the class table synchronizing process of static data;
The class table synchronizing process of step 303, call instruction table;
If any other class tables, carry out the synchronous master control process of class table successively.In actual applications, described step 301,302,303 and other possible class table synchronizing processes between all do not have ordinal relation, can change arbitrarily.
Be illustrated in figure 4 as the INTERFACE DESIGN method synoptic diagram of the inventive method, when design interface, need interface at all levels, comprising: the single table of design synchronization interface, can call the atom synchronizing process; Design the synchronization interface of a certain class table, can call class table synchronizing process; Design the synchronization interface of all tables, can call the master control synchronizing process.
The present invention shows data sync as atomic operation with list, and then can be arbitrarily made with the data sync operation of multilist and the data sync master control operation of all tables, and can design corresponding data synchronization interface button, need the data sync of sync database table by one-key operation.
The inventive method has made full use of the characteristic that need carry out memory database data synchronous operation storehouse table, data synchronization is operated the atom synchronous operation that is decomposed into every table, can be arbitrarily made with the data sync operation of a class table or all tables again by the atom synchronous operation of each table, and in synchronizing process, add lock mechanism to guarantee the exclusiveness of data sync, strengthened the security of synchronizing process.
And according to the software project actual conditions, atom synchronous operation can be combined into the synchronous operation of a certain class table or all tables, can call the method for synchronous of corresponding atom synchronizing process or a certain class libraries table or total control method of all storehouses table during application, just can realize under the online situation, need the data sync operation between the table of the synchronous storehouse of physical database and memory database data arbitrarily, strengthen reliability of applying greatly, and can utilize this method to realize the not off-line physical data database data and the memory database data synchronous operation of data upgrading in the software upgrade process.
Should be noted that; above-mentioned description to preferred embodiment of the present invention is comparatively concrete; but can not therefore think restriction to scope of patent protection of the present invention; for those skilled in the art; under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as within the protection domain of claims of the present invention.

Claims (7)

1, the method for data synchronization of a kind of application system physical database and memory database is used in the life cycle of this application system, and may further comprise the steps:
The required main memory database table of A, application system operation is provided with one and is used to realize that the newly-increased data of data preserve process, and a data deletion process that is used to realize data deletion;
B, employing show to realize the atom synchronizing process of a data sync to the data preservation process and the data deletion process of main memory database table for each;
C, on described atom synchronizing process basis, realize the class table synchronizing process of data sync;
D, on class table synchronizing process basis, realize master control synchronizing processes of all table data sync of control.
2, method according to claim 1 is characterized in that, described step B comprises:
For whether synchronous each table be provided with a sync id, and this sync id is judged whether synchronous in B2, the application system;
If the described sign of B3 is not synchronous, then delete all records of this table in the memory database;
B4, obtain all records of this table in the described physical database, and be saved in the corresponding tables of described memory database;
B5 and be provided with change this table sync id for synchronous.
3, method according to claim 2 is characterized in that, also carries out before described step B2:
B1, lock for the data sync operating process of this table; And, after described step B5, carry out:
B6, to this data sync operating process release.
4, method according to claim 1 is characterized in that, also comprises step:
E, design corresponding interface and realize that a key data is synchronous, call described atom synchronizing process, class table synchronizing process and master control synchronizing process respectively according to using actual conditions.
5, method according to claim 1 and 2 is characterized in that, described application system is a telecommunications OSS field integrated network activation system.
6, method according to claim 5 is characterized in that, the class table of described application system comprises: static list of data, rule list, and command list.
7, method according to claim 6 is characterized in that, the table of described application system comprises: the single type list of worker, NE type table, type of service table, business rule table, transformation rule table, instantiation rule list and command template table.
CN2008100663080A 2008-03-19 2008-03-19 Method for synchronizing data of physical database and main memory database of application system Expired - Fee Related CN101526940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100663080A CN101526940B (en) 2008-03-19 2008-03-19 Method for synchronizing data of physical database and main memory database of application system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100663080A CN101526940B (en) 2008-03-19 2008-03-19 Method for synchronizing data of physical database and main memory database of application system

Publications (2)

Publication Number Publication Date
CN101526940A true CN101526940A (en) 2009-09-09
CN101526940B CN101526940B (en) 2011-03-16

Family

ID=41094807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100663080A Expired - Fee Related CN101526940B (en) 2008-03-19 2008-03-19 Method for synchronizing data of physical database and main memory database of application system

Country Status (1)

Country Link
CN (1) CN101526940B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158345A (en) * 2010-06-23 2011-08-17 青岛海信传媒网络技术有限公司 Method, device and system for data management
CN110390969A (en) * 2019-06-28 2019-10-29 苏州浪潮智能科技有限公司 A kind of method and system for realizing atomic write
CN112035463A (en) * 2020-07-22 2020-12-04 武汉达梦数据库有限公司 Bidirectional synchronization method and synchronization device of heterogeneous database based on log analysis

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636372B (en) * 2013-11-11 2019-04-26 中兴通讯股份有限公司 The method and device of big data quantity processing is realized based on table

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1286288C (en) * 2004-03-04 2006-11-22 中兴通讯股份有限公司 Method of internal data base main-spare synchronous
US9009116B2 (en) * 2006-03-28 2015-04-14 Oracle America, Inc. Systems and methods for synchronizing data in a cache and database

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158345A (en) * 2010-06-23 2011-08-17 青岛海信传媒网络技术有限公司 Method, device and system for data management
CN102158345B (en) * 2010-06-23 2013-06-05 青岛海信传媒网络技术有限公司 Method, device and system for data management
CN110390969A (en) * 2019-06-28 2019-10-29 苏州浪潮智能科技有限公司 A kind of method and system for realizing atomic write
CN112035463A (en) * 2020-07-22 2020-12-04 武汉达梦数据库有限公司 Bidirectional synchronization method and synchronization device of heterogeneous database based on log analysis
CN112035463B (en) * 2020-07-22 2023-07-21 武汉达梦数据库股份有限公司 Bidirectional synchronization method and synchronization device of heterogeneous database based on log analysis

Also Published As

Publication number Publication date
CN101526940B (en) 2011-03-16

Similar Documents

Publication Publication Date Title
US6418450B2 (en) Data warehouse programs architecture
EP2477355B1 (en) Method and device for managing association of network resources
US9892185B2 (en) Method and system for syncing data structures
CN105447122A (en) Implementation method for autonomously creating file system based on multi-table association
US8032493B2 (en) System and method of obtaining interrelated data in a database
CN101201753A (en) Method for configuring and managing multimode machine supervising engine
US20200065313A1 (en) Extensible content object metadata
EP2335147A1 (en) Synchronization of relational databases with olap cubes
CN102054034A (en) Implementation method for business basic data persistence of enterprise information system
CN101526940B (en) Method for synchronizing data of physical database and main memory database of application system
CN101730099A (en) Terminal management method based on authority control and device
US20020091705A1 (en) Object integrated management system
CN103036855A (en) Achievement device and method of authority management
US20100050267A1 (en) Method and system for the automated transformation of access control management information in computer systems
CN109657803B (en) Construction of machine learning models
CN109947741A (en) A kind of modeling and storage method of items property parameters
US7805462B2 (en) Portfolio management methods, systems, and computer programs
CN102054041B (en) Method and system for upgrading metadata
CN112785248B (en) Human resource data cross-organization interaction method, device, equipment and storage medium
CN115510072A (en) Main data engine based on multi-tenant SaaS application platform
US8560572B2 (en) System for lightweight objects
CN1251121C (en) Method for realizing maintenance interface system
CN111680036B (en) Configuration management database based on graph storage
CN114493493A (en) Decision engine and decision engine implementation method
US20080059468A1 (en) Method, system, and program product for grouping statements against database objects

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110316

Termination date: 20180319