CN106682017A - Database update method and device - Google Patents
Database update method and device Download PDFInfo
- Publication number
- CN106682017A CN106682017A CN201510756927.2A CN201510756927A CN106682017A CN 106682017 A CN106682017 A CN 106682017A CN 201510756927 A CN201510756927 A CN 201510756927A CN 106682017 A CN106682017 A CN 106682017A
- Authority
- CN
- China
- Prior art keywords
- data
- breakpoint
- renewal
- location
- data cell
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a database update method and a database update device. The database update method includes: in a breakpoint base generated in advance, obtaining breakpoint positions of data units in unfinished update progress; using data units in data to be updated and downloaded in advance to update the data units corresponding to the data unit breakpoint positions in the database; updating the update progress corresponding to the data unit breakpoint positions in the breakpoint base according to update status of the data units corresponding to the data unit breakpoint positions. By adopting the technical scheme, the database update method and the database update device can support breakpoints to update the database, and improve update efficiency of the database.
Description
Technical field
The present invention relates to database update technical field, more particularly to a kind of database update method and device.
Background technology
In informationized society, substantially effectively management and use various information resource, be carry out scientific research and
The precondition of decision-making management.Database is management information system, the office automation system, decision support system
The core of the various information systems such as system, is the important technical for carrying out scientific research and decision-making management.
As information constantly increases, the data in database that how to upgrade in time become the problem of industry concern.
In correlation technique, after producing new data, the data in storehouse can be updated the data with the new data.More
New paragon has two kinds, and one kind is that full dose is replaced, and one kind is incremental update, wherein full dose replace generally need by
Partial data is sent to database update, so necessarily causes to waste network traffics;Incremental update is, for example, only
By new data is activation to database update.Inventor is in the mistake studied both mode update modes
Find in journey, if exception occurs in renewal process, cause to update and interrupt, then need from the beginning to restart to update,
This causes database update efficiency to reduce.So, need a kind of new database update method.
The content of the invention
Embodiments provide a kind of database update method and device, to solve to presently, there are by
Occur in data base updating procedure abnormal, just start anew to update, cause that database update efficiency is low to ask
Topic.
A kind of database update method is embodiments provided, including:
In the breakpoint storehouse for previously generating, it is unfinished data cell breakpoint location to obtain renewal progress;
With the data cell in the advance data to be updated downloaded, data cell breakpoint described in storehouse is updated the data
The corresponding data cell in position;
According to the update status of the corresponding data cell of the data cell breakpoint location, the breakpoint storehouse is updated
Described in the corresponding renewal progress of data cell breakpoint location.
Further, the embodiment of the present invention additionally provides a kind of database update device, including:
Enquiry module, is unfinished data sheet in the breakpoint storehouse for previously generating, obtaining renewal progress
First breakpoint location;
Database update module, for the data cell in the advance data to be updated downloaded, updating the data
The corresponding data cell of data cell breakpoint location described in storehouse;
Data cell progress update module, for according to the corresponding data cell of the data cell breakpoint location
Update status, update the corresponding renewal progress of data cell breakpoint location described in the breakpoint storehouse.
The present invention has the beneficial effect that:Support that breakpoint updates in technical scheme provided in an embodiment of the present invention, i.e.,
Be only that unfinished data cell proceeds to update to renewal progress if renewal process is interrupted, before into
The data that work(updates need not update again, therefore, once the application is relative to renewal process in prior art
Interrupt comparing for the renewal that must start anew, the embodiment of the present invention can improve the renewal efficiency of database.
Description of the drawings
Technical scheme in order to be illustrated more clearly that the embodiment of the present invention, below will be to institute in embodiment description
The accompanying drawing that needs are used is briefly introduced, it should be apparent that, drawings in the following description are only the present invention's
Some embodiments, for one of ordinary skill in the art, on the premise of not paying creative work,
Can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 show the schematic flow sheet of database update method described in the embodiment of the present invention one;
Fig. 2 a show the schematic diagram of data area described in the embodiment of the present invention two;
Fig. 2 b show the schematic diagram of data block described in the embodiment of the present invention two;
Fig. 2 c show the schematic diagram of data cell described in the embodiment of the present invention two;
Fig. 3 show the structural representation of database update device described in the embodiment of the present invention two.
Specific embodiment
A kind of database update method is embodiments provided, in technical side described in the embodiment of the present invention
In case, in the breakpoint storehouse for previously generating, it is unfinished data cell breakpoint location to obtain renewal progress;
With the data cell in the advance data to be updated downloaded, data cell breakpoint location described in storehouse is updated the data
Corresponding data cell;According to the update status of the data cell, the institute recorded in the breakpoint storehouse is updated
State the renewal progress of the corresponding data cell breakpoint location of data cell.Thus, it is provided in an embodiment of the present invention
Support that breakpoint updates in technical scheme, even renewal process is interrupted, then only to renewal progress be unfinished number
Proceed to update according to unit, the data being successfully updated before need not update again, therefore, the application phase
For once renewal process interrupts comparing for the renewal that must start anew in prior art, the embodiment of the present invention can
To improve the renewal efficiency of database.
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing to this
It is bright to be described in further detail, it is clear that described embodiment is only a part of embodiment of the invention,
Rather than the embodiment of whole.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing
Go out all other embodiment obtained under the premise of creative work, belong to the scope of protection of the invention.
Embodiment one:
As shown in figure 1, it is the schematic flow sheet of database update method described in the embodiment of the present invention one,
The database update method may include following steps:
Step 101:In the breakpoint storehouse for previously generating, it is that unfinished data cell is broken to obtain renewal progress
Point position.
Wherein, in one embodiment, renewal progress can include represent do not start update do not start update
(state can be used state in the renewal that state (state can be represented with Init), expression are updating
Pro is represented) and represent the renewal completion status for having completed to update (state can be represented with Com).
Certainly, according to actual needs, can increase and reduce more new state when being embodied as, for example more new state can
Only to include updating completion status and not more new state, or more new state can include according to the flow process for updating
Middle state, for example, potentially include in the updating reading data, process of generated data etc. in state, that
Can be to read data mode and generated data state etc. to increase renewal progress by State divided in renewal.Tool
When body is implemented, can set according to actual needs, the embodiment of the present invention is not repeated this.
Step 102:With the data cell in the advance data to be updated downloaded, number described in storehouse is updated the data
According to the corresponding data cell of unit breakpoint location.
Step 103:According to the update status of the corresponding data cell of the data cell breakpoint location, update
The corresponding renewal progress of data cell breakpoint location described in the breakpoint storehouse.
Wherein, in one embodiment, data to be updated include at least one data area;For every number
According to region, the data area includes at least one data block;For each data block, the data block include to
A few data cell.Also, there is the data area mark of oneself each data area in data to be updated
Know.Equally, each data block has the data block identifier of oneself, each data cell to have the data of oneself
Unit marks.So, data cell is under the jurisdiction of data block, and data block is under the jurisdiction of data area.It is embodied as
When can according to data to be updated itself the characteristics of set up breakpoint storehouse.For example can be marked according to data area
Know, data block identifier and data cell mark, recognize each data area in the data to be updated, each
Data block and each data cell.Wherein, one data area breakpoint location of data area correspondence, one
One data block breakpoint location of individual data block correspondence, data cell one data cell breakpoint bit of correspondence
Put.When being embodied as, data area breakpoint location, data block identifier table can be represented with data area mark
Show that data block breakpoint location, data cell mark represent data cell breakpoint location.So, the breakpoint storehouse
In can include data area breakpoint table, data block breakpoint table and data cell breakpoint table these three breakpoint tables,
Wherein:
Data area breakpoint table includes each data area breakpoint location and corresponding renewal progress;Data block is broken
Point table includes each data block breakpoint location and corresponding renewal progress;Data cell breakpoint table includes each number
According to the breakpoint location and corresponding renewal progress of unit.
Certainly, it should be noted that data cell breakpoint location can be not limited only to data cell mark come
Represent, the present invention is not limited this.For example, when being embodied as, can be right according to preset numbers rule
Each data cell is numbered, and then shows data cell breakpoint location with number table.In the same manner, data block breakpoint
The method for expressing present invention of position and data area breakpoint location is not also limited.
Here, the method for building up of each breakpoint table in breakpoint storehouse is illustrated with a specific embodiment:For example, it is being based on
In the generation patterns of Update Region, data to be updated can include at least one Update Region (i.e.
Data area), Update Region includes at least one Building Block (i.e. data block), and one
Individual Building Block include at least one Table (i.e. data cell), and Table can be database update
Least unit, be also the least unit of incremental update.Thus, then there are three breakpoint tables in breakpoint storehouse, one
Individual breakpoint table include the corresponding data area breakpoint locations of at least one Update Region and it is corresponding more
New progress (UrTable is referred to as after the breakpoint table);One breakpoint table includes at least one Building
The corresponding data block breakpoint locations of Block and corresponding renewal progress are (after the breakpoint table referred to as
BbTable);Last table includes the corresponding data cell breakpoint locations of at least one Table and correspondence
Renewal progress (after the breakpoint table be referred to as TbTable).When initial, the renewal in each breakpoint table is entered
Degree is in not starting more new state.
Certainly, it should be noted that comprising at least one record in a Table, then each record
Can also be used as the least unit of database update.If Table can also continue to divide, then can also be by
Data cell is divided into the granularity less than Table.When being embodied as, the granularity for updating the data division is treated
Less, database update then can be closer to the form of non-backtracking.But the breakpoint table safeguarded in breakpoint storehouse
More, the data of maintenance are also more, so, when being embodied as, can according to actual needs divide to be updated
Data, and breakpoint storehouse is set up, the embodiment of the present invention is not limited this.
So, by data to be updated according to distinguishing hierarchy (i.e. data area, data block and data cell etc.),
Data base updating procedure can be made to resolve into the stratified subprocess of tool, also allow for according to it is at all levels enter line number
Update according to storehouse.
Wherein, in one embodiment, if including data area breakpoint table, data block breakpoint table in breakpoint storehouse
With data cell breakpoint table, (i.e. in the breakpoint storehouse for previously generating, it is not to obtain renewal progress to step 101
The data cell breakpoint location for completing), may particularly include following steps:
Step B1:From the breakpoint table of data area, it is unfinished data area breakpoint to obtain renewal progress
Position.
Step B2:In data block breakpoint table, the corresponding data block of the data area breakpoint location is inquired about
Breakpoint location, and it is unfinished data block breakpoint location to obtain wherein renewal progress.
Step B3:In data cell breakpoint table, the corresponding number of data block breakpoint location for getting is inquired about
According to unit breakpoint location, and it is unfinished data cell breakpoint location to obtain wherein renewal progress.
Continue the example above, it is assumed that data area breakpoint location is the corresponding numbers of Update Region of U1
4 Building Block of B1, B2, B3, B4 are respectively according to block breakpoint location, and data block breakpoint
Position is respectively two of M1, M2 for the corresponding data cell breakpoint locations of Building Block of B1
Table, data block breakpoint location are distinguished for the corresponding data cell breakpoint locations of Building Block of B3
For three Table of T1, T2, T3, and Table is the least unit of database update.
According to above-mentioned assumed condition, the process for inquiring about breakpoint is:
Inquiry renewal progress is unfinished data field first in data area breakpoint table (i.e. UrTable)
Domain breakpoint location (it is not the data area breakpoint location of Com states to inquire about renewal progress).If from
The renewal progress inquired in UrTable is that unfinished data area breakpoint location is U1, and the data field
The renewal progress of domain breakpoint location is Init, then illustrate the corresponding data area of data area breakpoint location not
Start update, to should data area breakpoint location data cell be breakpoint location (such as M1 for number
According to unit breakpoint location).If the data area breakpoint location inquired from UrTable is U1, and the number
It is Pro according to the renewal progress in region, then continues from data block breakpoint table (i.e. BbTable), to inquire about U1
In corresponding data block breakpoint location B1, B2, B3, B4, renewal progress is unfinished data block breakpoint
Position.If the data block breakpoint location for inquiring is B2, and the renewal progress of B2 is Init, then explanation should
The corresponding data block of data block breakpoint location does not start to update, then T1 can be selected to be data cell breakpoint bit
Put;If the renewal progress of B2 is Pro, continue from data cell breakpoint table (i.e. TbTable), to look into
It is unfinished data cell breakpoint location to ask and update in data cell breakpoint location corresponding with B2 progress.
So, breakpoint table is inquired about successively from data area breakpoint table to the order of data cell breakpoint table, can be with
Quickly determine which data area or data block have breakpoint.
Certainly, when being embodied as, it is also possible to according to from data cell breakpoint table to the suitable of data area breakpoint table
Sequence inquires about successively breakpoint table, and the embodiment of the present invention is not limited this.
Wherein, in one embodiment, if database includes data block breakpoint table, the data block breakpoint
Table needs to be updated according to the renewal progress of data block, to ensure the accuracy of breakpoint storehouse information.In this regard,
The embodiment of the present invention can perform to judge the corresponding all data cell breakpoint bits of same data block breakpoint location
Put the corresponding renewal progress in data cell breakpoint table and whether be renewal and complete, if so, then by the number
According to block breakpoint location, corresponding renewal progress is updated to renewal and completes in the data block breakpoint table.
Wherein, in one embodiment, if database includes data area breakpoint table, the data area
Breakpoint table needs to be updated according to the renewal progress of data area, to ensure the accuracy of breakpoint storehouse information.
In this regard, the embodiment of the present invention can perform to judge that the corresponding all data blocks of same data area breakpoint location are broken
Whether point position corresponding renewal progress in data block breakpoint table is renewal completes, if so, then will be described
Breakpoint location corresponding renewal progress in the data area breakpoint table in data area is updated to renewal and completes.
Wherein, in one embodiment, in storage, above-mentioned data cell can be that the minimum of storage is single
Position, i.e., one data cell can be an independent file.Certainly, in the specific implementation, above-mentioned data
The division of unit can be division in logic, and not data cell correspondence one is independent when storing
File, for example, can be that a data block is stored as a file.Continue the example above, a Update
Region is a file, and this document folder is lower to include at least one file, and one of file is exactly one
Building Block.So Table is exactly division in logic, and at least one Table coexists in one
Building Block (in i.e. one file).So, potentially include at least one in the data to be updated
File, the file potentially include at least one data block and at least one data cell.
If data base updating procedure interrupts, one of following 2 kinds of operations or combination can be performed, to ensure data
Integrality and accuracy that storehouse updates, for ease of description, below operation is referred to as " database interruption post processing
Operation ":
If 1), a data block is stored as a file, if update in data base updating procedure interrupting,
The file that then may be updated in database fails (i.e. this document is lost or damaged), and this causes part
Renewal operation will be invalid.The embodiment of the present invention is operated to re-start invalid renewal, it is ensured that good
Database update is completed, following operation is can perform:Judge that renewal progress is unfinished data block breakpoint location
In the database whether corresponding file is effective;If invalid, by the data block breakpoint location in institute
State the corresponding renewal progress of corresponding all data cell breakpoint locations in data cell breakpoint table to be labeled as not
Complete.
2), wherein, in one embodiment, data base updating procedure interrupts, it is likely that occur for number
Do not submit to according to the operation affairs in storehouse, as such, it is desirable to rolling back action affairs, in this regard, can in the embodiment of the present invention
Perform and be:Determine whether not submitted to for the operation affairs of the database;If so, then to the data
Storehouse carries out rolling back action.
Wherein, in one embodiment, if data cell is stored in the form of tables of data, database update mistake
When journey is interrupted, the corresponding tables of data of data cell breakpoint location may be invalid, for the ease of according to data cell
Breakpoint location is updated to database, it is ensured that the integrality and accuracy of database update, then step 102
(i.e. with the data cell in the data to be updated downloaded in advance, update the data data cell breakpoint described in storehouse
The corresponding data cell in position) may include following steps:
Step A1:Judge that the corresponding tables of data of data cell breakpoint location described in the database is to update
Shi Xinjian's, or to renewal that legacy data table is carried out.
Step A2:If newly-built when updating, then the tables of data is deleted, with treating more for advance download
The corresponding data cell newdata table of data cell breakpoint location described in new data.
Step A3:If the renewal carried out to legacy data table, then replaced with the backup of the legacy data table
Tables of data in the database, with data cell breakpoint location pair described in the data to be updated downloaded in advance
The data cell answered, to being substituted into the database in legacy data table be updated.
Wherein, in one embodiment, database is providing the user service under normal circumstances, if updated
Providing the database of service, then the database will interrupt service, so, to guarantee to continue as
User provides service, also avoids the database corruption caused in data base updating procedure from repairing, the present invention
In embodiment, the database of operation is updated in step 101, is to provide the backup number of the data block of service
According to storehouse.After completing to update, the database after renewal is replaced the database for providing server, such data
The more new technological process in storehouse terminates.
Wherein, in one embodiment, when starting to update, task list can be set up according to breakpoint storehouse, is appointed
Business list includes the corresponding data cell breakpoint location of each data cell in data to be updated and corresponding
Renewal progress.During database update, first can be updated according to the task list.When database update mistake
Journey interrupt, the first subtask list can be made up of the task of breakpoint location, by breakpoint location after do not open
The beginning to update of the task constitutes the second subtask list.In order to be carried out in database according to the first subtask list
Disconnected post-processing operation, such as rollback affairs.Now, to avoid continuing to update the data in storehouse according to above-mentioned two
Subtask list is updated, data reconstruction to be updated that can be in the list of above-mentioned two subtask one
New task list, and according to the task list rebuild, update the data storehouse.For example:
To sum up, in the embodiment of the present invention, by setting up breakpoint storehouse so that database can support that breakpoint updates.
Relative to having no progeny in database update in correlation technique, can only start anew, database update effect can be improved
Rate.
Additionally, in the embodiment of the present invention, according to data to be updated breakpoint table is set up, and according to breakpoint table, enter
Row database update, can cause data base updating procedure to be decomposed into the stratified process of tool.It is easy to according to layer
Control of the secondary realization to database update.
Additionally, in the embodiment of the present invention, by database post-processing operation is interrupted, database can be improved more
New integrality and accuracy.
Embodiment two
As a example by update electronic map database, database update method in the embodiment of the present invention is said
It is bright:
For example, data area is, according to the data of administrative division in electronic chart, to wrap in data to be updated
Include the electronic map data of Beijing area and District of Shanghai.And the storage form of each data area is one
File.File UR_11 for example shown in Fig. 2 a represents the electronic map data of Beijing area;UR_12
Represent the electronic map data of District of Shanghai.As shown in Figure 2 b, it is file that file UR_11 includes
Suffix is at least one file of .NDS.Wherein, a .NDS represents a data block, and each .NDS is literary
Part is divided by function.For example, the .NDS representation of file map denotation related datas of entitled BMD;Name
The .NDS representation of file road data related datas of referred to as ROUTING.Wherein, in each .NDS file
Including at least one tables of data (each tables of data is a data cell), for example, it is as shown in Figure 2 c title
For each tables of data included in the .NDS files of ROUTING.
So, data area breakpoint table can be as shown in table 1:Wherein BJ represents Beijing area breakpoint location,
SH represents District of Shanghai breakpoint location;Wherein updating progress includes Init (not starting more new state), Pro (more
State in new) and Com (renewal completion status).Wherein, to belong to renewal progress not complete for Init and Pro
Into.
The data area breakpoint table of table 1
Data area breakpoint location | Renewal progress |
BJ | Pro |
SH | Com |
Data block breakpoint table can be as shown in table 2:BMD represents road data relational breakpoints position, POI
Represent that POI relevant information breakpoint locations, TRAFFIC represent real-time traffic relevant information breakpoint location;Table 2
In it is identical with the implication of identical characters in table 1, will not be described here.
The data block breakpoint table of table 2
Data cell breakpoint table can be as shown in table 3:T1-T4 represents different data cell breakpoint locations;
And it is identical with the implication of identical characters in table 2 in table 3, will not be described here.
The data cell breakpoint table of table 3
It should be noted that above-mentioned table 1, table 2, table 3 are only used for illustrating the embodiment of the present invention, and without
In the embodiment of the present invention is limited, when being embodied as, according to the actual requirements each breakpoint table can be designed.
So, it can be seen from above-mentioned condition, the embodiment of the present invention can be embodied as finding out more in table 1 first
New progress is that unfinished data area breakpoint location is BJ, then in table 2, the corresponding data blocks of BJ
Can determine that in breakpoint location renewal progress be unfinished data block breakpoint location can be the POI1 for belonging to BJ,
After this, can determine that renewal progress is not complete in the corresponding data cell breakpoint locations of POI1 in table 3
Into data cell breakpoint location can be T3 (1).Then, with the data cell in data to be updated, more
The corresponding tables of data of T3 described in new database (1).And, according to the corresponding data cells of T3 (1)
Update status, update the renewal progress of T3 (1) in table 3.Afterwards, can return and be found out in table 1
The step of renewal progress is unfinished data area breakpoint location, it is also possible to continued to update T3 according to table 3
(1) below renewal progress is the unfinished corresponding data cells of T4 (1) until all data cells
Renewal progress is till completing.
Wherein, after data cell breakpoint location is determined for T3 (1), can carry out in embodiment one
Described database interrupts post-processing operation, to ensure integrality and accuracy to database update, specifically
, including:
1), judge that renewal progress is that unfinished data block breakpoint location (i.e. POI1) is right in database
Whether the file (the POI.NDS files belonged under the file of Beijing area) answered is effective;If invalid,
Then the corresponding renewal progress of the corresponding all data cell breakpoint locations of POI1 is labeled as not completing (will
T2 (1), the corresponding renewal progresses of T3 (1) are labeled as Init.
2), determine whether not submitted to for the operation affairs of the database;If so, then to the data
Storehouse carries out rolling back action.
The embodiment of the present invention realizes that the breakpoint to electronic map database updates, and for example A.NDS files update
After success, if occurring to update when B.NDS files are updated interrupts, the A.NDS files for updating before
Will be unaffected, if if B.NDS does not fail, only needing to update partial data table therein when updating
, due to data table data amount very little so that breakpoint updates the form Jie Jin non-backtracking, relative to existing
Once renewal process is interrupted in technology, just start anew to update, the embodiment of the present invention can improve electronic chart
The renewal efficiency of database.
Embodiment three
Based on identical inventive concept, the embodiment of the present invention also provides a kind of database update device, such as Fig. 3
Shown, the device includes:
Enquiry module 301, is unfinished number in the breakpoint storehouse for previously generating, obtaining renewal progress
According to unit breakpoint location;
Database update module 302, for the data cell in the advance data to be updated downloaded, updating
The corresponding data cell of data cell breakpoint location described in database;
Data cell progress update module 303, for according to the corresponding data of the data cell breakpoint location
The update status of unit, update the corresponding renewal progress of data cell breakpoint location described in the breakpoint storehouse.
Wherein, in one embodiment, data cell is under the jurisdiction of data block, and data block is under the jurisdiction of data area,
Then the breakpoint storehouse includes data area breakpoint table, data block breakpoint table and data cell breakpoint table, described
Enquiry module, specifically includes:
Data area breakpoint location acquiring unit, be for from the breakpoint table of data area, obtaining renewal progress
Unfinished data area breakpoint location;
Data block breakpoint location acquiring unit, breaks in data block breakpoint table, inquiring about the data area
The corresponding data block breakpoint location in point position, and it is unfinished data block breakpoint bit to obtain wherein renewal progress
Put;
Data cell breakpoint location acquiring unit, in data cell breakpoint table, inquiring about the number for getting
According to the corresponding data cell breakpoint location of block breakpoint location, and it is unfinished data to obtain wherein renewal progress
Unit breakpoint location.
Wherein, in one embodiment, described device is further included:
Data block progress update module, for judging the corresponding all data cells of same data block breakpoint location
Whether breakpoint location corresponding renewal progress in data cell breakpoint table is renewal completes, and if so, then will
The data block breakpoint location corresponding renewal progress in the data block breakpoint table is updated to renewal and completes.
Wherein, in one embodiment, described device is further included:
Data area progress update module, for judging the corresponding all data of same data area breakpoint location
Whether block breakpoint location corresponding renewal progress in data block breakpoint table is renewal completes, and if so, then will
The data area breakpoint location corresponding renewal progress in the data area breakpoint table is updated to update
Complete.
Wherein, in one embodiment, a data block is stored as a file, and described device also includes:
File effectiveness judge module, for judging that renewal progress is unfinished data block breakpoint location described
Whether corresponding file is effective in database;
Progress modified module, if the judged result for file effectiveness judge module is invalid, by the number
According to block breakpoint location, corresponding all data cell breakpoint locations are corresponding in the data cell breakpoint table
Renewal progress is labeled as not completing.
Wherein, in one embodiment, described device also includes:
Affairs judge module is not submitted to, for determining whether that the operation affairs for the database are not carried
Hand over;
Roll-back module, if being yes for the judged result for not submitting affairs judge module to, to the number
Rolling back action is carried out according to storehouse.
Wherein, in one embodiment, the data cell is stored in the form of tables of data, the database
Update module, specifically includes:
Judging unit, for judging that the corresponding tables of data of data cell breakpoint location described in the database is
It is newly-built during renewal, or to renewal that legacy data table is carried out;
The newly-built unit of tables of data, for if newly-built when updating, then deleting the tables of data, with advance
The corresponding data cell newdata table of data cell breakpoint location described in the data to be updated downloaded;
Legacy data table updating block, for if the renewal carried out to legacy data table, then using the legacy data
The tables of data in the database is replaced in the backup of table, with data sheet described in the data to be updated downloaded in advance
The corresponding data cell of first breakpoint location, to being substituted into the database in legacy data table be updated.
Database update device provided in an embodiment of the present invention supports that breakpoint updates, and even renewal process is interrupted,
Only to renewal progress it is then that unfinished data cell proceeds to update, the data being successfully updated before will
Without the need for updating again, therefore, once the application is interrupted relative to renewal process in prior art must from the beginning open
What the beginning updated compares, and the embodiment of the present invention can improve the renewal efficiency of database.
With regard to the device in above-described embodiment, wherein modules perform the concrete mode of operation relevant
It has been described in detail in the embodiment of the method, explanation will be not set forth in detail herein.
Those skilled in the art it should be appreciated that embodiments of the invention can be provided as method, device, system,
Or computer program.Therefore, the present invention can using complete hardware embodiment, complete software embodiment,
Or with reference to the form of the embodiment in terms of software and hardware.And, the present invention can adopt at one or more it
In include computer-usable storage medium (the including but not limited to disk storage of computer usable program code
Device, CD-ROM, optical memory etc.) on implement computer program form.
The present invention is with reference to method according to embodiments of the present invention, device (device) and computer program
Flow chart and/or block diagram describing.It should be understood that can by computer program instructions flowchart and/or
Each flow process and/or square frame and flow chart and/or the flow process in block diagram and/or square frame in block diagram
With reference to.These computer program instructions can be provided to all-purpose computer, special-purpose computer, Embedded Processor
Or the processor of other programmable data processing units is producing a machine so that by computer or other
The instruction of the computing device of programmable data processing unit produce for realizing in one flow process of flow chart or
The device of the function of specifying in one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable datas to process dress
In putting the computer-readable memory for working in a specific way so that in being stored in the computer-readable memory
Instruction produce and include the manufacture of command device, command device realization is in one flow process or multiple of flow chart
The function of specifying in one square frame of flow process and/or block diagram or multiple square frames.
These computer program instructions also can be loaded into computer or other programmable data processing units, made
Obtain and perform on the computer or other programmable apparatus series of operation steps to produce computer implemented place
Reason, so as to the instruction for performing on the computer or other programmable apparatus is provided for realizing in flow chart one
The step of function of specifying in flow process or one square frame of multiple flow processs and/or block diagram or multiple square frames.
, but those skilled in the art once know base although preferred embodiments of the present invention have been described
This creative concept, then can make other change and modification to these embodiments.So, appended right will
Ask and be intended to be construed to include preferred embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this to the present invention
Bright spirit and scope.So, if the present invention these modification and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprising these changes and modification.
Claims (14)
1. a kind of database update method, it is characterised in that include:
In the breakpoint storehouse for previously generating, it is unfinished data cell breakpoint location to obtain renewal progress;
With the data cell in the advance data to be updated downloaded, data cell breakpoint described in storehouse is updated the data
The corresponding data cell in position;
According to the update status of the corresponding data cell of the data cell breakpoint location, the breakpoint storehouse is updated
Described in the corresponding renewal progress of data cell breakpoint location.
2. method according to claim 1, it is characterised in that data cell is under the jurisdiction of data block,
Data block is under the jurisdiction of data area, then the breakpoint storehouse includes data area breakpoint table, data block breakpoint table
With data cell breakpoint table, described in the breakpoint storehouse for previously generating, it is unfinished number to obtain renewal progress
According to unit breakpoint location, specifically include:
From the breakpoint table of data area, it is unfinished data area breakpoint location to obtain renewal progress;
In data block breakpoint table, the corresponding data block breakpoint location of the data area breakpoint location is inquired about,
And it is unfinished data block breakpoint location to obtain wherein renewal progress;
In data cell breakpoint table, the corresponding data cell breakpoint of data block breakpoint location for getting is inquired about
Position, and it is unfinished data cell breakpoint location to obtain wherein renewal progress.
3. method according to claim 2, it is characterised in that methods described is further included:
Judge the corresponding all data cell breakpoint locations of same data block breakpoint location in data cell breakpoint
Whether corresponding renewal progress is renewal and completes in table, if so, then by the data block breakpoint location in institute
State corresponding renewal progress in data block breakpoint table and be updated to renewal and complete.
4. method according to claim 2, it is characterised in that methods described is further included:
Judge the corresponding all data block breakpoint locations of same data area breakpoint location in data block breakpoint table
In corresponding renewal progress whether be renewal and complete, if so, then by the data area breakpoint location in institute
State corresponding renewal progress in the breakpoint table of data area and be updated to renewal and complete.
5. method according to claim 2 a, it is characterised in that data block is stored as a text
Part, methods described also includes:
Judge that renewal progress is that in the database corresponding file is unfinished data block breakpoint location
It is no effective;
If invalid, by the data block breakpoint location in the data cell breakpoint table corresponding all numbers
It is labeled as not completing according to the corresponding renewal progress of unit breakpoint location.
6. method according to claim 5, it is characterised in that methods described also includes:
Determine whether not submitted to for the operation affairs of the database;
If so, then rolling back action is carried out to the database.
7. according to arbitrary described method in claim 1-6, it is characterised in that the data cell with
The form storage of tables of data, with the data cell in the data to be updated downloaded in advance, updates the data institute in storehouse
The corresponding data cell of data cell breakpoint location is stated, is specifically included:
Judge that the corresponding tables of data of data cell breakpoint location described in the database is newly-built when being renewal,
Or the renewal that legacy data table is carried out;
If newly-built when updating, then the tables of data is deleted, with institute in the data to be updated downloaded in advance
State the corresponding data cell newdata table of data cell breakpoint location;
If the renewal carried out to legacy data table, then the database is replaced with the backup of the legacy data table
In tables of data, with the corresponding data sheet of data cell breakpoint location described in the data to be updated downloaded in advance
Unit, to being substituted into the database in legacy data table be updated.
8. a kind of database update device, it is characterised in that include:
Enquiry module, is unfinished data sheet in the breakpoint storehouse for previously generating, obtaining renewal progress
First breakpoint location;
Database update module, for the data cell in the advance data to be updated downloaded, updating the data
The corresponding data cell of data cell breakpoint location described in storehouse;
Data cell progress update module, for according to the corresponding data cell of the data cell breakpoint location
Update status, update the corresponding renewal progress of data cell breakpoint location described in the breakpoint storehouse.
9. device according to claim 8, it is characterised in that data cell is under the jurisdiction of data block,
Data block is under the jurisdiction of data area, then the breakpoint storehouse includes data area breakpoint table, data block breakpoint table
With data cell breakpoint table, the enquiry module, specifically include:
Data area breakpoint location acquiring unit, be for from the breakpoint table of data area, obtaining renewal progress
Unfinished data area breakpoint location;
Data block breakpoint location acquiring unit, breaks in data block breakpoint table, inquiring about the data area
The corresponding data block breakpoint location in point position, and it is unfinished data block breakpoint bit to obtain wherein renewal progress
Put;
Data cell breakpoint location acquiring unit, in data cell breakpoint table, inquiring about the number for getting
According to the corresponding data cell breakpoint location of block breakpoint location, and it is unfinished data to obtain wherein renewal progress
Unit breakpoint location.
10. device according to claim 9, it is characterised in that described device is further included:
Data block progress update module, for judging the corresponding all data cells of same data block breakpoint location
Whether breakpoint location corresponding renewal progress in data cell breakpoint table is renewal completes, and if so, then will
The data block breakpoint location corresponding renewal progress in the data block breakpoint table is updated to renewal and completes.
11. devices according to claim 9, it is characterised in that described device is further included:
Data area progress update module, for judging the corresponding all data of same data area breakpoint location
Whether block breakpoint location corresponding renewal progress in data block breakpoint table is renewal completes, and if so, then will
The data area breakpoint location corresponding renewal progress in the data area breakpoint table is updated to update
Complete.
12. devices according to claim 9 a, it is characterised in that data block is stored as a text
Part, described device also includes:
File effectiveness judge module, for judging that renewal progress is unfinished data block breakpoint location described
Whether corresponding file is effective in database;
Progress modified module, if the judged result for file effectiveness judge module is invalid, by the number
According to block breakpoint location, corresponding all data cell breakpoint locations are corresponding in the data cell breakpoint table
Renewal progress is labeled as not completing.
13. devices according to claim 12, it is characterised in that described device also includes:
Affairs judge module is not submitted to, for determining whether that the operation affairs for the database are not carried
Hand over;
Roll-back module, if being yes for the judged result for not submitting affairs judge module to, to the number
Rolling back action is carried out according to storehouse.
14. according to arbitrary described device in claim 8-13, it is characterised in that the data cell
Stored in the form of tables of data, the database update module is specifically included:
Judging unit, for judging that the corresponding tables of data of data cell breakpoint location described in the database is
It is newly-built during renewal, or to renewal that legacy data table is carried out;
The newly-built unit of tables of data, for if newly-built when updating, then deleting the tables of data, with advance
The corresponding data cell newdata table of data cell breakpoint location described in the data to be updated downloaded;
Legacy data table updating block, for if the renewal carried out to legacy data table, then using the legacy data
The tables of data in the database is replaced in the backup of table, with data sheet described in the data to be updated downloaded in advance
The corresponding data cell of first breakpoint location, to being substituted into the database in legacy data table be updated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510756927.2A CN106682017B (en) | 2015-11-09 | 2015-11-09 | Database updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510756927.2A CN106682017B (en) | 2015-11-09 | 2015-11-09 | Database updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106682017A true CN106682017A (en) | 2017-05-17 |
CN106682017B CN106682017B (en) | 2020-07-31 |
Family
ID=58864119
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510756927.2A Active CN106682017B (en) | 2015-11-09 | 2015-11-09 | Database updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106682017B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255629A (en) * | 2017-09-22 | 2018-07-06 | 平安科技(深圳)有限公司 | Breakpoint data capture method and terminal device |
CN108304430A (en) * | 2017-06-02 | 2018-07-20 | 深圳三诺信息科技有限公司 | A method of modification database |
CN109597819A (en) * | 2018-12-07 | 2019-04-09 | 北京字节跳动网络技术有限公司 | Method and apparatus for more new database |
CN113704277A (en) * | 2021-07-14 | 2021-11-26 | 浪潮商用机器有限公司 | Database-based breakpoint continuous transmission method and related device |
WO2023065868A1 (en) * | 2021-10-19 | 2023-04-27 | 腾讯科技(深圳)有限公司 | Transaction execution method and apparatus, and computer device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004745A (en) * | 2009-09-02 | 2011-04-06 | 中国银联股份有限公司 | Data transfer system and method |
CN102495906A (en) * | 2011-12-23 | 2012-06-13 | 天津神舟通用数据技术有限公司 | Incremental data migration method capable of realizing breakpoint transmission |
US20120203735A1 (en) * | 2010-09-29 | 2012-08-09 | International Business Machines Corporation | Dynamic configuration of a persistence provider |
CN104317960A (en) * | 2014-11-14 | 2015-01-28 | 中国建设银行股份有限公司 | Method and device for processing batch job |
CN105025106A (en) * | 2015-07-28 | 2015-11-04 | 焦点科技股份有限公司 | Breakpoint resuming method based on segmentation and meta-information |
-
2015
- 2015-11-09 CN CN201510756927.2A patent/CN106682017B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004745A (en) * | 2009-09-02 | 2011-04-06 | 中国银联股份有限公司 | Data transfer system and method |
US20120203735A1 (en) * | 2010-09-29 | 2012-08-09 | International Business Machines Corporation | Dynamic configuration of a persistence provider |
CN102495906A (en) * | 2011-12-23 | 2012-06-13 | 天津神舟通用数据技术有限公司 | Incremental data migration method capable of realizing breakpoint transmission |
CN104317960A (en) * | 2014-11-14 | 2015-01-28 | 中国建设银行股份有限公司 | Method and device for processing batch job |
CN105025106A (en) * | 2015-07-28 | 2015-11-04 | 焦点科技股份有限公司 | Breakpoint resuming method based on segmentation and meta-information |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304430A (en) * | 2017-06-02 | 2018-07-20 | 深圳三诺信息科技有限公司 | A method of modification database |
CN108255629A (en) * | 2017-09-22 | 2018-07-06 | 平安科技(深圳)有限公司 | Breakpoint data capture method and terminal device |
WO2019056736A1 (en) * | 2017-09-22 | 2019-03-28 | 平安科技(深圳)有限公司 | Breakpoint data acquisition method and apparatus, terminal device and medium |
CN108255629B (en) * | 2017-09-22 | 2020-09-22 | 平安科技(深圳)有限公司 | Breakpoint data obtaining method and terminal equipment |
CN109597819A (en) * | 2018-12-07 | 2019-04-09 | 北京字节跳动网络技术有限公司 | Method and apparatus for more new database |
CN113704277A (en) * | 2021-07-14 | 2021-11-26 | 浪潮商用机器有限公司 | Database-based breakpoint continuous transmission method and related device |
CN113704277B (en) * | 2021-07-14 | 2024-02-02 | 浪潮商用机器有限公司 | Breakpoint continuous transmission method based on database and related device |
WO2023065868A1 (en) * | 2021-10-19 | 2023-04-27 | 腾讯科技(深圳)有限公司 | Transaction execution method and apparatus, and computer device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106682017B (en) | 2020-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106682017A (en) | Database update method and device | |
CN106603264A (en) | Method and equipment for positioning fault root | |
CN107003935A (en) | Optimize database duplicate removal | |
CN106951559A (en) | Data reconstruction method and electronic equipment in distributed file system | |
WO2016005898A1 (en) | Method for processing data quality exceptions in data processing system | |
CN101673374B (en) | Bill processing method and device | |
RU2008106228A (en) | CLONING AND MANAGING DATABASE FRAGMENTS | |
CN107168758A (en) | The code compilation inspection method and device of many code libraries | |
CN109697109A (en) | A kind of method, system, device and the storage medium of Division identification conflict virtual machine | |
CN111737045A (en) | Method and device for achieving fault self-recovery of Insight management platform | |
CN107656796B (en) | Virtual machine cold migration method, system and equipment | |
CN106155838A (en) | A kind of database back-up data restoration methods and device | |
CN111143323A (en) | MPP database management method, device and system | |
CN111858764B (en) | Data synchronization method, device, computer equipment and storage medium | |
CN107977310A (en) | One kind traversal test command generation method and device | |
CN115604086A (en) | Monitoring alarm fault self-healing method, device, equipment, medium and program product | |
CN115545235A (en) | Power restoration method and device, computer equipment and storage medium | |
CN106250243B (en) | The processing method and processing device of banking system application based on poll tupe | |
CN111176704B (en) | Difference packet file generation method, interruption recovery method and related device | |
CN105988891B (en) | A kind of data in magnetic disk restorative procedure and device | |
CN113297318B (en) | Data processing method, device, electronic equipment and storage medium | |
KR20100022171A (en) | Apparatus and method for saving log in thread oriented logging system | |
CN103631676A (en) | Snapshot data generating method and device for read-only snapshot | |
CN104239182A (en) | Cluster file system split-brain processing method and device | |
CN117435403B (en) | Processing index merging method, system and invalid data processing method in persistent backup |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200421 Address after: 310012 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province Applicant after: Alibaba (China) Co.,Ltd. Address before: 102200, No. 8, No., Changsheng Road, Changping District science and Technology Park, Beijing, China. 1-5 Applicant before: AUTONAVI SOFTWARE Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |