WO2007059698A1 - System and method for realizing database upgrading in background management system - Google Patents

System and method for realizing database upgrading in background management system Download PDF

Info

Publication number
WO2007059698A1
WO2007059698A1 PCT/CN2006/003103 CN2006003103W WO2007059698A1 WO 2007059698 A1 WO2007059698 A1 WO 2007059698A1 CN 2006003103 W CN2006003103 W CN 2006003103W WO 2007059698 A1 WO2007059698 A1 WO 2007059698A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
version
upgrade
file
description
Prior art date
Application number
PCT/CN2006/003103
Other languages
French (fr)
Chinese (zh)
Inventor
Zhutian Liang
Weining Bai
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2007059698A1 publication Critical patent/WO2007059698A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • G06F16/213Schema design and management with details for schema evolution support

Definitions

  • the present invention relates to a system and method for database upgrade, and more particularly to a system and method for implementing database upgrade in a background management system.
  • the existing database upgrade is to re-create the database after the background management system software version is upgraded and installed. All data tables related to the service or need to be customized need to be manually configured in the background management system client. Since the database corresponding to the software version of the background management system cannot be upgraded, but the database is re-created, the business data configured in the original version is also lost, which brings a lot of inconvenience to the foreground host data configuration. Therefore, the prior art has the following disadvantages:
  • the technical problem to be solved by the invention is that the database can be intelligently and automatically upgraded, and the source version and the destination version can be automatically recognized, and the database of the background management system is smoothly upgraded with the software version upgrade, thereby providing an application for embedded A system and method for implementing database upgrades in a background management system in a communication system.
  • the technical solution adopted by the present invention is: Providing a system for implementing database upgrade in a background management system, comprising a version identification subsystem, a version upgrade subsystem, and a description/knowledge system, wherein the version The identification subsystem generates and maintains a description/knowledge of the existing version database of the software; the version upgrade subsystem uses the description/knowledge to upgrade the database; the description/knowledge system is composed of several description files, which is a version upgrade The input to the system, the output of the version recognition subsystem.
  • the description file includes a database description file, a database version description file, a database version identification file, a database table description file, and an upgrade SQL script file between database versions. Pieces. ,,;, P
  • the technical solution adopted by the present invention is: Providing a method for implementing database upgrade in a background management system, comprising the following steps:
  • the version identification subsystem generates and maintains an existing version database of the software. Description/Knowledge;
  • the Version Upgrade Subsystem uses the above description/knowledge to upgrade the database.
  • a further improvement of the above technical solution is that the description/knowledge of the version identification subsystem generating and maintaining the existing version database of the software includes the following steps:
  • the version identification subsystem reads all database information that needs to be upgraded from the database description file;
  • the version identification subsystem generates a database version description file
  • the version identification subsystem generates a database version identification file
  • the version identification subsystem generates an upgrade SQL script file between database versions; f) the version identification subsystem generates a database table description file;
  • the version identification subsystem checks whether the inter-version upgrade relationship in the database version description file constitutes a directed acyclic graph. If a directed acyclic graph is formed, the version difference is compared, and the detailed report is output. If not, the end is ended. Version identification.
  • step d) is further included, that is, the version identification subsystem determines whether the table in the database has a constraint. If there is a constraint, the version identification subsystem generates the database and directly performs step e).
  • the method further includes: further improvement of the above technical solution: the version upgrade subsystem utilizes The above description/knowledge to upgrade the database includes the following steps:
  • the version upgrade subsystem reads all database information that needs to be upgraded from the database description file;
  • the version upgrade subsystem reads all version information of the database from the database version description file;
  • the version upgrade subsystem reads the database version feature information according to the database version identification file, and identifies the source version and the destination version of the database according to the version feature information;
  • the version upgrade subsystem reads the upgrade relationship between the database versions from the database version description file, and analyzes the shortest upgrade path from the source version to the destination version;
  • the version upgrade subsystem follows the shortest upgrade path from the source version to the destination version, performs an upgrade SQL script file between versions, adjusts the table structure and data of the source version database; m) the version upgrade subsystem from the database table description file Read the import data mode of all the tables, and import the data of each table from the source version database to the destination version database according to the method of importing data.
  • the step m) further includes the step of 1), that is, if the table has constraints, the pre-processed SQL script file of the table is executed before the data is imported, and the table is executed after the data is imported. Post-processing SQL script files.
  • Step k The analysis of the shortest upgrade path from the source version to the destination version uses an algorithm for finding the shortest path from a source point to the remaining vertices in the directed acyclic graph.
  • the invention has the beneficial effects that: because the invention uses the version identification subsystem, the version upgrading subsystem and the description/knowledge system to realize the database upgrade in the background management system, it can realize intelligent and automatic upgrade without requiring a person. Participation, can automatically identify the source version and the destination version, realize that the background management system database is smoothly upgraded with the software version upgrade, the description-based database upgrade method makes the system have good scalability; in addition, the invention can be integrated into post-management In the module software installation disk, the upgrade installation option is provided, the data is upgraded while the module software is being managed after installation, and most of the consistency check of the database upgrade is completed by the system, thereby reducing the work of the development/maintenance personnel; Since the shortest upgrade path from the source version to the destination version of the analysis of the present invention uses an algorithm for finding the shortest path from a source point to the remaining vertices in the acyclic graph, the source version can be determined during the database upgrade process. Upgrade path and strategy to the destination version When upgrading from a lower version of the background management
  • FIG. 1 is a system architecture diagram of a database upgrade implemented in a background management system of the present invention
  • FIG. 2 is a schematic diagram of a version identification subsystem of the system shown in FIG.
  • FIG. 3 is a schematic diagram of the working process of the version upgrade subsystem of the system shown in FIG. 1;
  • a system for implementing database upgrade in a background management system includes a version identification subsystem 110, a version upgrade subsystem 120, and a description/knowledge system 130, wherein the version identification subsystem 110 generates and maintains software.
  • the version identification subsystem 110 generates and maintains software.
  • There is a description/knowledge of each version database the version upgrade subsystem 120 uses the above description/knowledge to upgrade the database; the description/knowledge system 130 consists of several description files, which are inputs to the version upgrade subsystem.
  • the output of the version identification subsystem including: database description file, database version description file, database version identification file, pre-processed SQL script file, post-processing SQL script file, database table description file, and database script version upgrade SQL script file. among them:
  • the database information of the version contains all the table information in the database, such as the meaning of the field for the host business table, the meaning of the field enumeration value, etc. for the table structure of all the tables, wherein the table structure definition is mandatory, and the rest are optional.
  • Preprocessing SQL script files are divided into: Database preprocessing SQL script files, table preprocessing SQL script files.
  • Each version of each database has at most one database pre-processed SQL script file, which is executed before the database imports data. Any special processing that needs to be performed before the database imports data can write SQL scripts in the file.
  • Each version of each database has at most one table pre-processing SQL script file for each table. It is executed before importing the table data. Any special processing that needs to be executed before importing the table data can write SQL scripts in the file. .
  • Post-processing SQL script files are divided into: Database post-processing SQL script files, and post-processing SQL script files.
  • Each version of each database has at most one database post-processing SQL script file, which is executed after the database imports data. Any special processing that needs to be executed after the database imports data can write SQL scripts in the file.
  • Each version of each database has at most one table post-processing SQL script file for each table. It is executed after importing the table data. Any special processing that needs to be executed after importing the table data can write SQL scripts in the file. .
  • An upgrade script for writing changes to the destination version relative to the source version If the destination version adds a table to the source version, you should write a script that creates the table. If the destination version has a reduced table relative to the source version, you should write a script that deletes the table. If there is a change in the structure of a table between two versions, including field definitions, enumeration value definitions, etc., an upgrade script should be written for it, which is responsible for adjusting the table structure and data to match the new version.
  • a there is default data, it is impossible to modify / delete the default data or add new data
  • b there is default data, it is impossible to modify / delete the default data but may add new data
  • c there is default data, may be modified / Delete default data but it is not possible to add new data
  • d have default data, may modify/delete default data or add new data
  • e no default data, may add new data.
  • the method of importing data is divided into the following types:
  • Method 0 Fully retain the default data of the new version, suitable for the database table of type a;
  • Mode 1 Fully import the data in the old version, suitable for the database table of type d and e;
  • Mode 2 Custom SQL script mode, more flexible , can fit the database tables of types b and c, and some special cases that may not have been considered.
  • the method for implementing database upgrade in the background management system of the present invention includes the steps of the version identification subsystem generating and maintaining the description/knowledge of the existing version of the software database and the step of upgrading the database by the version upgrade subsystem using the above description/knowledge.
  • the version identification subsystem of the system for implementing database upgrade in the background management system is outputted by the description/knowledge system, and is responsible for generating correctness and consistency of the description file and the inspection description file.
  • Version identification subsystem generation and maintenance software The description/knowledge of the version database includes the following steps:
  • the version identification subsystem reads all database information that needs to be upgraded from the database description file;
  • the version identification subsystem generates a database version description file
  • the version identification subsystem generates a database version identification file
  • the version identification subsystem determines whether the table in the database has a constraint. If there is a constraint, the version identification subsystem generates a database version of the pre-processed SQL script file and the post-processing SQL script file. If there is no constraint, the step e is directly executed. );
  • the version identification subsystem generates an upgrade SQL script file between the database versions; if the import method of the above mode 1 is to import the data in the old version completely, after the database script version is upgraded, the SQL script file may be upgraded according to the actual situation. It is required to manually write the SQL script file between the database versions; of course, the manual writing is an optional step;
  • the version identification subsystem generates a database table description file
  • the version identification subsystem checks whether the inter-version upgrade relationship in the database version description file constitutes a directed acyclic graph. If a directed acyclic graph is formed, the version difference is compared, and a detailed report is output. If not, the end version is Identification.
  • the version upgrade subsystem that implements database upgrade in the background management system uses the description file generated by the version identification subsystem to upgrade the database.
  • the version upgrade subsystem uses the above description/knowledge to upgrade the database, including the following steps. : h)
  • the version upgrade subsystem reads all database information that needs to be upgraded from the database description file;
  • the version upgrade subsystem reads all version information of the database from the database version description file;
  • the version upgrade subsystem reads the database version feature information according to the database version identification file, and identifies the source version and the destination version of the database according to the version feature information;
  • the version upgrade subsystem reads the upgrade relationship between the database versions from the database version description file, and analyzes the shortest upgrade path from the source version to the destination version;
  • the version upgrade subsystem follows the shortest upgrade path from the source version to the destination version. Upgrade the SQL script file between the line versions, adjust the table structure and data of the source version database; m) The version upgrade subsystem reads the import data mode of all the tables from the database table description file, according to the method of importing data, The data is imported into the destination version database from the source version database. If the table has constraints, the pre-processed SQL script file of the table is executed before the data is imported, and the SQL script file of the table is executed after the data is imported.
  • the shortest upgrade path from the source version to the destination version of the analysis described in step k) uses an algorithm for finding the shortest path from a source point to the remaining vertices in the directed acyclic graph.
  • a directed acyclic graph is shown in an embodiment of the present invention, wherein VI, V2, V3, V4, V5, and V6 constitute a version of the existing software.
  • a directed arc connection between vertices indicates that a version can be upgraded to another version, as described in the technical scenario, that is, there is an upgrade relationship between the two versions. For example, upgrading from version VI to V6 has the following upgrade paths:
  • the shortest path can be analyzed as VI.
  • V3 V6 which is the shortest path to upgrade the database version VI to V6.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (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)
  • Stored Programmes (AREA)

Abstract

A system for realizing database upgrading in background management system, includes a version identification sub-system, a version upgrading sub-system and a description/knowledge system. The version identification sub-system generates and maintains the description/knowledge of current each version database of the software; the version upgrading sub-system upgrades the database utilizing the description/knowledge; the description/knowledge system consisting of several description files is the input of the version upgrading sub-system and is the output of the version identification sub-system. A method corresponding the database upgrading includes the step that the version identification sub-system generates and maintains the description/knowledge of current each version database of the software and the step that the version upgrading sub-system upgrades the database utilizing the description/knowledge. The system and the method can be applied to the embedded communication system, and can implement intelligentized and automatic upgrade, and can identify the source version and the object version automatically and implement the smooth upgrade of the database of the background management system with the upgrade of the software version.

Description

在后台管理***中实现数据库升级的***和方法  System and method for implementing database upgrade in background management system
本申请要求于 2005年 11 月 26 日提交中国专利局、 申请号为 200510101859.2、 发明名称为"在后台管理***中实现数据库升级的 ***和方法"的中国专利申请的优先权, 其全部内容通过引用结合在 本申请中。  This application claims priority to Chinese Patent Application No. 200510101859.2, entitled "System and Method for Implementing Database Upgrade in Background Management System", filed on November 26, 2005, the entire contents of which are incorporated by reference. Combined in this application.
技术领域 本发明涉及一种数据库升级的***和方法,尤其涉及一种在后台 管理***中实现数据库升级的***和方法。 TECHNICAL FIELD The present invention relates to a system and method for database upgrade, and more particularly to a system and method for implementing database upgrade in a background management system.
背景技术 软件产品在完全停止开发以前, 都存在版本升级的可能, 由于种 种原因, 需要由低版本升级到高版本。 在嵌入式通信***中一般采用 前后台这种体系结构, 前台是嵌入式***主机, 后台是 Windows NT/2000平台的管理***, 在后台管理***中应用关系数据库保存主 机数据。在后台管理***软件版本升级时,有必要升级相应版本的数 据库, 方便版本升级。 BACKGROUND OF THE INVENTION Software products have the potential to be upgraded before they are completely stopped. For various reasons, it is necessary to upgrade from a lower version to a higher version. In the embedded communication system, the front-end and back-end architecture is generally adopted. The foreground is the embedded system host, and the background is the management system of the Windows NT/2000 platform. In the background management system, the relational database is used to save the host data. When upgrading the background management system software version, it is necessary to upgrade the corresponding version of the database to facilitate the version upgrade.
现有的数据库升级是当后台管理***软件版本升级安装后,重新 创建数据库,所有与业务相关或者需要定制的数据表数据需要在后台 管理***客户端重新手工配置。由于与后台管理***的软件版本相应 的数据库不能随之升级, 而是要重新创建数据库, 因此原版本中配置 的业务数据也随之丟失了, 这给前台主机数据配置带来了很多不便。 故现有技术存在以下缺点:  The existing database upgrade is to re-create the database after the background management system software version is upgraded and installed. All data tables related to the service or need to be customized need to be manually configured in the background management system client. Since the database corresponding to the software version of the background management system cannot be upgraded, but the database is re-created, the business data configured in the original version is also lost, which brings a lot of inconvenience to the foreground host data configuration. Therefore, the prior art has the following disadvantages:
1.在业务数据表较多的情况下,重新配置数据需要耗费大量的人 力;  1. In the case of a large number of business data tables, reconfiguring the data requires a lot of human resources;
2.还原原版本的配置数据时误配率高, 某些数据表易漏配,, '从而 增加了开发和测试人员问题定位的难度;  2. When the original version of the configuration data is restored, the mismatch rate is high, and some data tables are easily missed, which increases the difficulty of positioning the development and test personnel.
3.重新配置数据所花费的时间成本长, 不利于快速响应客户需 求; 4.做不到数据库随后台管理***软件版本的无缝升级。 3. The time and cost of reconfiguring the data is long, which is not conducive to responding quickly to customer needs; 4. Can not do the database and then seamlessly upgrade the software version of the management system.
发明内容 Summary of the invention
本发明所要解决的技术问题在于使数据库能智能化和自动化升 级, 能自动识别源版本和目的版本, 实现后台管理***的数据库随软 件版本升级而平滑升级, 因此, 提供了一种应用于嵌入式通信***中 的在后台管理***中实现数据库升级的***和方法。  The technical problem to be solved by the invention is that the database can be intelligently and automatically upgraded, and the source version and the destination version can be automatically recognized, and the database of the background management system is smoothly upgraded with the software version upgrade, thereby providing an application for embedded A system and method for implementing database upgrades in a background management system in a communication system.
为解决上述技术问题, 本发明所采用的技术方案是: 提供一种在 后台管理***中实现数据库升级的***, 其包括版本识别子***、 版 本升级子***和描述 /知识***, 其中所述版本识别子***产生和维 护软件现有各个版本数据库的描述 /知识; 所述版本升级子***利用 所述描述 /知识对数据库进行升级; 所述描述 /知识***由若干描述文 件组成, 是版本升级子***的输入, 版本识别子***的输出。  In order to solve the above technical problem, the technical solution adopted by the present invention is: Providing a system for implementing database upgrade in a background management system, comprising a version identification subsystem, a version upgrade subsystem, and a description/knowledge system, wherein the version The identification subsystem generates and maintains a description/knowledge of the existing version database of the software; the version upgrade subsystem uses the description/knowledge to upgrade the database; the description/knowledge system is composed of several description files, which is a version upgrade The input to the system, the output of the version recognition subsystem.
上述技术方案的进一步改进在于:所述描述文件包括数据库描述 文件、 数据库版本描述文件、 数据库版本识别文件、 数据库表描述文 件和数据库版本间升级 SQL脚本文件。 件。 、、 ; 、 P A further improvement of the above technical solution is that the description file includes a database description file, a database version description file, a database version identification file, a database table description file, and an upgrade SQL script file between database versions. Pieces. ,,;, P
为解决上述另一技术问题, 本发明所采用的技术方案是: 提供一 种在后台管理***中实现数据库升级的方法, 其包括以下步骤: 版本 识别子***产生和维护软件现有各个版本数据库的描述 /知识; 版本 升级子***利用上述描述 /知识对数据库进行升级。  In order to solve the above other technical problem, the technical solution adopted by the present invention is: Providing a method for implementing database upgrade in a background management system, comprising the following steps: The version identification subsystem generates and maintains an existing version database of the software. Description/Knowledge; The Version Upgrade Subsystem uses the above description/knowledge to upgrade the database.
上述技术方案的进一步改进在于:所述版本识别子***产生和维 护软件现有各个版本数据库的描述 /知识包括以下步骤:  A further improvement of the above technical solution is that the description/knowledge of the version identification subsystem generating and maintaining the existing version database of the software includes the following steps:
a) 版本识别子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息;  a) The version identification subsystem reads all database information that needs to be upgraded from the database description file;
b) 版本识别子***生成数据库版本描述文件;  b) the version identification subsystem generates a database version description file;
c)版本识别子***生成数据库版本识别文件;  c) the version identification subsystem generates a database version identification file;
e)版本识别子***生成数据库版本间升级 SQL脚本文件; f)版本识别子***生成数据库表描述文件; e) the version identification subsystem generates an upgrade SQL script file between database versions; f) the version identification subsystem generates a database table description file;
g)版本识别子***检查数据库版本描述文件中的版本间升级关 系是否构成有向无环图, 若构成有向无环图, 则比较版本差异, 输出 详细 4艮告, 若不构成, 则结束版本识别。  g) The version identification subsystem checks whether the inter-version upgrade relationship in the database version description file constitutes a directed acyclic graph. If a directed acyclic graph is formed, the version difference is compared, and the detailed report is output. If not, the end is ended. Version identification.
所述步骤 c)和 e)之间还包括步驟 d),即版本识别子***判断数据 库中的表是否存在约束, 若存在约束, 则版本识别子***生成数据库 则直接执行步驟 e)。  Between the steps c) and e), the step d) is further included, that is, the version identification subsystem determines whether the table in the database has a constraint. If there is a constraint, the version identification subsystem generates the database and directly performs step e).
当采用完全导入老版本中数据的导入方式时, 步骤 e ) 所述版本 识别子***生成数据库版本间升级 SQL脚本文件之后, 进一步包括: 上述技术方案的进一步改进在于:所述版本升级子***利用上述 描述 /知识对数据库进行升级包括以下步骤:  When the import mode of the data in the old version is completely imported, after the version identification subsystem generates the database version upgrade SQL script file, the method further includes: further improvement of the above technical solution: the version upgrade subsystem utilizes The above description/knowledge to upgrade the database includes the following steps:
h) 版本升级子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息;  h) The version upgrade subsystem reads all database information that needs to be upgraded from the database description file;
i)版本升级子***从数据库版本描述文件中,读取数据库的所有 版本信息;  i) The version upgrade subsystem reads all version information of the database from the database version description file;
j) 版本升级子***根据数据库版本识别文件,读取数据库版本特 征信息, 根据版本特征信息识别数据库的源版本和目的版本;  j) The version upgrade subsystem reads the database version feature information according to the database version identification file, and identifies the source version and the destination version of the database according to the version feature information;
k) 版本升级子***从数据库版本描述文件中, 读取数据库版本 间的升级关系, 分析得到从源版本到目的版本的最短升级路径;  k) The version upgrade subsystem reads the upgrade relationship between the database versions from the database version description file, and analyzes the shortest upgrade path from the source version to the destination version;
1)版本升级子***沿着从源版本到目的版本的最短升级路径,执 行版本间的升级 SQL脚本文件,调整源版本数据库的表结构和数据; m)版本升级子***从数据库表描述文件中, 读取所有表的导入 数据方式, 根据导入数据方式, 将各表的数据由源版本数据库导入目 的版本数据库。  1) The version upgrade subsystem follows the shortest upgrade path from the source version to the destination version, performs an upgrade SQL script file between versions, adjusts the table structure and data of the source version database; m) the version upgrade subsystem from the database table description file Read the import data mode of all the tables, and import the data of each table from the source version database to the destination version database according to the method of importing data.
所述步骤 m)进一步包括步骤] 1), 即如果该表存在约束, 则在导 入数据前执行该表的预处理 SQL脚本文件, 在导入数据后执行该表 的后处理 SQL脚本文件。 The step m) further includes the step of 1), that is, if the table has constraints, the pre-processed SQL script file of the table is executed before the data is imported, and the table is executed after the data is imported. Post-processing SQL script files.
步骤 k)所述的分析从源版本到目的版本的最短升级路径采用求 有向无环图中某源点到其余各顶点最短路径的算法。  Step k) The analysis of the shortest upgrade path from the source version to the destination version uses an algorithm for finding the shortest path from a source point to the remaining vertices in the directed acyclic graph.
本发明的有益效果是: 由于本发明釆用版本识别子***、版本升 级子***和描述 /知识***结合实现在后台管理***中的数据库升 级, 因此其能实现智能化和自动化升级, 不需要人参与, 能自动识别 源版本和目的版本,实现后台管理***的数据库随软件版本升级而平 滑升级, 该基于描述的数据库升级方法使得***具有良好的可扩充 性; 另外, 本发明能够集成到后管理模块软件安装盘中, 提供升级安 装选项, 在安装后管理模块软件的同时升级数据, 且数据库升级的绝 大部分一致性正确性的检查工作由***完成, 从而减少开发 /维护人 员工作; 再者, 由于本发明的分析从源版本到目的版本的最短升级路 径釆用的是求有向无环图中某源点到其余各顶点最短路径的算法,因 此在数据库升级过程中能确定从源版本到目的版本的升級路径和策 略, 当从后台管理***软件的低版本升级到高版本时, 它能寻找一条 最短的升级路径对数据库进行升级。  The invention has the beneficial effects that: because the invention uses the version identification subsystem, the version upgrading subsystem and the description/knowledge system to realize the database upgrade in the background management system, it can realize intelligent and automatic upgrade without requiring a person. Participation, can automatically identify the source version and the destination version, realize that the background management system database is smoothly upgraded with the software version upgrade, the description-based database upgrade method makes the system have good scalability; in addition, the invention can be integrated into post-management In the module software installation disk, the upgrade installation option is provided, the data is upgraded while the module software is being managed after installation, and most of the consistency check of the database upgrade is completed by the system, thereby reducing the work of the development/maintenance personnel; Since the shortest upgrade path from the source version to the destination version of the analysis of the present invention uses an algorithm for finding the shortest path from a source point to the remaining vertices in the acyclic graph, the source version can be determined during the database upgrade process. Upgrade path and strategy to the destination version When upgrading from a lower version of the background management system software to a higher version, it can find a shortest upgrade path to upgrade the database.
附图说明 图 1是本发明在后台管理***中实现数据库升级的***架构图; 图 2是图 1所示***的版本识别子***工作示意图; BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a system architecture diagram of a database upgrade implemented in a background management system of the present invention; FIG. 2 is a schematic diagram of a version identification subsystem of the system shown in FIG.
图 3是图 1所示***的版本升级子***工作示意图;  3 is a schematic diagram of the working process of the version upgrade subsystem of the system shown in FIG. 1;
图 4 是本发明分析源版本到目的版本升级路径的算法所釆用的 有向无环图。  4 is a directed acyclic graph used by the algorithm for analyzing the source path to the destination version upgrade path of the present invention.
具体实施方式 请参阅图 1 , 本发明在后台管理***中实现数据库升级的***包 括版本识别子*** 110、 版本升级子*** 120和描述 /知识*** 130, 其中版本识别子*** 110产生和维护软件现有各个版本数据库的描 述 /知识;版本升级子*** 120利用上述描述 /知识对数据库进行升级; 描述 /知识*** 130由若干描述文件组成, 是版本升级子***的输入, W 200 DETAILED DESCRIPTION Referring to FIG. 1, a system for implementing database upgrade in a background management system includes a version identification subsystem 110, a version upgrade subsystem 120, and a description/knowledge system 130, wherein the version identification subsystem 110 generates and maintains software. There is a description/knowledge of each version database; the version upgrade subsystem 120 uses the above description/knowledge to upgrade the database; the description/knowledge system 130 consists of several description files, which are inputs to the version upgrade subsystem. W 200
版本识别子***的输出, 描述文件包括: 数据库描述文件、 数据库版 本描述文件、 数据库版本识别文件、 预处理 SQL脚本文件、 后处理 SQL脚本文件、 数据库表描述文件和数据库版本间升级 SQL脚本文 件。 其中: The output of the version identification subsystem, including: database description file, database version description file, database version identification file, pre-processed SQL script file, post-processing SQL script file, database table description file, and database script version upgrade SQL script file. among them:
1 ) 数据库描述文件  1) Database description file
概述: 描述升级过程中所要升级的数据库的数据。 整个版本升 级***就使用一个该数据库描述文件。  Overview: Describes the data for the database to be upgraded during the upgrade process. One database description file is used for the entire version upgrade system.
2 ) 数据库版本描述文件  2) Database version description file
概述: 描述数据库的所有版本和版本间的升級关系。每个要升级 的数据库有一个该数据库版本描述文件。  Overview: Describes the upgrade relationship between all versions and versions of the database. There is one database version description file for each database to be upgraded.
3 ) 数据库版本识别文件  3) Database version identification file
概述: 保存该版本的数据库信息, 用于识别各个版本。 数据库的 每个版本有一个该数据库版本识别文件。版本的数据库信息包含数据 库中所有表信息,如对于所有表的表结构定义对于主机业务表的字段 含义、 字段枚举值含义等, 其中, 表结构定义是必选项, 其余是可选 项。  Overview: Save the database information for this version to identify each version. There is one database version identification file for each version of the database. The database information of the version contains all the table information in the database, such as the meaning of the field for the host business table, the meaning of the field enumeration value, etc. for the table structure of all the tables, wherein the table structure definition is mandatory, and the rest are optional.
4 ) 预处理 SQL脚本文件  4) Preprocessing SQL script files
概述: 预处理 SQL脚本文件分为: 数据库预处理 SQL脚本文 件, 表预处理 SQL脚本文件。 每个版本每个数据库最多有一个数据 库预处理 SQL脚本文件, 其在数据库导入数据前执行, 任何需要在 数据库导入数据前执行的特殊处理,都可以在该文件中写 SQL脚本。 每个版本每个数据库每个表最多有一个表预处理 SQL脚本文件, 其 在导入该表数据前执行, 任何需要在导入该表数据前执行的特殊处 理, 都可以在该文件中写 SQL脚本。  Overview: Preprocessing SQL script files are divided into: Database preprocessing SQL script files, table preprocessing SQL script files. Each version of each database has at most one database pre-processed SQL script file, which is executed before the database imports data. Any special processing that needs to be performed before the database imports data can write SQL scripts in the file. Each version of each database has at most one table pre-processing SQL script file for each table. It is executed before importing the table data. Any special processing that needs to be executed before importing the table data can write SQL scripts in the file. .
5 ) 后处理 SQL脚本文件  5) Post-processing SQL script file
概述: 后处理 SQL脚本文件分为: 数据库后处理 SQL脚本文 件, 表后处理 SQL脚本文件。 每个版本每个数据库最多有一个数据 库后处理 SQL脚本文件, 其在数据库导入数据后执行, 任何需要在 数据库导入数据后执行的'特殊处理,都可以在该文件中写 SQL脚本。 每个版本每个数据库每个表最多有一个表后处理 SQL脚本文件, 其 在导入该表数据后执行, 任何需要在导入该表数据后执行的特殊处 理, 都可以在该文件中写 SQL脚本。 Overview: Post-processing SQL script files are divided into: Database post-processing SQL script files, and post-processing SQL script files. Each version of each database has at most one database post-processing SQL script file, which is executed after the database imports data. Any special processing that needs to be executed after the database imports data can write SQL scripts in the file. Each version of each database has at most one table post-processing SQL script file for each table. It is executed after importing the table data. Any special processing that needs to be executed after importing the table data can write SQL scripts in the file. .
6 ) 数据库版本间升级 SQL脚本文件  6) Upgrade SQL script files between database versions
概述: 用于写目的版本相对源版本变化的升级脚本。 如果目的版 本相对源版本增加了表, 应该写创建表的脚本。 如果目的版本相对源 版本减少了表, 应该写删除表的脚本。 如果两个版本之间, 某表结构 的变化, 包括字段定义,枚举值定义等的变化,应该为它写升级脚本, 负责调整表结构和数据, 使其与新版本一致。  Overview: An upgrade script for writing changes to the destination version relative to the source version. If the destination version adds a table to the source version, you should write a script that creates the table. If the destination version has a reduced table relative to the source version, you should write a script that deletes the table. If there is a change in the structure of a table between two versions, including field definitions, enumeration value definitions, etc., an upgrade script should be written for it, which is responsible for adjusting the table structure and data to match the new version.
7 ) 数据库表描述文件  7) Database table description file
概述: 描述升级过程中, 数据库中所有表的导入数据方式。 每 个要升级的数据库有一个该数据库表描述文件。  Overview: Describes how to import data for all tables in the database during the upgrade process. There is one database table description file for each database to be upgraded.
数据库中的表大致分为以下几种类型:  The tables in the database are roughly divided into the following types:
a、 有缺省数据, 不可能修改 /删除缺省数据或增加新数据; b、 有缺省数据, 不可能修改 /删除缺省数据但可能增加新数据; c、 有缺省数据, 可能修改 /删除缺省数据但不可能增加新数据; d、 有缺省数据, 可能修改 /删除缺省数据或增加新数据; e、 没有缺省数据, 可能增加新数据。  a, there is default data, it is impossible to modify / delete the default data or add new data; b, there is default data, it is impossible to modify / delete the default data but may add new data; c, there is default data, may be modified / Delete default data but it is not possible to add new data; d, have default data, may modify/delete default data or add new data; e, no default data, may add new data.
相应地, 导入数据方式分为以下几种:  Accordingly, the method of importing data is divided into the following types:
方式 0: 完全保留新版本的缺省数据, 适合类型 a的数据库表; 方式 1 : 完全导入老版本中的数据,适合类型 d和 e的数据库表; 方式 2: 自定义 SQL脚本方式, 比较灵活, 能适合类型 b和 c 的数据库表, 以及一些可能还没有考虑到的特殊情况。  Method 0: Fully retain the default data of the new version, suitable for the database table of type a; Mode 1: Fully import the data in the old version, suitable for the database table of type d and e; Mode 2: Custom SQL script mode, more flexible , can fit the database tables of types b and c, and some special cases that may not have been considered.
本发明在后台管理***中实现数据库升级的方法包括版本识别 子***产生和维护软件现有各个版本数据库的描述 /知识的步骤以及 版本升级子***利用上述描述 /知识对数据库进行升级的步骤。  The method for implementing database upgrade in the background management system of the present invention includes the steps of the version identification subsystem generating and maintaining the description/knowledge of the existing version of the software database and the step of upgrading the database by the version upgrade subsystem using the above description/knowledge.
请参阅图 2, 本发明在后台管理***中实现数据库升级的***的 版本识别子***以描述 /知识***为输出 , 负责生成描述文件和检查 描述文件的正确性、 一致性。版本识别子***产生和维护软件现有各 个版本数据库的描述 /知识包括以下步骤: Referring to FIG. 2, the version identification subsystem of the system for implementing database upgrade in the background management system is outputted by the description/knowledge system, and is responsible for generating correctness and consistency of the description file and the inspection description file. Version identification subsystem generation and maintenance software The description/knowledge of the version database includes the following steps:
a) 版本识别子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息; '  a) The version identification subsystem reads all database information that needs to be upgraded from the database description file;
b)版本识别子***生成数据库版本描述文件;  b) the version identification subsystem generates a database version description file;
c)版本识别子***生成数据库版本识别文件;  c) the version identification subsystem generates a database version identification file;
d)版本识别子***判断数据库中的表是否存在约束, 若存在约 束, 则版本识別子***生成数据库版本的预处理 SQL脚本文件和后 处理 SQL脚本文件, 若不存在约束则直接执行步驟 e);  d) The version identification subsystem determines whether the table in the database has a constraint. If there is a constraint, the version identification subsystem generates a database version of the pre-processed SQL script file and the post-processing SQL script file. If there is no constraint, the step e is directly executed. );
e)版本识别子***生成数据库版本间升级 SQL脚本文件; 如果 是采用上述方式 1的导入方式即导入的完全是老版本中的数据,则生 成数据库版本间升级 SQL脚本文件之后, 还可以根据实际需求对该 数据库版本间升级 SQL脚本文件进行手工编写; 当然, 该手工编写 是个可选步驟;  e) The version identification subsystem generates an upgrade SQL script file between the database versions; if the import method of the above mode 1 is to import the data in the old version completely, after the database script version is upgraded, the SQL script file may be upgraded according to the actual situation. It is required to manually write the SQL script file between the database versions; of course, the manual writing is an optional step;
f)版本识别子***生成数据库表描述文件;  f) the version identification subsystem generates a database table description file;
g)版本识别子***检查数据库版本描述文件中的版本间升级关 系是否构成有向无环图, 若构成有向无环图, 则比较版本差异, 输出 详细报告, 若不构成, 则'结束版本识别。  g) The version identification subsystem checks whether the inter-version upgrade relationship in the database version description file constitutes a directed acyclic graph. If a directed acyclic graph is formed, the version difference is compared, and a detailed report is output. If not, the end version is Identification.
请参阅图 3, 本发明在后台管理***中实现数据库升级的版本升 级子***利用版本识别子***生成的描述文件对数据库进行升级,版 本升级子***利用上述描述 /知识对数据库进行升级包括以下步骤: h)版本升级子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息;  Referring to FIG. 3, the version upgrade subsystem that implements database upgrade in the background management system uses the description file generated by the version identification subsystem to upgrade the database. The version upgrade subsystem uses the above description/knowledge to upgrade the database, including the following steps. : h) The version upgrade subsystem reads all database information that needs to be upgraded from the database description file;
i)版本升级子***从数据库版本描述文件中 ,读取数据库的所有 版本信息;  i) The version upgrade subsystem reads all version information of the database from the database version description file;
j) 版本升级子***根据数据库版本识別文件,读取数据库版本特 征信息, 根据版本特征信.息识別数据库的源版本和目的版本;  j) The version upgrade subsystem reads the database version feature information according to the database version identification file, and identifies the source version and the destination version of the database according to the version feature information;
k) 版本升级子***从数据库版本描述文件中 , 读取数据库版本 间的升级关系, 分析得到从源版本到目的版本的最短升级路径;  k) The version upgrade subsystem reads the upgrade relationship between the database versions from the database version description file, and analyzes the shortest upgrade path from the source version to the destination version;
1) 版本升级子***沿着从源版本到目的版本的最短升级路径,执 行版本间的升级 SQL脚本文件,调整源版本数据库的表结构和数据; m) 版本升级子***从数据库表描述文件中, 读取所有表的导入 数据方式, 根据导入数据方式, 将各表的数据由源版本数据库导入目 的版本数据库, 如果该表存在约束, 则在导入数据前执行该表的预处 理 SQL脚本文件, 在导入数据后执行该表的后处理 SQL脚本文件。 1) The version upgrade subsystem follows the shortest upgrade path from the source version to the destination version. Upgrade the SQL script file between the line versions, adjust the table structure and data of the source version database; m) The version upgrade subsystem reads the import data mode of all the tables from the database table description file, according to the method of importing data, The data is imported into the destination version database from the source version database. If the table has constraints, the pre-processed SQL script file of the table is executed before the data is imported, and the SQL script file of the table is executed after the data is imported.
至此, 数据库升级完毕。  At this point, the database is upgraded.
其中步驟 k)所述的分析从源版本到目的版本的最短升级路径釆 用求有向无环图中某源点到其余各顶点最短路径的算法。请参阅图 4 , 是本发明一实施例的有向无环图, 其中 VI、 V2、 V3、 V4、 V5、 V6 构成现有软件的版本。 Vi ( i=l,2,3,4... )构成有向无环图中的顶点集。 顶点之间用有向的弧连接表示从一个版本可以升级到另一个版本,按 照技术方案中的描述, 即是两个版本之间存在升级关系。 例如, 从版 本 VI升级到 V6有以下几条升级路径:  The shortest upgrade path from the source version to the destination version of the analysis described in step k) uses an algorithm for finding the shortest path from a source point to the remaining vertices in the directed acyclic graph. Referring to FIG. 4, a directed acyclic graph is shown in an embodiment of the present invention, wherein VI, V2, V3, V4, V5, and V6 constitute a version of the existing software. Vi ( i = l, 2, 3, 4... ) constitutes a set of vertices in a directed acyclic graph. A directed arc connection between vertices indicates that a version can be upgraded to another version, as described in the technical scenario, that is, there is an upgrade relationship between the two versions. For example, upgrading from version VI to V6 has the following upgrade paths:
1)V1 V2 V3 V4 V5 V6  1) V1 V2 V3 V4 V5 V6
2) VI V2 V3 V5 V6  2) VI V2 V3 V5 V6
3) VI V2 V3 V6  3) VI V2 V3 V6
4) VI V3 V4 V5 V6  4) VI V3 V4 V5 V6
5) VI V3 V5 V6  5) VI V3 V5 V6
6) VI V3 V6  6) VI V3 V6
根据上述有向无环图最短路径算法能够分析出最短路径为 VI According to the above directed acyclic graph shortest path algorithm, the shortest path can be analyzed as VI.
V3 V6, 即为数据库版本 VI升级到 V6的最短路径。 V3 V6, which is the shortest path to upgrade the database version VI to V6.
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的 保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、 改进等, 均包含在本发明的保护范围内。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权 利 要 求 Rights request
1. 一种在后台管理***中实现数据库升级的***, 其特征在于: 其包括版本识别子***、 版本升级子***和描述 /知识***, 其中, 所述版本识别子***产生和维护软件现有各个版本数据库的描 述 /知识;所述版本升级子***利用所述描述 /知识对数据库进行升级; 所述描述 /知识***由若干描述文件组成, 是版本升级子***的输入, 版本识别子***的输出。 A system for implementing database upgrade in a background management system, comprising: a version identification subsystem, a version upgrade subsystem, and a description/knowledge system, wherein the version identification subsystem generates and maintains software existing Description/knowledge of each version database; the version upgrade subsystem utilizes the description/knowledge to upgrade the database; the description/knowledge system consists of several description files, is an input to the version upgrade subsystem, and the version identification subsystem Output.
2. 如权利要求 1所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述描述文件包括数据库描述文件、 数据库版本描 述文件、数据库版本识别文件、数据库表描述文件和数据库版本间升 级 SQL脚本文件。  2. The system for implementing database upgrade in a background management system according to claim 1, wherein: the description file includes a database description file, a database version description file, a database version identification file, a database table description file, and a database version. Upgrade the SQL script file.
3. 如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述描述文件还包括预处理 SQL脚本文件和后处 理 SQL脚本文件。  3. The system for implementing database upgrade in a background management system according to claim 2, wherein: the description file further comprises a pre-processed SQL script file and a post-processing SQL script file.
4. 如权利要求 3所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述预处理 SQL脚本文件包括数据库预处理 SQL 脚本文件和表预处理 SQL脚本文件, 每个版本每个数据库最多有一 个该数据库预处理 SQL脚本文件, 其在数据库导入数据前执行, 任 何需要在数据库导入数据前执行的特殊处理, 都在该文件中写 SQL 脚本, 每个版本每个数据库每个表最多有一个表预处理 SQL脚本文 件, 其在导入该表数据前执行, 任何需要在导入该表数据前执行的特 殊处理, 都在该文件中写 SQL脚本。  4. The system for implementing database upgrade in a background management system according to claim 3, wherein: said pre-processed SQL script file comprises a database pre-processed SQL script file and a table pre-processed SQL script file, each version per file. There are at most one database pre-processed SQL script file, which is executed before the database imports data. Any special processing that needs to be executed before the database is imported into the database, the SQL script is written in the file, each version of each database The table has at most one table pre-processed SQL script file, which is executed before importing the table data. Any special processing that needs to be performed before importing the table data is written in the file.
5. 如权利要求 3所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述后处理 SQL脚本文件包括数据库后处理 SQL 脚本文件和表后处理 SQL脚本文件, 每个版本每个数据库最多有一 个数据库后处理 SQL脚本文件, 其在数据库导入数据后执行, 任何 需要在数据库导入数据后执行的特殊处理, 都在该文件中写 SQL脚 本,每个版本每个数据库每个表最多有一个表后处理 SQL脚本文件, 其在导入该表数据后执行,任何需要在导入该表数据后执行的特殊处 理, 都在该文件中写 SQL脚本。 5. The system for implementing database upgrade in a background management system according to claim 3, wherein: the post-processing SQL script file comprises a database post-processing SQL script file and a table post-processing SQL script file, each version of each file. The database has at most one database post-processing SQL script file, which is executed after the database imports the data. Any special processing that needs to be executed after the database is imported into the data, the SQL script is written in the file, each version of each database per table There is at most one table post-processing SQL script file. It is executed after importing the table data. Any special processing that needs to be executed after importing the table data is written in the file.
6. 如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述数据库描述文件用于描述升级过程所要升级的 数据库的数据, 整个版本升级***使用一个该数据库描述文件。  6. The system for implementing database upgrade in a background management system according to claim 2, wherein: the database description file is used to describe data of a database to be upgraded by the upgrade process, and the entire version upgrade system uses one of the database descriptions. file.
7. 如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述数据库版本描述文件用于描述数据库的所有版 本和版本间的升级关系 ,每个要升级的数据库有一个该数据库版本描 述文件。  7. The system for implementing database upgrade in a background management system according to claim 2, wherein: the database version description file is used to describe an upgrade relationship between all versions and versions of the database, and each database to be upgraded. There is one database version description file.
8. 如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述数据库版本识別文件用于保存该版本的数据库 信息, 包含数据库中所有表信息, 数据库的每个版本有一个该数据库 版本识别文件。  8. The system for implementing database upgrade in a background management system according to claim 2, wherein: the database version identification file is configured to save database information of the version, and includes all table information in the database, and each database Each version has a database version identification file.
9. 如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述数据库版本间升級 SQL脚本文件用于写目的 版本相对源版本变化的升級脚本。  9. The system for implementing database upgrade in a background management system according to claim 2, wherein: the database version upgrade SQL script file is used to write an upgrade script of a destination version relative to a source version change.
10.如权利要求 2所述的在后台管理***中实现数据库升级的系 统, 其特征在于: 所述数据库表描述文件用于描述升级过程中, 数据 库中所有表的导入数据方式,每个要升级的数据库有一个该数据库表 描述文件。  The system for implementing database upgrade in a background management system according to claim 2, wherein: the database table description file is used to describe an import data mode of all tables in the database during the upgrade process, and each of the files is upgraded. The database has a database table description file.
11. 一种在后台管理***中实现数据库升级的方法, 其特征在于 包括以下步骤:  11. A method for implementing a database upgrade in a background management system, comprising the steps of:
版本识别子***产生和维护软件现有各个版本数据库的描述 /知 识;  The version identification subsystem generates and maintains a description/knowledge of the existing version of the software database;
版本升级子***利用上述描述 /知识对数据库进行升级。  The version upgrade subsystem uses the above description/knowledge to upgrade the database.
12. 如权利要求 11所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 所述版本识别子***产生和维护软件现有各个版 本数据库的描述 /知识包括以下步骤: a) 版本识别子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息; 12. The method for implementing database upgrade in a background management system according to claim 11, wherein: the version identification subsystem generates and maintains descriptions/knowledges of software existing version databases including the following steps: a) The version identification subsystem reads all database information that needs to be upgraded from the database description file;
b)版本识别子***生成数据库版本描述文件;  b) the version identification subsystem generates a database version description file;
c)版本识别子***生成数据库版本识别文件;  c) the version identification subsystem generates a database version identification file;
e) 版本识別子***生成数据库版本间升级 SQL脚本文件; f) 版本识别子***生成数据库表描述文件;  e) the version identification subsystem generates a database script version upgrade SQL script file; f) the version identification subsystem generates a database table description file;
g) 版本识别子***检查数据库版本描述文件中的版本间升级关 系是否构成有向无环图, 若构成有向无环图, 则比较版本差异, 输出 详细报告, 若不构成, 则结束版本识別。  g) The version identification subsystem checks whether the inter-version upgrade relationship in the database version description file constitutes a directed acyclic graph. If a directed acyclic graph is formed, the version difference is compared, and a detailed report is output. If not, the version identifier is terminated. do not.
13. 如权利要求 12所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 所述步骤 c)和 e)之间还包括步骤 d), 版本识别子 ***判断数据库中的表是否存在约束, 若存在约束, 则版本识别子系 若不存在约束则直接执行步骤 e)。  13. The method for implementing database upgrade in a background management system according to claim 12, wherein: step d) and e) further comprise step d), and the version identification subsystem determines whether the table in the database is There is a constraint. If there is a constraint, the version identification subsystem directly performs step e) if there is no constraint.
14. 如权利要求 12所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 当采用完全导入老版本中数据的导入方式时, 步 骤 e ) 所述版本识别子***生成数据库版本间升级 SQL脚本文件之 后, 进一步包括: 根据实际需求对所述数据库版本间升级 SQL脚本 文件进行手工编写。  14. The method for implementing database upgrade in a background management system according to claim 12, wherein: when the import mode of data in the old version is completely imported, the version identification subsystem generates a database version between steps After the SQL script file is upgraded, the method further includes: manually writing the SQL script file between the database versions according to actual requirements.
15. 如权利要求 11所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 所述版本升级子***利用上述描述 /知识对数据 库进行升级包括以下步骤:  15. The method for implementing database upgrade in a background management system according to claim 11, wherein: the version upgrade subsystem upgrades the database by using the foregoing description/knowledge includes the following steps:
h) 版本升级子***从数据库描述文件中, 读取所有需要升级数 据的数据库信息;  h) The version upgrade subsystem reads all database information that needs to be upgraded from the database description file;
i)版本升级子***从数据库版本描述文件中,读取数据库的所有 版本信息;  i) The version upgrade subsystem reads all version information of the database from the database version description file;
j) 版本升级子***根据数据库版本识别文件,读取数据库版本特 征信息, 根据版本特征信息识别数据库的源版本和目的版本; k) 版本升级子***从数据库版本描述文件中, 读取数据库版本 间的升级关系, 分析得到从源版本到目的版本的最短升级路径; j) The version upgrade subsystem reads the database version feature information according to the database version identification file, and identifies the source version and the destination version of the database according to the version feature information; k) The version upgrade subsystem reads the upgrade relationship between the database versions from the database version description file, and analyzes the shortest upgrade path from the source version to the destination version;
1)版本升级子***沿着从源版本到目的版本的最短升级路径,执 行版本间的升级 SQL脚本文件,调整源版本数据库的表结构和数据; m)版本升级子***从数据库表描述文件中, 读取所有表的导入 数据方式, 根据导入数据方式, 将各表的数据由源版本数据库导入目 的版本数据库。  1) The version upgrade subsystem follows the shortest upgrade path from the source version to the destination version, performs an upgrade SQL script file between versions, adjusts the table structure and data of the source version database; m) the version upgrade subsystem from the database table description file Read the import data mode of all the tables, and import the data of each table from the source version database to the destination version database according to the method of importing data.
16. 如权利要求 15所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 所述步骤 m)进一步包括步骤 n), 如果该表存在 约束, 则在导入数据前执行该表的预处理 SQL脚本文件, 在导入数 据后执行该表的后处理 SQL脚本文件。  The method for implementing database upgrade in a background management system according to claim 15, wherein: the step m) further comprises the step n), if the table has a constraint, executing the table before importing the data Preprocess the SQL script file and execute the post-processing SQL script file of the table after importing the data.
17. 如权利要求 15所述的在后台管理***中实现数据库升级的 方法, 其特征在于: 步骤 k)所述的分析从源版本到目的版本的最短升 级路径采用求有向无环图中某源点到其余各顶点最短路径的算法。  The method for implementing database upgrade in a background management system according to claim 15, wherein: step k) analyzing the shortest upgrade path from the source version to the destination version by using a directed acyclic graph The algorithm for the source point to the shortest path of the remaining vertices.
PCT/CN2006/003103 2005-11-26 2006-11-17 System and method for realizing database upgrading in background management system WO2007059698A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNB2005101018592A CN100426291C (en) 2005-11-26 2005-11-26 System and method to realize database upgrading in background management system
CN200510101859.2 2005-11-26

Publications (1)

Publication Number Publication Date
WO2007059698A1 true WO2007059698A1 (en) 2007-05-31

Family

ID=38066916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2006/003103 WO2007059698A1 (en) 2005-11-26 2006-11-17 System and method for realizing database upgrading in background management system

Country Status (2)

Country Link
CN (1) CN100426291C (en)
WO (1) WO2007059698A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110618829A (en) * 2019-09-20 2019-12-27 中国银行股份有限公司 Business data checking method and system for upgrading database system
CN113806382A (en) * 2021-08-05 2021-12-17 南京壹证通信息科技有限公司 Implementation method for automatically upgrading database during service upgrading

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025548B (en) * 2010-12-20 2014-12-10 中兴通讯股份有限公司 Multi-version smooth upgrading method and device for user-defined performance indexes
CN103019660A (en) * 2011-09-20 2013-04-03 佳都新太科技股份有限公司 Realization of web application data source delay binding
CN103324716B (en) * 2013-06-25 2016-08-10 四川九洲电器集团有限责任公司 A kind of application database update method based on Android system
CN104572644B (en) * 2013-10-10 2018-05-22 北京大学 Database update device and database update method
CN103810100A (en) * 2013-12-02 2014-05-21 中标软件有限公司 Software evolutionary trend analysis system and method
CN104881455B (en) * 2015-05-20 2019-01-29 深圳市酷开网络科技有限公司 A kind of architectural difference processing method and system based on MYSQL
CN106325902B (en) * 2015-06-24 2020-09-15 中兴通讯股份有限公司 Database software upgrade detection method and device
CN106599167B (en) * 2016-12-09 2020-11-20 苏州浪潮智能科技有限公司 System and method for supporting increment updating of database
CN108268275B (en) * 2017-06-12 2021-05-04 平安普惠企业管理有限公司 Software version control method and software version control equipment
CN107357907A (en) * 2017-07-17 2017-11-17 郑州云海信息技术有限公司 A kind of database upgrade method and device for supporting cross-version
CN107861737A (en) * 2017-11-06 2018-03-30 国云科技股份有限公司 A kind of database version moving method of large scale system
CN110865829B (en) * 2018-08-28 2024-04-16 京东科技控股股份有限公司 Database upgrading method, system, equipment and storage medium
CN111506779B (en) * 2020-04-20 2021-03-16 东云睿连(武汉)计算技术有限公司 Object version and associated information management method and system facing data processing

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09130426A (en) * 1995-11-06 1997-05-16 Nippon Telegr & Teleph Corp <Ntt> Information providing system
CN1581165A (en) * 2004-05-18 2005-02-16 中兴通讯股份有限公司 Method for realizing relation-database automatic upgrading in communication apparatus
WO2005029332A1 (en) * 2003-09-24 2005-03-31 Sony Corporation Database schemer update method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562357B2 (en) * 2004-03-08 2009-07-14 Microsoft Corporation Relational database schema version management
CN100556211C (en) * 2004-06-22 2009-10-28 中兴通讯股份有限公司 A kind of upgrade method of mobile communication network management system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09130426A (en) * 1995-11-06 1997-05-16 Nippon Telegr & Teleph Corp <Ntt> Information providing system
WO2005029332A1 (en) * 2003-09-24 2005-03-31 Sony Corporation Database schemer update method
CN1581165A (en) * 2004-05-18 2005-02-16 中兴通讯股份有限公司 Method for realizing relation-database automatic upgrading in communication apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110618829A (en) * 2019-09-20 2019-12-27 中国银行股份有限公司 Business data checking method and system for upgrading database system
CN110618829B (en) * 2019-09-20 2023-04-28 中国银行股份有限公司 Service data checking method and system for upgrading database system
CN113806382A (en) * 2021-08-05 2021-12-17 南京壹证通信息科技有限公司 Implementation method for automatically upgrading database during service upgrading

Also Published As

Publication number Publication date
CN1971556A (en) 2007-05-30
CN100426291C (en) 2008-10-15

Similar Documents

Publication Publication Date Title
WO2007059698A1 (en) System and method for realizing database upgrading in background management system
US11099823B2 (en) Systems and methods for transformation of reporting schema
US9563538B2 (en) Code path tracking
US8141029B2 (en) Method and system for executing a data integration application using executable units that operate independently of each other
US8706771B2 (en) Systems and methods for analyzing and transforming an application from a source installation to a target installation
US8954375B2 (en) Method and system for developing data integration applications with reusable semantic types to represent and process application data
US7761406B2 (en) Regenerating data integration functions for transfer from a data integration platform
US9449047B2 (en) Dynamic modification of schemas in streaming databases
US20050138606A1 (en) System and method for code migration
US20110296391A1 (en) Systems and Methods for Dynamically Replacing Code Objects Via Conditional Pattern Templates
US20160170719A1 (en) Software database system and process of building and operating the same
US20080306986A1 (en) Migration of Legacy Applications
US20120221605A1 (en) Linking framework for information technology management
US8607217B2 (en) Incremental upgrade of entity-relationship systems
WO2008056438A1 (en) Computer system
CN110109671B (en) Webpack label size and style conversion method and device
CN109271199A (en) A kind of method and system for database continuous integrating and script file management
US7926052B2 (en) Stacked file systems and methods
WO2021109777A1 (en) Data file import method and device
JP2010539555A (en) Rehosting method to switch mainframe system environment to open system environment
WO2021022702A1 (en) Log insertion method and apparatus, computer apparatus and storage medium
US20070198927A1 (en) Computer-implemented systems and methods for an automated application interface
US8631393B2 (en) Custom database system and method of building and operating the same
CN117435173A (en) Automatic micro-service splitting method and system based on field annotation
Cugola et al. An experience in setting-up a configuration management environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06817844

Country of ref document: EP

Kind code of ref document: A1