CN108536798A - The restoration methods and system of the other database data of order level - Google Patents

The restoration methods and system of the other database data of order level Download PDF

Info

Publication number
CN108536798A
CN108536798A CN201810283557.9A CN201810283557A CN108536798A CN 108536798 A CN108536798 A CN 108536798A CN 201810283557 A CN201810283557 A CN 201810283557A CN 108536798 A CN108536798 A CN 108536798A
Authority
CN
China
Prior art keywords
data
order
current
level
module
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
CN201810283557.9A
Other languages
Chinese (zh)
Other versions
CN108536798B (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.)
Ctrip Travel Network Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Network Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ctrip Travel Network Technology Shanghai Co Ltd filed Critical Ctrip Travel Network Technology Shanghai Co Ltd
Priority to CN201810283557.9A priority Critical patent/CN108536798B/en
Publication of CN108536798A publication Critical patent/CN108536798A/en
Application granted granted Critical
Publication of CN108536798B publication Critical patent/CN108536798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses the restoration methods and system of a kind of other database data of order level, method includes:S1, for single target order, carry out the serializing processing of the other related data of order level, and preserve in the local database;S2, when restoring target order, according to order inquiries local data base, obtain serializing treated the other preservation data of order level of target order;S3, the preservation data of acquisition and the current order data of target order are compared, judges whether current order data need to update, if so, executing S4;S4, current order data are updated using the current order data of target order.The data that the present invention is gone out using order inquiries condition query, compare the data inquired before, judge whether the data of current table are consistent, current data is updated, simplify the recovery process of data, make data restore, only in order rank, no longer to influence other data, improves the efficiency of data recovery.

Description

The restoration methods and system of the other database data of order level
Technical field
The present invention relates to a kind of technology of order rank database restoration data, more particularly to a kind of other data of order level The restoration methods and system of library data.
Background technology
Database restoration is mainly inserted into the form of data to handle by full tables of data full dose in the prior art, but this Form cost is big, and time-consuming, and the data of influence are wide.
Invention content
The technical problem to be solved by the present invention is in order to overcome in the prior art database restoration cost it is big time-consuming, influence The wide defect of data, a kind of restoration methods and system of the other database data of order level are provided.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of restoration methods of the other database data of order level, include the following steps:
S1, for single target order, carry out the serializing processing of the other related data of order level, and be stored in local number According in library;
S2, when restoring the target order, according to local data base described in order inquiries, obtain the target order Serializing treated other preservation data of order level;
S3, the preservation data of acquisition and the current order data of the target order are compared, is judged described current Whether order data, which needs, updates, if so, thening follow the steps S4;
S4, the current order data are updated using the current order data of the target order.
Preferably, carrying out data persistence preservation to serializing treated data in step S1.
Preferably, step S4 includes:If the current order data have missing, work as to described according to the preservation data It is newly-increased that preceding order data carries out data;
The restoration methods further include:
For self-propagation field caused by newly-increased data, it is automatically updated in the relating value of other tables.For above-mentioned steps S4 In newly-increased data, in such a scenario, it may appear that major key self-propagation, therefore for self-propagation field needs automatically update.
Preferably, the restoration methods further include:
Time when according to current restoring, renewal time field.The word of time field, that is, all time formats datetime Section, recovery when, can judge whether the data type of current literary name section is datetime formats, if it does, needing to add Current time and Data Serialization elapsed time are poor.
It is an object of the invention to additionally provide a kind of recovery system of the other database data of order level, including serializing Processing module, enquiry module, contrast module and recovery module;
The serializing processing module, for for single target order, carrying out the sequence of the other related data of order level Change is handled, and is preserved in the local database;
The enquiry module, for when restoring the target order, according to local data base described in order inquiries, obtaining The serializing of the target order treated other preservation data of order level;
The contrast module, for carrying out the current order data of the preservations data obtained and the target order pair Than judging whether the current order data need to update, if so, calling the recovery module;
The recovery module, for being carried out to the current order data using the current order data of the target order Update.
Preferably, the serializing processing module is used to carry out data persistence preservation to serializing treated data.
Preferably, the recovery system further includes:
Self-propagation field update module, for for self-propagation field caused by newly-increased data, being automatically updated in other tables Relating value.
Preferably, the recovery system further includes:
Time field update module, time when for according to current restoring, renewal time field.
The positive effect of the present invention is that:The data that the present invention is gone out using order inquiries condition query, before comparison The data inquired judge whether the data of current table are consistent, are updated to current data, to simplify the recovery of data Process makes data restore, only in order rank, no longer to influence other data, improves the efficiency of data recovery.
Description of the drawings
Fig. 1 is the flow chart of the restoration methods of the other database data of order level of present pre-ferred embodiments.
Fig. 2 is the module diagram of the recovery system of the other database data of order level of present pre-ferred embodiments
Specific implementation mode
It is further illustrated the present invention below by the mode of embodiment, but does not therefore limit the present invention to the reality It applies among a range.
As shown in Figure 1, the restoration methods of the other database data of order level of the present invention include the following steps:
Step 101, for single target order, carry out the serializing processing of the other related data of order level, and be stored in In local data base;
Step 102, when restoring the target order, according to local data base described in order inquiries, obtain the target The serializing of order treated other preservation data of order level;
Step 103 compares the preservation data of acquisition and the current order data of the target order, described in judgement Whether current order data, which need, updates, if so, thening follow the steps 104;
Step 104 is updated the current order data using the current order data of the target order.
Wherein, data persistence preservation can be carried out to serializing treated data in a step 101, data persistence is just Be by the data model translation in memory it is storage model, and storage model is converted to the system of the data model in memory Claim.
In this embodiment, it is preferred that step 104 includes:If the current order data have missing, according to the guarantor It is newly-increased that deposit data carries out data to the current order data;For self-propagation field caused by newly-increased data, it is automatically updated in The relating value of other tables, also, can also ensure the validity of data according to time when currently restoring, renewal time field.
It names a detailed example to illustrate the restoration methods of the present invention, specifically comprise the following steps:
1. according to order number 3020408710, query SQL " SELECT*FROM FltOrderDB..O_Orders are built WHERE OrderID='3020408710' " inquire database, table are stored in after Data Serialization FlightBookingAutomation..Mirrors is named as " Mirror ";
2. according to order number 3020408710, inquiry table FlightBookingAutomation..Mirrors obtains sequence Rowization data " Mirror ", again according to order number 3020408710, structure query SQL " SELECT*FROM FltOrderDB..O_Orders WHERE OrderID='3020408710' " inquire current database;
3. in the data that current queries go out and serialized data " Mirror " data of FltOrderDB..O_Orders into Word for word section compares row, it is found that OrderStatus fields change, structure updates the data SQL " UPDATE FltOrderDB..O_Orders SET OrderStatus='T'WHERE OrderID='3020408710' " are executed more New SQL completes data and restores.
As shown in Fig. 2, the present invention also provides a kind of recovery system of the other database data of order level, including serializing Processing module 1, enquiry module 2, contrast module 3 and recovery module 4;
Wherein, the serializing processing module 1, for for single target order, carrying out the other related data of order level Serializing processing, and preserve in the local database, can specifically carry out data persistence preservation;
The enquiry module 2, for when restoring the target order, according to local data base described in order inquiries, obtaining The target order serializing treated other preservation data of order level;
The contrast module 3, for carrying out the current order data of the preservations data obtained and the target order pair Than judging whether the current order data need to update, if so, calling the recovery module;
The recovery module 4, for using the target order current order data to the current order data into Row update.
Preferably, the recovery system further includes:Self-propagation field update module 5, for for caused by newly-increased data Self-propagation field is automatically updated in the relating value of other tables.
Preferably, the recovery system further includes:Time field update module 6, time when for according to current restoring, Renewal time field.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that this is only For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from Under the premise of the principle and substance of the present invention, many changes and modifications may be made, but these change and Modification each falls within protection scope of the present invention.

Claims (8)

1. a kind of restoration methods of the other database data of order level, which is characterized in that include the following steps:
S1, for single target order, carry out the serializing processing of the other related data of order level, and be stored in local data base In;
S2, when restoring the target order, according to local data base described in order inquiries, obtain the sequence of the target order Change treated other preservation data of order level;
S3, the preservation data of acquisition and the current order data of the target order are compared, judges the current order Whether data, which need, updates, if so, thening follow the steps S4;
S4, the current order data are updated using the current order data of the target order.
2. the restoration methods of the other database data of order level as described in claim 1, which is characterized in that sequence in step S1 Rowization treated data carry out data persistence preservation.
3. the restoration methods of the other database data of order level as described in claim 1, which is characterized in that step S4 includes: If the current order data have missing, it is newly-increased that data are carried out to the current order data according to the preservation data;
The restoration methods further include:
For self-propagation field caused by newly-increased data, it is automatically updated in the relating value of other tables.
4. the restoration methods of the other database data of order level as described in claim 1, which is characterized in that the restoration methods Further include:
Time when according to current restoring, renewal time field.
5. a kind of recovery system of the other database data of order level, which is characterized in that including serializing processing module, inquiry mould Block, contrast module and recovery module;
The serializing processing module, at the serializing for for single target order, carrying out the other related data of order level Reason, and preserve in the local database;
The enquiry module, for when restoring the target order, according to local data base described in order inquiries, described in acquisition The serializing of target order treated other preservation data of order level;
The contrast module is sentenced for comparing the preservation data obtained and the current order data of the target order Whether the current order data of breaking need to update, if so, calling the recovery module;
The recovery module carries out more the current order data for the current order data using the target order Newly.
6. the recovery system of the other database data of order level as claimed in claim 5, which is characterized in that at the serializing Module is managed to be used to carry out data persistence preservation to serializing treated data.
7. the recovery system of the other database data of order level as claimed in claim 5, which is characterized in that the recovery system Further include:
Self-propagation field update module, for for self-propagation field caused by newly-increased data, being automatically updated in the pass of other tables Connection value.
8. the recovery system of the other database data of order level as claimed in claim 5, which is characterized in that the recovery system Further include:
Time field update module, time when for according to current restoring, renewal time field.
CN201810283557.9A 2018-04-02 2018-04-02 Method and system for recovering database data of order level Active CN108536798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810283557.9A CN108536798B (en) 2018-04-02 2018-04-02 Method and system for recovering database data of order level

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810283557.9A CN108536798B (en) 2018-04-02 2018-04-02 Method and system for recovering database data of order level

Publications (2)

Publication Number Publication Date
CN108536798A true CN108536798A (en) 2018-09-14
CN108536798B CN108536798B (en) 2020-12-01

Family

ID=63482712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810283557.9A Active CN108536798B (en) 2018-04-02 2018-04-02 Method and system for recovering database data of order level

Country Status (1)

Country Link
CN (1) CN108536798B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767286A (en) * 2020-06-29 2020-10-13 携程旅游网络技术(上海)有限公司 Data mirror image backup method, test method and system based on order
CN111782667A (en) * 2020-06-22 2020-10-16 成都校精灵科技有限公司 MongoDB updating data driving method, system and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064439A1 (en) * 2002-09-13 2004-04-01 Netezza Corporation Computer method and system for concurrency control using dynamic serialization ordering
CN101650717A (en) * 2008-08-13 2010-02-17 阿里巴巴集团控股有限公司 Method and system for saving storage space of database
US20130117755A1 (en) * 2011-11-08 2013-05-09 Mckesson Financial Holdings Apparatuses, systems, and methods for distributed workload serialization
CN103902702A (en) * 2014-03-31 2014-07-02 北京车商汇软件有限公司 Data storage system and data storage method
CN104021492A (en) * 2014-05-23 2014-09-03 中国科学院计算技术研究所 On-line purchasing method for protecting secretes of customer and system thereof
CN104299135A (en) * 2014-09-27 2015-01-21 武钢集团昆明钢铁股份有限公司 Online payment system and method
CN105138649A (en) * 2015-08-26 2015-12-09 小米科技有限责任公司 Data search method and device and terminal
CN105184575A (en) * 2015-07-17 2015-12-23 中国科学院计算技术研究所 Transaction system construction method, transaction flow control device, and third-party transaction platform
CN105653653A (en) * 2015-12-28 2016-06-08 上海瀚之友信息技术服务有限公司 Order form data synchronization method and system
CN106339274A (en) * 2015-07-14 2017-01-18 阿里巴巴集团控股有限公司 Method and system for obtaining data snapshot
CN106897852A (en) * 2017-01-27 2017-06-27 华南理工大学 For the Order Sorting optimization method of logistics
CN107291938A (en) * 2017-07-06 2017-10-24 携程旅游网络技术(上海)有限公司 Order Query System and method
CN107315751A (en) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 Multidimensional data query method and device
CN107341262A (en) * 2017-07-14 2017-11-10 上海达梦数据库有限公司 The serializing of object type row, unserializing method and device in database

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064439A1 (en) * 2002-09-13 2004-04-01 Netezza Corporation Computer method and system for concurrency control using dynamic serialization ordering
CN101650717A (en) * 2008-08-13 2010-02-17 阿里巴巴集团控股有限公司 Method and system for saving storage space of database
US20130117755A1 (en) * 2011-11-08 2013-05-09 Mckesson Financial Holdings Apparatuses, systems, and methods for distributed workload serialization
CN103902702A (en) * 2014-03-31 2014-07-02 北京车商汇软件有限公司 Data storage system and data storage method
CN104021492A (en) * 2014-05-23 2014-09-03 中国科学院计算技术研究所 On-line purchasing method for protecting secretes of customer and system thereof
CN104299135A (en) * 2014-09-27 2015-01-21 武钢集团昆明钢铁股份有限公司 Online payment system and method
CN106339274A (en) * 2015-07-14 2017-01-18 阿里巴巴集团控股有限公司 Method and system for obtaining data snapshot
CN105184575A (en) * 2015-07-17 2015-12-23 中国科学院计算技术研究所 Transaction system construction method, transaction flow control device, and third-party transaction platform
CN105138649A (en) * 2015-08-26 2015-12-09 小米科技有限责任公司 Data search method and device and terminal
CN105653653A (en) * 2015-12-28 2016-06-08 上海瀚之友信息技术服务有限公司 Order form data synchronization method and system
CN107315751A (en) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 Multidimensional data query method and device
CN106897852A (en) * 2017-01-27 2017-06-27 华南理工大学 For the Order Sorting optimization method of logistics
CN107291938A (en) * 2017-07-06 2017-10-24 携程旅游网络技术(上海)有限公司 Order Query System and method
CN107341262A (en) * 2017-07-14 2017-11-10 上海达梦数据库有限公司 The serializing of object type row, unserializing method and device in database

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782667A (en) * 2020-06-22 2020-10-16 成都校精灵科技有限公司 MongoDB updating data driving method, system and storage medium
CN111782667B (en) * 2020-06-22 2024-05-17 成都校精灵科技有限公司 MongoDB updated data driving method, system and storage medium
CN111767286A (en) * 2020-06-29 2020-10-13 携程旅游网络技术(上海)有限公司 Data mirror image backup method, test method and system based on order

Also Published As

Publication number Publication date
CN108536798B (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN102129478B (en) Database synchronization method and system thereof
CN106570086B (en) Data migration system and data migration method
CN111459985B (en) Identification information processing method and device
US7464097B2 (en) Managing data integrity using a filter condition
US7127475B2 (en) Managing data integrity
CN109977110A (en) Data cleaning method, device and equipment
CN102236672A (en) Method and device for importing data
CN107016019B (en) Database index creation method and device
CN109299157B (en) Data export method and device for distributed big single table
CN105100050A (en) User permission management method and system
CN102567505B (en) Distributed database and data manipulation method
CN104462169A (en) Method and a system for merging data into a database table
CN106528641B (en) Data storage method and device and communication gateway machine
US20180276252A1 (en) Data Storage Method And Coordinator Node
CN108536798A (en) The restoration methods and system of the other database data of order level
CN107169003B (en) Data association method and device
CN114911830A (en) Index caching method, device, equipment and storage medium based on time sequence database
CN105446824B (en) Table increment acquisition methods and long-distance data backup method
CN115145943A (en) Multi-data-source metadata rapid comparison method, system, device and storage medium
CN105160036B (en) A kind of enterprise's non-silver information query method
CN109274734B (en) Service process calling method and device based on Internet of things cloud platform
CN107656943B (en) Task query method and server
CN114064674A (en) Data synchronization method, device, computer equipment, storage medium and product
CN114860806A (en) Data query method and device of block chain, computer equipment and storage medium
CN111626662B (en) Method for extracting warehouse network monitoring information

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
GR01 Patent grant
GR01 Patent grant