CN104133827B - A kind of database update method and the system of renewal - Google Patents
A kind of database update method and the system of renewal Download PDFInfo
- Publication number
- CN104133827B CN104133827B CN201310455063.1A CN201310455063A CN104133827B CN 104133827 B CN104133827 B CN 104133827B CN 201310455063 A CN201310455063 A CN 201310455063A CN 104133827 B CN104133827 B CN 104133827B
- Authority
- CN
- China
- Prior art keywords
- database
- logical data
- data base
- title
- renewal
- 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.)
- Active
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/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)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention is applicable to data processing field, and provide a kind of database update method and renewal system, described method comprises: receive the database update request that plug-in unit sends, described database update request comprises database update information; The logical data library information preserved in the described database update information received and physical database is compared; According to the result of described comparison, logical data base is upgraded.The embodiment of the present invention, the logical data base of multiple data comprised in part physical database is created in physical database, when the database update request receiving plug-in unit, the logical data base created is upgraded, the version number of physical database and title all can not be changed, the renewal of the database of other plug-in units can not be had influence on.
Description
Technical field
The invention belongs to data processing field, particularly relate to a kind of database update method and renewal system.
Background technology
Database is the part that people often use when using electronic equipment, preserves data in database, and the plug-in unit on these data supply electronic equipment uses.But in prior art, in order to performance and convenient management, all plug-in units all share a database, and the title of the database that each plug-in unit uses is different with version number, namely plug-in unit needs independently more new database, plug-in unit by database update be after the database-name and database version that this plug-in unit is corresponding after, other plug-in unit just cannot use the database after renewal.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of database update method and renewal system, shares to solve prior art database, and after a update of plug-in, after database, other plug-in units cannot the problem in usage data storehouse.
The embodiment of the present invention is achieved in that a kind of database update method, and described method comprises:
Receive the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: upgrade the title of rear database and upgrade the version number of rear database;
The logical data library information preserved in the described database update information received and physical database is compared, described logical data base preserves the partial data of described physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base;
According to the result of described comparison, upgrade logical data base, described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
Another object of the embodiment of the present invention is to provide a kind of database update system, and described system comprises:
Receiving element, for receiving the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: the title of database and the version number of the rear database of renewal after upgrading;
Comparing unit, logical data library information for preserving in the database update information that received by described receiving element and physical database is compared, described logical data base preserves the partial data of described physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base;
Updating block, for the result according to described comparing unit comparison, upgrade logical data base, described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
The embodiment of the present invention, the logical data base of multiple data comprised in part physical database is created in physical database, when the database update request receiving plug-in unit, the logical data base created is upgraded, the version number of physical database and title all can not be changed, the renewal of the database of other plug-in units can not be had influence on.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The process flow diagram of the database update method that Fig. 1 provides for the embodiment of the present invention;
The structural drawing of the database update system that Fig. 2 provides for the embodiment of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The embodiment of the present invention, the logical data base of multiple data comprised in part physical database is created in physical database, when the database update request receiving plug-in unit, the logical data base created is upgraded, the version number of physical database and title all can not be changed, the renewal of the database of other plug-in units can not be had influence on.
In order to technical solutions according to the invention are described, be described below by specific embodiment.
Embodiment one
Be illustrated in figure 1 the process flow diagram of the database update method that the embodiment of the present invention provides, described method comprises:
In step S101, receive the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: upgrade the title of rear database and upgrade the version number of rear database.
In embodiments of the present invention, terminal receives the database update request of the plug-in unit transmission be arranged in terminal, comprises database update information in database update request, that is: upgrade the title of rear database and upgrade the version number of rear database.
In step s 102, the logical data library information preserved in the described database update information received and physical database is compared, described logical data base preserves the partial data of described physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base.
In embodiments of the present invention, logical data base is that plug-in unit uses the data creation of preserving in physical database, and logical data base saves the partial information of physical database.Terminal is after receiving database update request, and compared by the logical data library information preserved in the described storehouse lastest imformation received and database, the logical data library information preserved in physical database can be preserved in table form.Same logical data base information comprises: the title of logical data base and the version number of logical data base.Described step of being compared by the logical data library information preserved in the described database update information received and physical data, comprising:
The title of 1, comparison logical data base and the title of database after upgrading, determine whether to comprise in described physical database according to the result of described comparison the logical data base that the title of database is corresponding after described renewal.
In embodiments of the present invention, what first contrast is the title of logical data base and the title of the rear database of renewal, the logical data base corresponding according to the title whether comprising the rear database of renewal in the result determination physical database of comparison, the result of different title comparisons, will use different update methods in subsequent steps.
If 2 described physical databases comprise the logical data base that the title of database is corresponding after described renewal, the version number of database after the version number of logical data base described in comparison and described renewal.
In embodiments of the present invention, if physical database comprise upgrade after logical data base corresponding to the title of database, so with regard to the version number of comparison logical data base and the version number of the rear database of renewal, same, the result of different version number's comparisons, also will use different update methods in subsequent steps.
In step s 103, according to the result of described comparison, upgrade logical data base, described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
In embodiments of the present invention, according to different comparison results, terminal carries out different renewals to the logical data base of preserving in physical database.The described result according to described comparison, to the step that logical data base upgrades, comprising:
If the logical data base that after not comprising described renewal in 1 described physical database, the title of database is corresponding, then create the logical data base that the title of data is corresponding after described renewal.
If 2 described physical databases comprise the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base is lower than the version number of database after described renewal, then carry out updating operation to described logical data base.
If 3 described physical databases comprise the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base is higher than the version number of database after described renewal, then carry out degraded operation to described logical data base.
The embodiment of the present invention, the logical data base of multiple data comprised in part physical database is created in physical database, when the database update request receiving plug-in unit, the logical data base created is upgraded, the version number of physical database and title all can not be changed, the renewal of the database of other plug-in units can not be had influence on.
As an embodiment of the present invention, before described step of being compared by the logical data library information preserved in the described database update information received and physical database, described method also comprises:
Encapsulate described physical database, to make described physical database, described plug-in unit is shielded.
In embodiments of the present invention, by encapsulation physical database, the title of physical database and version number are shielded to plug-in unit, and then in follow-up comparison step, plug-in unit can not the title of comparison physical database and version number, can only the title of comparison logical data base and version number.
As another alternative embodiment of the invention, in the described result according to described comparison, after the step upgrade logical data base, described method also comprises:
Preserve the information of the logical data base after renewal, the information of the logical data base after described renewal comprises: upgrade the title of rear logical data base and upgrade the version number of rear logical data base.
Embodiment two
Be illustrated in figure 2 the structural drawing of the database update system that the embodiment of the present invention provides, for convenience of explanation, the part relevant to the embodiment of the present invention be only shown, comprise:
Receiving element 201, for receiving the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: the title of database and the version number of the rear database of renewal after upgrading.
In embodiments of the present invention, the receiving element 201 of terminal receives the database update request that the plug-in unit be arranged in terminal sends, database update information is comprised, that is: the title of database and the version number of the rear database of renewal after upgrading in database update request.
Comparing unit 202, logical data library information for preserving in the database update information that received by described receiving element 201 and physical database is compared, described logical data base preserves the partial data of described physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base.
In embodiments of the present invention, logical data base is that plug-in unit uses the data creation of preserving in physical database, and logical data base saves the partial information of physical database.Terminal is after receiving database update request, the logical data library information preserved in the described storehouse lastest imformation received and database is compared by comparing unit 202, and the logical data library information preserved in physical database can be preserved in table form.Same logical data base information comprises: the title of logical data base and the version number of logical data base.Described comparing unit 202, comprising:
Title comparer unit 2021, for the title of comparison logical data base and the title of database after upgrading, determines whether to comprise in described physical database according to the result of described comparison the logical data base that the title of database is corresponding after described renewal.
In embodiments of the present invention, first contrast the title of logical data base by title comparer unit 2021 and upgrade the title of rear database, the logical data base corresponding according to the title whether comprising the rear database of renewal in the result determination physical database of comparison, the result of different title comparisons, will use different update methods in subsequent steps.
Version number's comparer unit 2022, if comprise for the physical database of described title comparer unit 2021 comparison the logical data base that the title of database is corresponding after described renewal, the version number of database after the version number of logical data base described in comparison and described renewal.
In embodiments of the present invention, if title comparer unit 2021 physical database comprise upgrade after logical data base corresponding to the title of database, the so version number of version number's comparer unit 2022 with regard to comparison logical data base and version number of the rear database of renewal, same, the result of different version number's comparisons, also will use different update methods in subsequent steps.
Updating block 203, for the result according to the comparison of described comparing unit 202, upgrades logical data base, and described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
In embodiments of the present invention, according to different comparison results, terminal carries out different renewals to the logical data base of preserving in physical database.Described updating block 203, comprising:
Creating subelement 2031, if for not comprising the logical data base that the title of database is corresponding after described renewal in described physical database, then creating the logical data base that the title of data is corresponding after described renewal.
Upgrading subelement 2032, if comprise for described physical database the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base lower than the version number of database after described renewal, then carries out updating operation to described logical data base.
Degradation subelement 2033, if comprise for described physical database the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base higher than the version number of database after described renewal, then carries out degraded operation to described logical data base.
The embodiment of the present invention, the logical data base of multiple data comprised in part physical database is created in physical database, when the database update request receiving plug-in unit, the logical data base created is upgraded, the version number of physical database and title all can not be changed, the renewal of the database of other plug-in units can not be had influence on.
As an embodiment of the present invention, before the comparison of described comparing unit 202, described system also comprises:
Encapsulation unit 204, for encapsulating described physical database, shields described plug-in unit to make described physical database.
In embodiments of the present invention, encapsulation unit 204 encapsulates physical database, and the title of physical database and version number are shielded plug-in unit, and then in follow-up comparison step, plug-in unit can not the title of comparison physical database and version number, can only the title of comparison logical data base and version number.
As another alternative embodiment of the invention, after described updating block 203 upgrades, described system also comprises:
Storage unit 205, for preserving the information of the logical data base after renewal, the information of the logical data base after described renewal comprises: the title of logical data base and the version number of the rear logical data base of renewal after upgrading.
One of ordinary skill in the art will appreciate that the unit included by above-described embodiment is carry out dividing according to function logic, but be not limited to above-mentioned division, as long as corresponding function can be realized; In addition, the concrete title of each functional unit, also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
Those of ordinary skill in the art it is also understood that, the all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program has come, as stored instruction in the system, performed by least one processor in this system, thus realize image processing method.In the present embodiment, described program can be stored in the read/write memory medium of system, and described storage medium comprises ROM/RAM, disk, CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a database update method, is characterized in that, described method comprises:
Receive the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: upgrade the title of rear database and upgrade the version number of rear database;
The logical data library information preserved in the described database update information received and physical database is compared, logical data base is that plug-in unit uses the data creation of preserving in physical database, logical data base saves the partial information of physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base;
According to the result of described comparison, upgrade logical data base, described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
2. the method for claim 1, before described step of being compared by the logical data library information preserved in the described database update information received and physical database, described method also comprises:
Encapsulate described physical database, to make described physical database, described plug-in unit is shielded.
3. the method for claim 1, in the described result according to described comparison, after the step upgrade logical data base, described method also comprises:
Preserve the information of the logical data base after renewal, the information of the logical data base after described renewal comprises: upgrade the title of rear logical data base and upgrade the version number of rear logical data base.
4. the method as described in any one of claims 1 to 3, is characterized in that, described step of being compared by the logical data library information preserved in the described database update information received and physical data, comprising:
The title of comparison logical data base and the title of database after upgrading, determine whether to comprise in described physical database according to the result of described comparison the logical data base that the title of database is corresponding after described renewal;
If described physical database comprises the logical data base that the title of database is corresponding after described renewal, the version number of database after the version number of logical data base described in comparison and described renewal.
5. the method as described in any one of claims 1 to 3, is characterized in that, the described result according to described comparison, to the step that logical data base upgrades, comprising:
If the logical data base that after not comprising described renewal in described physical database, the title of database is corresponding, then create the logical data base that the title of data is corresponding after described renewal; Or,
If described physical database comprises the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base is lower than the version number of database after described renewal, then carry out updating operation to described logical data base; Or,
If described physical database comprises the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base is higher than the version number of database after described renewal, then carry out degraded operation to described logical data base.
6. a database update system, is characterized in that, described system comprises:
Receiving element, for receiving the database update request of plug-in unit transmission, described database update request comprises database update information, and described database update information comprises: the title of database and the version number of the rear database of renewal after upgrading;
Comparing unit, logical data library information for preserving in the database update information that received by described receiving element and physical database is compared, logical data base is that plug-in unit uses the data creation of preserving in physical database, logical data base saves the partial information of physical database, and described logical data base information comprises: the title of logical data base and the version number of logical data base;
Updating block, for the result according to described comparing unit comparison, upgrade logical data base, described renewal comprises: create logical data base, or degradation logical data base, or upgrade logic database.
7. system as claimed in claim 6, it is characterized in that, before described comparing unit comparison, described system also comprises:
Encapsulation unit, for encapsulating described physical database, shields described plug-in unit to make described physical database.
8. system as claimed in claim 6, is characterized in that, after described updating block upgrades, described system also comprises:
Storage unit, for preserving the information of the logical data base after renewal, the information of the logical data base after described renewal comprises: the title of logical data base and the version number of the rear logical data base of renewal after upgrading.
9. the system as described in any one of claim 6 ~ 8, is characterized in that, described comparing unit comprises:
Title comparer unit, for the title of comparison logical data base and the title of database after upgrading, determines whether to comprise in described physical database according to the result of described comparison the logical data base that the title of database is corresponding after described renewal;
Version number's comparer unit, if comprise for the physical database of described title comparer unit comparison the logical data base that the title of database is corresponding after described renewal, the version number of database after the version number of logical data base described in comparison and described renewal.
10. the system as described in any one of claim 6 ~ 8, is characterized in that, described updating block comprises:
Creating subelement, if for not comprising the logical data base that the title of database is corresponding after described renewal in described physical database, then creating the logical data base that the title of data is corresponding after described renewal; Or,
Upgrading subelement, if comprise for described physical database the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base lower than the version number of database after described renewal, then carries out updating operation to described logical data base; Or,
Degradation subelement, if comprise for described physical database the logical data base that the title of database is corresponding after described renewal, but the version number of described logical data base higher than the version number of database after described renewal, then carries out degraded operation to described logical data base.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310455063.1A CN104133827B (en) | 2013-09-29 | 2013-09-29 | A kind of database update method and the system of renewal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310455063.1A CN104133827B (en) | 2013-09-29 | 2013-09-29 | A kind of database update method and the system of renewal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104133827A CN104133827A (en) | 2014-11-05 |
CN104133827B true CN104133827B (en) | 2016-04-27 |
Family
ID=51806506
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310455063.1A Active CN104133827B (en) | 2013-09-29 | 2013-09-29 | A kind of database update method and the system of renewal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104133827B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107330604A (en) * | 2017-06-26 | 2017-11-07 | 携程旅游网络技术(上海)有限公司 | The management method and system of air ticket air control rule |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101464895A (en) * | 2009-01-21 | 2009-06-24 | 阿里巴巴集团控股有限公司 | Method, system and apparatus for updating internal memory data |
CN102088489A (en) * | 2010-12-31 | 2011-06-08 | 北京理工大学 | Distributed data synchronizing system and method |
CN102171660A (en) * | 2008-09-30 | 2011-08-31 | 赛门铁克公司 | Backing up and restoring selected versioned objects from a monolithic database backup |
-
2013
- 2013-09-29 CN CN201310455063.1A patent/CN104133827B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102171660A (en) * | 2008-09-30 | 2011-08-31 | 赛门铁克公司 | Backing up and restoring selected versioned objects from a monolithic database backup |
CN101464895A (en) * | 2009-01-21 | 2009-06-24 | 阿里巴巴集团控股有限公司 | Method, system and apparatus for updating internal memory data |
CN102088489A (en) * | 2010-12-31 | 2011-06-08 | 北京理工大学 | Distributed data synchronizing system and method |
Also Published As
Publication number | Publication date |
---|---|
CN104133827A (en) | 2014-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103167465B (en) | A kind of embedded UICC card activation processing method and device | |
CN102541927B (en) | Method and device for realizing data cache | |
CN104202440B (en) | A kind of method of marking terminal, server and system | |
CN102202087B (en) | Method for identifying storage equipment and system thereof | |
CN104536869A (en) | Mobile terminal and resource management method thereof | |
CN104158858A (en) | Method and system for accessing distributed cluster file system | |
CN106937275B (en) | Equipment for storing system unique identifier and hardware ID (identity) under android system | |
CN104516794A (en) | Database document backup method, device and system | |
CN104935469A (en) | Distributive storage method and system for log information | |
CN102141926A (en) | Application program management method, device and digital television set top box | |
CN104951342A (en) | Method and device for adjusting starting sequence | |
CN104484460A (en) | Metadata heat degree statistical method of distributed file system | |
CN103902562A (en) | Method and device for upgrading terminal databases | |
CN104881454A (en) | Updating method and system of parameter | |
CN103440204B (en) | A kind of method of updating file system and memory device | |
CN108234551B (en) | Data processing method and device | |
CN105224418A (en) | A kind of data back up method and device | |
CN104484132A (en) | Data reduction method and device | |
CN104391654A (en) | Shared disk management method and system | |
CN104268097A (en) | Metadata processing method and system | |
CN104376397A (en) | Data real-time analysis method and device | |
CN104133827B (en) | A kind of database update method and the system of renewal | |
CN104407808A (en) | Method and device for writing in data | |
CN104506630A (en) | Method, server and system for generating authority data on basis of user roles | |
CN111311267A (en) | Multi-account risk prevention and control method, system and equipment |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210917 Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |