CN100373384C - Conflict-free method for reliable download of remote data base and use of local database - Google Patents

Conflict-free method for reliable download of remote data base and use of local database Download PDF

Info

Publication number
CN100373384C
CN100373384C CNB2006100426194A CN200610042619A CN100373384C CN 100373384 C CN100373384 C CN 100373384C CN B2006100426194 A CNB2006100426194 A CN B2006100426194A CN 200610042619 A CN200610042619 A CN 200610042619A CN 100373384 C CN100373384 C CN 100373384C
Authority
CN
China
Prior art keywords
data
download
local
database
data base
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.)
Expired - Fee Related
Application number
CNB2006100426194A
Other languages
Chinese (zh)
Other versions
CN1828601A (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.)
Xian University of Technology
Original Assignee
Xian University of Technology
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 Xian University of Technology filed Critical Xian University of Technology
Priority to CNB2006100426194A priority Critical patent/CN100373384C/en
Publication of CN1828601A publication Critical patent/CN1828601A/en
Application granted granted Critical
Publication of CN100373384C publication Critical patent/CN100373384C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a conflict-free method for reliably downloading a remote database and using a local database. The remote database is taken as a downloading source of the local data. A downloading database and an application database are respectively created on a downloading server and an application server by using an MS SQL Server and Oracle or Sybase database management system. The downloading database is in charge of the remote data which is downloaded from the remote database and saved. Data of the application database is updated by the downloading database in order to provide data manipulation service for local users to use. The present invention can automatically and periodically download required data from a remote database server to avoid downloading repeatedly after a task is interrupted because of an objective cause. The data of the application database is updated by the downloading database in order to provide data manipulation service for local users to use. Thus, a collision between remote data downloading and local use is avoided. In addition, the downloading database is a backup database of the application database simultaneously to prevent the data of the application database missing accidentally.

Description

The conflict free method of use of the reliable download of remote data base and local data base
Technical field
The invention belongs to database application, develop computer software field, relate to a kind of reliable download of remote data base and the conflict free method of use of local data base.
Background technology
At present, database technology become every profession and trade, each enterprise carry out data management indispensable technology.For numerous chaebols, its scope of business is extensive, and branch office spreads all over the country even a plurality of areas, the world, and how utilizing network-efficient rate ground transmission data and using teledata is a stubborn problem.The branch office of large-scale group disperses in various places to commence business usually, and the business datum that need use is made up of local data and teledata mostly.Local data is set up the local data library storage by branch office, teledata is then set up a concentrated remote data base by main office and is managed, in general, local database server is positioned at each branch office location, and remote database server then is positioned at the main office location.Branch office uses teledata if desired, then is connected to remote database server and obtains data.
In the practical application, there are following two problems in the download of teledata:
1. jumbo teledata downloads to local the needs than the long time, simultaneously owing to the instability of communication link, the technical failure of remote database server and the reasons such as overload of database server cause the low or failure of teledata download efficiency.
2. the downloading task of teledata can occupy local database server than large resource, therefore can use local data base to produce with local application and conflict.
Summary of the invention
Defective or deficiency at the existence of above-mentioned background technology, the object of the invention is, a kind of reliable download of remote data base and the conflict free method of use of local data base are provided, and this method can be avoided the conflict between teledata download and local the use, improves downloading efficiency and reliability.
In order to realize above-mentioned task, the present invention takes following technical solution:
The conflict free method of use of a kind of reliable download of remote data base and local data base is characterized in that this method comprises:
With the loading source of remote data base as local data, comprise the long-range table 1 that structure is known and fixing in the remote data base, long-range table 2, long-range table n, wherein n represents natural number, adopt MS SQLServer, Oracle or sybase database management system are being created application data base on establishment data download storehouse and the application server in this locality on the Download Server of this locality respectively, the data download storehouse is responsible for downloading and preserve teledata from remote data base, application data base regularly passes through more new data of data download storehouse, for local user's use provides the data manipulation service, application program comprises first application program that runs on the Download Server and runs on second application program on the application server;
First application program is used to finish the task from the remote data base data download to local data download storehouse, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Create data and download function d ownloading, write the open event code and the timer event code of main window, wherein data pipe is a plurality of, its quantity is determined by the quantity of subtask, a data pipeline connects a long-range table, and the mode of operation of table pipeline is selected Replace-Drop/Add Table mode;
Second application program is used to finish the task from local data download storehouse copy data to local application data base, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Write the open event code and the timer event code of main window; Wherein the mode of operation of data pipe is selected Append-Insert Rows mode;
In application data base, set up local replica table 1 according to local service, local replica table 2 ..., local replica table n; Wherein n represents natural number, sets up the task record table in the data download storehouse, and the field of task record table comprises download date, download successfully and indicate, download subtask complement mark, task download time, data and duplicate successfully sign;
The basic procedure that data are downloaded is: with the single long-range table in the remote data base is unit, subtask as downloading task, the data pipe function of utilizing Powerbuilder 9.0 to provide downloads to the long-range table in the remote data base the local data download storehouse from remote data base earlier successively, uses data pipe that data are copied to the local application data base from local data download storehouse then.
Method of the present invention can regularly be downloaded desired data from remote database server automatically, avoided because the repeated downloads after odjective cause (as interrupted communication link, the outage etc.) interrupt task, application data base regularly passes through more new data of data download storehouse, for local user's use provides the data manipulation service, so just avoided teledata download and local the use between conflict.In addition, the data download storehouse also is the backup database of application data base simultaneously, has the function that prevents that application data database data accident from losing.
Description of drawings
Fig. 1 is the database structure synoptic diagram;
Fig. 2 downloads the function process flow diagram for data;
Fig. 3 downloads main program flow chart for data;
Fig. 4 duplicates main program flow chart for data.
Below in conjunction with accompanying drawing and inventor provide specific embodiment the present invention is described in further detail.
Embodiment
Local data base is created and management by MS SQL Server 2000, and application program is used Powerbuilder 9.0 exploitations.
Database structure as shown in Figure 1, remote data base is the loading source of local data, its list structure is known, and fixing.Adopt MS SQL Server 2000 data base management system (DBMS)s to go up at the two-server (Download Server and application server) of this locality respectively and create data download storehouse and application data base, and in application data base, set up local replica table 1 according to local service, local replica table 2,, local replica table n.In addition, set up the task record table in the data download storehouse, the field of task record table comprises download date, download successfully and indicate, download subtask complement mark, task download time, data and duplicate successfully sign.The basic procedure that data are downloaded is: with individual data storehouse table (long-range table 1, long-range table 2, long-range table n) be unit, subtask as downloading task, the data pipe function of utilizing Powerbuilder 9.0 to provide downloads to the long-range table in the remote data base the local data download storehouse from remote data base earlier successively, uses data pipe that data are copied to the local application data base from local data download storehouse then.
Application program comprises first application program that runs on the Download Server and second application program that runs on the application server.
First application program is mainly finished the task from the remote data base data download to local data download storehouse, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Create data and download function d ownloading (p 1, p 2... p n); Write the open event code and the timer event code of main window.Wherein data pipe is a plurality of, and its quantity is determined by the quantity of subtask.A data pipeline connects a long-range table, and the mode of operation of table pipeline is selected the Replace-Drop/AddTable mode.
Data are downloaded function d ownloading (p 1, p 2... p n) be used to realize call data unload function for master routine.This function process flow diagram as shown in Figure 2, function definition integer variable li_flag, and initialize 1.Process flow diagram has shown the complete process of subtask i in the dotted line.The parameter Pi that imports into has represented whether subtask i finishes, if Pi is 1, then continues next subtask; If be not 1, then use data pipe to carry out this subtask.The subtask is if complete successfully, then the sign of this subtask in the updating task record sheet; If variable li_flag assignment 0 is given in the subtask failure.When finishing all subtasks, judge the value of li_flag, if 1, showing that all subtasks all complete successfully, the download in the updating task record sheet at this moment successfully indicates.
Open the script window of main window, write open event code and timer event code respectively.In the open event code, trigger the timer incident, start master routine; The timer event code is the main program of this system, and accompanying drawing 3 is its process flow diagram, below this process flow diagram is done some explanation.
1. current date is a task record table newest date: newest date and current date in the download date field in the comparison task record sheet.
2. download and successfully be masked as 1: downloading successful attribute field data type in the task record table is integer, and 1 expression is downloaded successfully, and not success is downloaded in 0 expression.
3. call and download function d ownloading (p 1, p 2... p n), function parameter is determined according to subtask complement mark in the task record table: complement mark data type in subtask is an integer in the task record table, and finish 1 sign subtask, and 0 expression is not finished.When calling downloading () function, get subtask complement mark and judgement in the task record table, if the subtask is masked as 1, then corresponding downloading () function parameter is 0; Otherwise be 1.
4. add newly downloaded record in the task record sheet: if current date is not the record sheet newest date, add new Download History in the task record sheet: the download date field is a current date; Download successful attribute field and put 0; The subtask is downloaded successful attribute field and is all put 0; Data success attribute field puts 0.
5. start timer: after the time of setting, start master routine once more.
Second application program is mainly finished the task from the local data base copy data to local application data base, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Write the open event code and the timer event code of main window.Wherein the mode of operation of data pipe is selected Append-Insert Rows mode.
Open the script window of main window, write open event code and timer event code respectively.In the open event code, trigger the timer incident, activate master routine; The timer event code is the main program of this system, and accompanying drawing 4 is its process flow diagram, below this process flow diagram is done some explanation.
1. the current time is for to duplicate the period: the time of copy data task is determined at the application server idle period, as night.
In the task record table state-of-the-art record download successfully be masked as 1 and data duplicate success and be masked as 0: detect whether up-to-date data downloaded completes successfully and do not duplicate in the data download storehouse.
3. data are duplicated successfully sign in the updating task record sheet: after using the success of data pipe copy data, data in the task record table are duplicated successfully sign put 1.
4. start timer: after the time of setting, start master routine once more.

Claims (2)

1. the conflict free method of use of the reliable download of a remote data base and local data base is characterized in that this method comprises:
With the loading source of remote data base as local data, comprise the long-range table 1 that structure is known and fixing in the remote data base, long-range table 2, long-range table n, wherein n represents natural number, adopt MS SQLServer, Oracle or sybase database management system are being created application data base on establishment data download storehouse and the application server in this locality on the Download Server of this locality respectively, the data download storehouse is responsible for downloading and preserve teledata from remote data base, application data base regularly passes through more new data of data download storehouse, for local user's use provides the data manipulation service, application program comprises first application program that runs on the Download Server and runs on second application program on the application server;
First application program is used to finish the task from the remote data base data download to local data download storehouse, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Create data and download function d ownloading, write the open event code and the timer event code of main window, wherein data pipe is a plurality of, its quantity is determined by the quantity of subtask, a data pipeline connects a long-range table, and the mode of operation of table pipeline is selected Replace-Drop/Add Table mode;
Second application program is used to finish the task from local data download storehouse copy data to local application data base, in Powerbuilder 9.0, sets up data pipe, pipeline user object and main window successively; Write the open event code and the timer event code of main window; Wherein the mode of operation of data pipe is selected Append-Insert Rows mode;
In application data base, set up local replica table 1 according to local service, local replica table 2 ..., local replica table n; Wherein n represents natural number, sets up the task record table in the data download storehouse, and the field of task record table comprises download date, download successfully and indicate, download subtask complement mark, task download time, data and duplicate successfully sign;
The flow process that data are downloaded is: with the single long-range table in the remote data base is unit, subtask as downloading task, the data pipe function of utilizing Powerbuilder 9.0 to provide downloads to the long-range table in the remote data base the local data download storehouse from remote data base earlier successively, uses data pipe that data are copied to the local application data base from local data download storehouse then.
2. the method for claim 1 is characterized in that, described data are downloaded the download that function d ownloading is used to realize data, calls for master routine; The order of this function flow process is: function definition integer variable li_flag, and initialize 1, and import this data download function parameters Pi into from master routine and represent whether subtask i finishes, if Pi is 1, then continue next subtask; If be not 1, then use data pipe to carry out this subtask; The subtask is if complete successfully, then the sign of this subtask in the updating task record sheet; If variable li_flag assignment 0 is given in the subtask failure, when finishing all subtasks, judge the value of li_flag, if 1, showing that all subtasks all complete successfully, the download in the updating task record sheet at this moment successfully indicates.
CNB2006100426194A 2006-04-03 2006-04-03 Conflict-free method for reliable download of remote data base and use of local database Expired - Fee Related CN100373384C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100426194A CN100373384C (en) 2006-04-03 2006-04-03 Conflict-free method for reliable download of remote data base and use of local database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100426194A CN100373384C (en) 2006-04-03 2006-04-03 Conflict-free method for reliable download of remote data base and use of local database

Publications (2)

Publication Number Publication Date
CN1828601A CN1828601A (en) 2006-09-06
CN100373384C true CN100373384C (en) 2008-03-05

Family

ID=36946993

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100426194A Expired - Fee Related CN100373384C (en) 2006-04-03 2006-04-03 Conflict-free method for reliable download of remote data base and use of local database

Country Status (1)

Country Link
CN (1) CN100373384C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255876A (en) * 2010-05-18 2011-11-23 宏碁股份有限公司 Media file collection method
CN103259808A (en) * 2012-02-15 2013-08-21 腾讯科技(深圳)有限公司 Updating service delivery method and device
CN103561107A (en) * 2013-11-13 2014-02-05 北京国双科技有限公司 Method and device for processing data downloading conflict
CN110413672B (en) * 2019-07-03 2023-09-19 平安科技(深圳)有限公司 Automatic data importing method and device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6226650B1 (en) * 1998-09-17 2001-05-01 Synchrologic, Inc. Database synchronization and organization system and method
US6330589B1 (en) * 1998-05-26 2001-12-11 Microsoft Corporation System and method for using a client database to manage conversation threads generated from email or news messages
CN1328299A (en) * 2000-06-12 2001-12-26 赵其刚 Method and system for collecting and inquiring information
CN1504912A (en) * 2002-12-05 2004-06-16 �Ҵ���˾ Performance and memory bandwidth utilization for tree searches using tree fragmentation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6330589B1 (en) * 1998-05-26 2001-12-11 Microsoft Corporation System and method for using a client database to manage conversation threads generated from email or news messages
US6226650B1 (en) * 1998-09-17 2001-05-01 Synchrologic, Inc. Database synchronization and organization system and method
CN1328299A (en) * 2000-06-12 2001-12-26 赵其刚 Method and system for collecting and inquiring information
CN1504912A (en) * 2002-12-05 2004-06-16 �Ҵ���˾ Performance and memory bandwidth utilization for tree searches using tree fragmentation

Also Published As

Publication number Publication date
CN1828601A (en) 2006-09-06

Similar Documents

Publication Publication Date Title
CN100549950C (en) The dispositions method of distributed software system
CN100395707C (en) Method of upgrading sequence
US9448784B2 (en) Reducing downtime during upgrades of interrelated components in a database system
CN101763347B (en) GIS (Geographical Information System) interface platform as well as network GIS management system and management method
CN108431810A (en) proxy database
CN103902410B (en) The data backup accelerated method of cloud storage system
CN108984224A (en) A kind of plug-in management method, computer readable storage medium and terminal device
CN106529331A (en) Multi-tenant data isolation scheme applied to PaaS (Platform-as-a-Service) platform
CN101765831A (en) Database contradiction solution method
CN100373384C (en) Conflict-free method for reliable download of remote data base and use of local database
CN104423960A (en) Continuous project integration method and continuous project integration system
CN102890682A (en) Method for creating index, searching method, device and system
CN105159943A (en) Automatic backup method and system for distributed database
CN101930463A (en) Memory database-based simulation grid node quick migration method
CN103428288B (en) Based on the copies synchronized method of subregion state table and coordinator node
CN104199955A (en) Information management system and information management method
CN114942965A (en) Method and system for accelerating synchronous operation of main database and standby database
CN115150226A (en) Intelligent gateway adaptation system based on object model and operation method thereof
CN107329809A (en) A kind of distributed transaction processing method and system towards multi-data source
CN102024215A (en) Method for publishing customizable trading information in power market
CN110941422B (en) Code automatic generation method, code generator and readable storage medium
CN105677427A (en) Module upgrading method and device
CN102710433A (en) Online updating processing method as well as related device and system
CN100433002C (en) Via platform database copying configurating method
US10915309B2 (en) Technical configuration delta-driven update and decoupling

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080305

Termination date: 20110403