WO2017041578A1 - 一种获取数据库变更信息的方法和装置 - Google Patents

一种获取数据库变更信息的方法和装置 Download PDF

Info

Publication number
WO2017041578A1
WO2017041578A1 PCT/CN2016/090172 CN2016090172W WO2017041578A1 WO 2017041578 A1 WO2017041578 A1 WO 2017041578A1 CN 2016090172 W CN2016090172 W CN 2016090172W WO 2017041578 A1 WO2017041578 A1 WO 2017041578A1
Authority
WO
WIPO (PCT)
Prior art keywords
change
content
information
changed
sql file
Prior art date
Application number
PCT/CN2016/090172
Other languages
English (en)
French (fr)
Inventor
孔艳花
张丽丽
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017041578A1 publication Critical patent/WO2017041578A1/zh

Links

Images

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/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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/219Managing data history or versioning

Definitions

  • This document relates to, but is not limited to, the field of database technology, and in particular to a method and apparatus for obtaining database change information.
  • the embodiment of the invention provides a method and a device for acquiring database change information, which can accurately know the change of the database file.
  • the embodiment of the invention provides a method for obtaining database change information, including:
  • the object information of the change is determined based on the content of the change between the two versions of the SQL file before and after the change;
  • the legality judgment is performed on the changed object information, and the result of the legality judgment is output.
  • it also includes:
  • determine the changes between the two versions of the SQL file before and after the change including:
  • the effective change content is obtained, that is, the change content between the two versions of the SQL file before and after the change.
  • the determining, according to the change content between the two versions of the SQL file before and after the change, determining the changed object information including:
  • the object name of the change is determined based on the content of the change and the type of the object to be determined, and the following statistical information is determined: the content before the object change and the content after the object change.
  • determining the object type of the change according to the keywords included in the change content between the two versions of the SQL file before and after the change includes:
  • the decision is a field change
  • the decision is a table change
  • the change contains a keyword of a constraint or a primary key, it is determined that the primary key changes
  • the change contains a keyword of create index or index, it is determined that the index is changed
  • the change contains a keyword for create view or view, it is determined that the view is changed.
  • the legality judgment is performed on the changed object information, including:
  • the changed field type is compatible with the field type before the change
  • the primary key For changes to the table name, adding a primary key, or modifying a primary key, the primary key must be named in the format of the primary key name_table name;
  • the unified name is required.
  • the method further includes:
  • auxiliary information from the file in which the preliminary change content obtained by executing the difference comparison command is obtained: the path of the SQL file in the project branch, the modified SQL file name, and the table name to which the changed object belongs;
  • the auxiliary information, the date of modification, and the person responsible for the modification are output together with the result of the judgment of the legality.
  • An embodiment of the present invention further provides an apparatus for acquiring database change information, including:
  • the determining module is set to determine the changed object information based on the changed content between the two versions of the SQL file before and after the change;
  • the judging module is configured to judge the legality of the changed object information, and output the result of the legality judgment.
  • the determining module is further configured to:
  • the determining module is configured to implement the change between the two versions of the SQL file before and after the change is determined in the following manner:
  • the effective change content is obtained, that is, the change content between the two versions of the SQL file before and after the change.
  • the determining module is configured to:
  • the object name of the change is determined based on the content of the change and the type of the object to be determined, and the following statistical information is determined: the content before the object change and the content after the object change.
  • the determining module is configured to implement the object type according to the keyword included in the change content between the two versions of the SQL file before and after the change:
  • the decision is a field change
  • the decision is a table change
  • the change contains a keyword of a constraint or a primary key, it is determined that the primary key changes
  • the change contains a keyword of create index or index, it is determined that the index is changed
  • the change contains a keyword for create view or view, it is determined that the view is changed.
  • the determining module is configured to:
  • the changed field type is compatible with the field type before the change
  • the primary key For changes to the table name, adding a primary key, or modifying a primary key, the primary key must be named in the format of the primary key name_table name;
  • the unified name is required.
  • the determining module is further configured to:
  • auxiliary information from the file in which the preliminary change content obtained by executing the difference comparison command is obtained: the path of the SQL file in the project branch, the modified SQL file name, and the table name to which the changed object belongs;
  • the determining module is further configured to:
  • the auxiliary information, the date of modification, and the person responsible for the modification are output together with the result of the judgment of the legality.
  • the embodiment of the present invention has at least the following advantages:
  • Method and device for acquiring database change information through version management
  • Some script commands and custom rules provided by the tool accurately obtain the changes in the SQL file, and then parse out the changes in the database table structure according to the rules.
  • the normative and legality of the change can be analyzed, and the illegal modification can prevent the maintenance of the database upgrade script from being reduced, and the pressure of manual auditing can be alleviated and the workload can be reduced.
  • FIG. 1 is a flowchart of a method for acquiring database change information according to a first embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a device for acquiring database change information according to a third embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for acquiring database change information according to a fifth embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a system for database change information management according to a fifth embodiment of the present invention.
  • Version management is the foundation of software configuration management.
  • SVN version, an open source code version control system
  • SVN version management control tool that has emerged in recent years. It provides functions: 1. centralized management, security authorization; 2. file management, viewing; 3. file protection, avoiding different The user conflicts when changing files synchronously; 4. Provides comparison of source files of different versions.
  • SVN provides the ability to view different versions of source files and to view the contents of each change to solve the above problems.
  • a first embodiment of the present invention includes the following steps:
  • Step S101 determining the changed object information based on the changed content between the SQL files of the two versions before and after the change;
  • step S101 includes:
  • the field change is determined; optionally, if the change content includes a keyword of the data type, the field type change or the field length is determined. Change, depending on whether the length of the field following the keyword of the data type changes; if the keyword contains null or not null, it is determined that the field constraint changes;
  • the decision is a table change; if the change contains the keyword of create table, it is determined to be a new table; if the change contains the table keyword , it may just be that the content of the table has changed;
  • the change contains a keyword of a constraint or a primary key, it is determined that the primary key changes
  • the change contains a keyword of create index or index, it is determined that the index is changed
  • the change contains a keyword for create view or view, it is determined that the view is changed.
  • the statistical information includes a description of the change of the primary key column, for example, the primary key column a, b changes to b, c; for the case of the index change, the statistical information is introduced for the change of the index column.
  • the name after the keyword for determining the type of the object to be changed in the change content is the object name to be changed, and the information following the changed object name is the statistical information, that is, the content before the object change and the content after the object change.
  • step S102 the legality judgment is performed on the changed object information, and the result of the legality judgment is output.
  • step S102 the legality judgment is performed on the changed object information, including:
  • the changed field type is compatible with the field type before the change
  • the primary key For changes to the table name, adding a primary key, or modifying a primary key, the primary key must be named in the format of the primary key name_table name;
  • the unified name is required.
  • Each condition represents a type of object to be changed. If the changed object information belongs to the object type of the change, the condition constraint corresponding to the object type of the change is satisfied. Therefore, how many conditions need to be met, depending on the object type of the change, such as the field can modify the length and default value, then it must meet 1, 2 and 2 at the same time.
  • the method further includes: before step S101, determining a change content between the two versions of the SQL file before and after the change.
  • determine the changes between the two versions of the SQL file before and after the change including:
  • A1 Using the version management tool to perform the difference comparison command on the two versions of the SQL file before and after the change in the same project branch, the initial change content is obtained; the version management tool can select the SVN version management tool, CVS (Concurrent Version System, parallel) Version system), etc. If the SVN version management tool is used, the difference between the two versions of the SQL file before and after the change in the same project branch is performed, including the svn diff command, to obtain the preliminary change content.
  • the initial changes include additions, deletions, and modifications.
  • the preliminary changes include the content before the change and the content after the change.
  • the preliminary changes include: location information of the pre-change content in the SQL file of the version before the change, location information of the changed content in the changed version of the SQL file, and two versions of the SQL file. path of.
  • the effective change content is obtained, that is, the change content between the two versions of the SQL file before and after the change.
  • the filtering of the blank information and the annotation information based on the preliminary change content may be implemented by using the well-known techniques of the present invention, and is not intended to limit the scope of protection of the embodiments of the present invention, and details are not described herein again.
  • the second embodiment of the present invention is a method for obtaining database change information.
  • the method in this embodiment is substantially the same as the first embodiment. The difference is that the method in this embodiment further includes:
  • auxiliary information from the file in which the preliminary change content obtained by executing the difference comparison command is obtained: the path of the SQL file in the project branch, the modified SQL file name, and the table name to which the changed object belongs;
  • the version management tool can use the SVN version management tool, CVS, etc., if SVN is adopted.
  • the version management tool executes the difference information acquisition command for the changed version of the SQL file, including the svn info command.
  • the file where the preliminary change content is located includes the SQL file of the version before the change and the SQL file of the changed version.
  • the path to the SQL file in the project branch includes the path to the two versions of the SQL file.
  • the modified SQL file name includes the name of the SQL file before the modification (that is, the SQL file of the version before the change) and the name of the modified version of the SQL file (that is, the changed version of the SQL file).
  • the table name to which the changed object belongs includes the table name to which the object before the change belongs and the table name to which the changed object belongs.
  • the step S102 further includes: outputting the auxiliary information, the modification date, and the modification responsible person together with the result of the legality judgment.
  • the first embodiment and the second embodiment of the present invention can be implemented by any computer (e.g., terminal, server, etc.).
  • the third embodiment of the present invention corresponds to the first embodiment.
  • the embodiment introduces a device for acquiring database change information. As shown in FIG. 2, the device includes the following components:
  • the determining module 201 is configured to determine the changed object information based on the changed content between the two versions of the SQL file before and after the change;
  • the determining module 201 is further configured to:
  • the determining module is configured to implement the change between the two versions of the SQL file before and after the change is determined in the following manner:
  • the effective change content is obtained, that is, the change content between the two versions of the SQL file before and after the change.
  • the determining module 201 is configured to:
  • the field change is determined; optionally, if the change content includes a keyword of the data type, the field type change or the field length is determined. Change, depending on whether the length of the field followed by the keyword of the data type changes; if the change contains a keyword that is null or not null, then the field constraint changes;
  • the decision is a table change; if the change contains the keyword of create table, it is determined to be a new table; if the change contains the table keyword , it may just be that the content of the table has changed;
  • the change contains a keyword of a constraint or a primary key, it is determined that the primary key changes
  • the change contains a keyword of create index or index, it is determined that the index is changed
  • the change contains a keyword for create view or view, it is determined that the view is changed.
  • the object name of the change is determined based on the content of the change and the type of the object to be determined, and the following statistical information is determined: the content before the object change and the content after the object change.
  • the statistical information is introduced as a change of the primary key column; for the case of the index change, the statistical information is introduced for the change of the index column.
  • the judging module 202 is configured to judge the legality of the changed object information, and output the result of the legality judgment.
  • the determining module 202 is configured to:
  • the changed field type is compatible with the field type before the change
  • the primary key For changes to the table name, adding a primary key, or modifying a primary key, the primary key must be named in the format of the primary key name_table name;
  • the unified name is required.
  • a method for acquiring database change information is introduced corresponding to the second embodiment.
  • the method in this embodiment is substantially the same as the third embodiment, except that in the device of the embodiment.
  • the determining module 201 is further configured to:
  • auxiliary information from the file in which the preliminary change content obtained by executing the difference comparison command is obtained: the path of the SQL file in the project branch, the modified SQL file name, and the table name to which the changed object belongs;
  • the judging module 202 is further configured to: output the auxiliary information, the modification date, and the modification responsible person together with the result of the legality judgment.
  • the fifth embodiment of the present invention is based on the above embodiment, and an application example of the present invention is described by taking SVN as an example and FIG. 3 to FIG.
  • the flow of the method for obtaining database change information in this embodiment is as shown in FIG. 3, and includes the following detailed steps:
  • Step S01 Determine the project branch where the SQL file to be checked is located and the version information to be compared.
  • the project branch includes a project version branch.
  • the project version is generally managed by using a software version management tool such as CVS or SVN.
  • the SVN is taken as an example, but is not limited thereto.
  • the version information includes the version number of the SVN.
  • the two SVN version numbers to be compared are marked by BASE and HEAD respectively.
  • Step S02 According to the svn diff command of the SVN version management tool, obtain all the changed contents between the specified two version numbers of the project branch where the SQL file to be checked is located, and generate a change content file.
  • the changes include new additions, deletions, and modifications.
  • the changed content may be output to any file format that is convenient for parsing and viewing.
  • the changed content is output to the svnDiff.txt text file, but is not limited thereto, for example, may be input to the .log or In the .xml file.
  • Step S03 parsing the change content file svnDiff.txt, filtering and analyzing each change content of each SQL file, extracting valid detailed change information, and analyzing the database structure according to the analysis. Since the acquired change content file may contain non-changing content of the SQL file, firstly, the change content including only the SQL file is filtered out.
  • the format of the change content of each SQL file is as follows:
  • Each form is shaped like @@-1188, 7+1188, 7@@ and is marked with the specific changes in the SQL file, "-1188, 7" And "+1188,7” indicate the specific location information of the change content in the BASE version and the HEAD version, respectively. It should be noted that only the marked “-” or “+” is the real change content, and the rest of the information is output by the svn diff command for the unified context, which is convenient for locating the location of the changed content in the source file.
  • the extraction of the detailed detailed change information refers to filtering the change content, such as blanks, comments, and the like, irrelevant to changes in the SQL content.
  • the analyzing the effective change content includes obtaining the changed object type, the object name, the content before the object change, and the content after the object is changed, and the object belonging to the field, the primary key, the index, and the like according to the mark@@ information Information, it should be noted that for the modified content, the svn diff command sees the deletion and then increases.
  • the analysis gives the conclusion that the change refers to comparing the content of the deleted part and the added part according to the custom rule to judge the change of the database structure.
  • the custom rules are listed below, but are not limited to this:
  • the modified type should be compatible with the one before modification, so as to ensure that the conversion is not reported when the table is not empty;
  • the primary key name must be defined and named according to the format of the primary key _ table name;
  • the regular expression is used to determine the change type, for example, a data type, a null or a not null keyword is used to determine whether the field attribute changes, and a keyword of the create table is used to determine whether Is a new table, the definition of the constraint, the primary key keyword is used to determine the primary key change, the keyword defining the create index is used to determine the index change, etc., but is not limited to this, and then according to the custom rule analysis to give the SQL content change Conclusion, for example Field length changes, modified field names, primary key name changes, new tables, etc., and whether these changes are legal.
  • Step S04 According to the version management tool svn info command, obtain the change owner and modification date of each SQL file, so as to track the rectification of the non-compliant SQL change content.
  • the svn info command of each SQL file may be generated into a batch process, and then the batch process is performed to obtain the owner and modification date of all SQL file changes.
  • the batch svnInfo.bat is generated in this embodiment.
  • Step S05 The related change information of the SQL file obtained in steps S03 and S04 is output to the EXCEL report, but is not limited thereto.
  • the specific statistical information includes: modification date, modification of the responsible person, SVN project version path, modified SQL.
  • the name, object type, and object name can be directly read from the change content file svnDiff.txt.
  • the content before the object change and the content after the object change are statistically changed.
  • the change conclusion is judged by the custom rule. The conclusion.
  • EXCEL report makes the database structure change at a glance, which is convenient for the DBA to check whether the changed content conforms to the specification, and timely feedback to the responsible person to modify the tracking.
  • the management system includes an acquisition module, an extraction analysis module, and an output module.
  • the acquisition module can be implemented through step S02 in FIG. 3, and the extraction analysis module passes through steps S03 and S04.
  • the output module can be implemented by step S05.
  • the functions performed by the above modules are similar to those performed by the determining module and the determining module in the third and fourth embodiments, but the manner of dividing the functions is different.
  • the database change information management system may be deployed to the version machine, and the daily version statistics are updated with the project version branch, and the change of the SQL file is automatically monitored, the detailed change content is summarized, and the database change information is captured in time. It also provides a basis for automatically generating database upgrade scripts.
  • the method for obtaining database change information solves the problem that the database structure change information and the legality of the script change cannot be accurately and timely learned during the software project development process, and the maintainability of the database is improved.
  • the embodiment of the invention has the following advantages:
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the above technical solution accurately knows the change of the database file, and can analyze the normativeness and legality of the change, prevent the illegal change from causing the maintenance of the database upgrade script to be reduced, and also relieve the pressure of manual auditing and reduce the workload. .

Abstract

一种获取数据库变更信息的方法和装置,该方法包括:包括:基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;针对变更的对象信息进行合法性判断,并输出合法性判断的结果。

Description

一种获取数据库变更信息的方法和装置 技术领域
本文涉及但不限于数据库技术领域,尤指一种获取数据库变更信息的方法和装置。
背景技术
在软件项目开发工作中,经常要对数据库脚本文件SQL(Structured Query Language,结构化查询语言)进行变更。如果项目版本有多个分支,而每个分支中又有众多的SQL文件,那么改动量还是比较大的。对于如此多的改动,怎么能及时知道开发人员对数据库都做了哪些改动、这些改动是否都是合法的、这些改动对数据库升级有什么影响、对升级后的功能有什么影响。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种获取数据库变更信息的方法和装置,能够准确获知数据库文件变更情况。
本发明实施例提供获取数据库变更信息的方法,包括:
基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;
针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
可选的,还包括:
在所述基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息之前,
确定变更前后两个版本的SQL文件之间的变更内容。
可选的,确定变更前后两个版本的SQL文件之间的变更内容,包括:
利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;
基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
可选的,所述基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息,包括:
根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型;
基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。
可选的,根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型包括:
若变更内容中包含数据类型、null或者not null的关键字,则判定是字段变化;
若变更内容中包含create table或者table的关键字,则判定是表变化;
若变更内容中包含constraint或者primary key的关键字,则判定是主键变化;
若变更内容中包含create index或者index的关键字,则判定是索引变化;
若变更内容中包含create view或者view的关键字,则判定是视图变化。
可选的,针对变更的对象信息进行合法性判断,包括:
判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
对于字段长度的变更,则不允许缩小;
对于字段约束由null变为not null,则必须增加默认值约束;
对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
对于对象名称的变更,统一要求大写命名。
可选的,所述方法,还包括:
从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;
将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
本发明实施例还提供一种获取数据库变更信息的装置,包括:
确定模块,设置为基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;
判断模块,设置为针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
可选的,确定模块还设置为:
确定变更前后两个版本的SQL文件之间的变更内容。
可选的,所述确定模块是设置为采用以下方式实现确定变更前后两个版本的SQL文件之间的变更内容:
利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;
基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
可选的,所述确定模块是设置为:
根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型;
基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。
可选的,确定模块是设置为采用以下方式实现根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型:
若包含数据类型、null或者not null的关键字,则判定是字段变化;
若变更内容中包含create table或者table的关键字,则判定是表变化;
若变更内容中包含constraint或者primary key的关键字,则判定是主键变化;
若变更内容中包含create index或者index的关键字,则判定是索引变化;
若变更内容中包含create view或者view的关键字,则判定是视图变化。
可选的,所述判断模块是设置为:
判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
对于字段长度的变更,则不允许缩小;
对于字段约束由null变为not null,则必须增加默认值约束;
对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
对于对象名称的变更,统一要求大写命名。
可选的,所述确定模块,还设置为:
从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;
所述判断模块还设置为:
将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
采用上述技术方案,本发明实施例至少具有下列优点:
本发明实施例的所述获取数据库变更信息的方法和装置,通过版本管理 工具提供的一些脚本命令和自定义的规则,准确获取SQL文件中的变更内容,然后根据规则解析出数据库表结构的变更情况。进而可以分析此变更的规范性、合法性,防止不合法的变更导致数据库升级脚本的维护性降低,同时也可以缓解人工审核的压力和降低工作量。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明第一实施例的获取数据库变更信息的方法流程图;
图2为本发明第三实施例的获取数据库变更信息的装置组成结构示意图;
图3为本发明第五实施例的获取数据库变更信息的方法流程示意图;
图4为本发明第五实施例的数据库变更信息管理的系统组成结构示意图。
本发明的实施方式
为更进一步阐述本发明为达成预定目的所采取的技术手段及功效,以下结合附图及较佳实施例,对本发明进行详细说明如后。
版本管理是软件配置管理的基础。SVN(subversion,一个开源代码的版本控制系统)是近年来崛起的版本管理控制工具,它提供的功能有:1、集中管理,安全授权;2、文件管理,查看;3、文件保护,避免不同用户同步更改文件时的冲突;4、提供不同版本源文件的比较。
SVN提供的可查看不同版本的源文件功能和可查看每次变更内容的功能为解决上述问题提供了可能。
本发明第一实施例,一种获取数据库变更信息的方法,如图1所示,包括以下步骤:
步骤S101,基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;
可选的,步骤S101包括:
B1:根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型:
可选的,若变更内容中包含数据类型、null或者not null的关键字,则判定是字段变化;可选的,若变更内容中包含数据类型的关键字,则判定是字段类型变化或者字段长度变化,具体还要看数据类型的关键字后面所跟的字段长度是否发生变化;若包含null或者not null的关键字,则判定是字段约束变化;
若变更内容中包含create table或者table的关键字,则判定是表变化;可选的,若变更内容中包含create table的关键字,则判定是新增表;若变更内容中包含table的关键字,则可能仅仅是表的内容发生变化;
若变更内容中包含constraint或者primary key的关键字,则判定是主键变化;
若变更内容中包含create index或者index的关键字,则判定是索引变化;
若变更内容中包含create view或者view的关键字,则判定是视图变化。
B2:基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。比如:针对主键变化的情况,该统计信息包括主键列的变化情况介绍,例如由主键列a、b变化成b、c;针对索引变化的情况,该统计信息为索引列的变化情况介绍。
其中,变更内容中用于确定变更的对象类型的关键字后面的名称即为变更的对象名称,变更的对象名称后面的信息即为统计信息,即对象变更前内容和对象变更后内容。
步骤S102,针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
可选的,在步骤S102中,针对变更的对象信息进行合法性判断,包括:
判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
对于字段长度的变更,则不允许缩小;
对于字段约束由null变为not null,则必须增加默认值约束;
对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
对于对象名称的变更,统一要求大写命名。
可以通过对变更前的对象信息和变更后的对象信息进行比对来判断是否满足上述条件的至少一个。
其中,每一个条件代表一种变更的对象类型,如果变更的对象信息属于所述的变更的对象类型,就要满足这种变更的对象类型对应的条件约束。所以具体需要满足多少个条件,要看变更的对象信息符合几种变更的对象类型,比如字段可以同时修改了长度和默认值,那么就要同时满足1、2两条。
可选的,还包括:在步骤S101之前,确定变更前后两个版本的SQL文件之间的变更内容。
可选的,确定变更前后两个版本的SQL文件之间的变更内容,包括:
A1:利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;该版本管理工具可以选用SVN版本管理工具、CVS(Concurrent Version System,并行版本系统)等,若采用SVN版本管理工具,则对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令包括svn diff命令,得到初步变更内容。该初步变更内容包含新增、删除、修改等方面。
本步骤中,初步变更内容包括变更前的内容和变更后的内容。
可选的,初步变更内容还包括:变更前的内容在变更前的版本的SQL文件中的位置信息,变更后的内容在变更后的版本的SQL文件中的位置信息,两个版本的SQL文件的路径。
A2:基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
其中,具体如何基于初步变更内容进行空白信息和注释信息的过滤可以采用本领域技术人员的熟知技术实现,并不用于限定本发明实施例的保护范围,这里不再赘述。
本发明第二实施例,一种获取数据库变更信息的方法,本实施例所述方法与第一实施例大致相同,区别在于,本实施例的所述方法,还包括:
从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;该版本管理工具可以选用SVN版本管理工具、CVS等,若采用SVN版本管理工具,则对变更后的版本的SQL文件执行区别信息获取命令包括svn info命令。
其中,初步变更内容所在的文件包括变更前的版本的SQL文件和变更后的版本的SQL文件。
项目分支中的SQL文件的路径包括两个版本的SQL文件的路径。
修改的SQL文件名称包括修改前的版本的SQL文件(即变更前的版本的SQL文件)的名称和修改后的版本的SQL文件(即变更后的版本的SQL文件)的名称。
变更的对象所属的表名称包括变更前的对象所属的表名称和变更后的对象所属的表名称。
步骤S102中还包括:将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
本发明第一实施例和第二实施例可以通过任意计算机(如终端,服务器等)实现。
本发明第三实施例,与第一实施例对应,本实施例介绍一种获取数据库变更信息的装置,如图2所示,该装置包括以下组成部分:
1)确定模块201,设置为基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;
可选的,确定模块201,还设置为:
确定变更前后两个版本的SQL文件之间的变更内容。
可选的,确定模块是设置为采用以下方式实现确定变更前后两个版本的SQL文件之间的变更内容:
利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;
基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
可选的,确定模块201是设置为:
根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型;
可选的,若变更内容中包含数据类型、null或者not null的关键字,则判定是字段变化;可选的,若变更内容中包含数据类型的关键字,则判定是字段类型变化或者字段长度变化,具体还要看数据类型的关键字后面所跟的字段长度是否发生变化;若变更内容中包含null或者not null的关键字,则判定是字段约束变化;
若变更内容中包含create table或者table的关键字,则判定是表变化;可选的,若变更内容中包含create table的关键字,则判定是新增表;若变更内容中包含table的关键字,则可能仅仅是表的内容发生变化;
若变更内容中包含constraint或者primary key的关键字,则判定是主键变化;
若变更内容中包含create index或者index的关键字,则判定是索引变化;
若变更内容中包含create view或者view的关键字,则判定是视图变化。
基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。比如:针对主键变化的情况,该统计信息为主键列的变化情况介绍;针对索引变化的情况,该统计信息为索引列的变化情况介绍。
2)判断模块202,设置为针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
可选的,判断模块202是设置为:
判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
对于字段长度的变更,则不允许缩小;
对于字段约束由null变为not null,则必须增加默认值约束;
对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
对于对象名称的变更,统一要求大写命名。
本发明第四实施例,与第二实施例对应的介绍一种获取数据库变更信息的方法,本实施例所述方法与第三实施例大致相同,区别在于,在本实施例的所述装置中,确定模块201还设置为:
从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;
此时,判断模块202还设置为:将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
本发明第五实施例,本实施例是在上述实施例的基础上,以SVN为例,结合附图3~4介绍一个本发明的应用实例。
本实施例的一种获取数据库变更信息的方法的流程如图3所示,包括以下详细步骤:
步骤S01:确定待检查的SQL文件所在的项目分支及待比较的版本信息。
所述的项目分支包括项目版本分支,目前,项目版本通常都使用CVS、SVN等软件版本管理工具进行管理,本实施例中以SVN为例进行说明,但不限于此。所述的版本信息包括SVN的版本号,本实施例中分别以BASE和HEAD标记两个待比较的SVN版本号。
步骤S02:根据SVN版本管理工具的svn diff命令,获取待检查的SQL文件所在项目分支在指定的两个版本号间的所有变更内容,生成变更内容文件。所述的变更内容包括新增、删除、修改。
可选的,本实施例中应用如下svn diff命令:
“svn diff–r BASE:HEAD“待检查SQL文件所在的SVN分支路径”>“变更内容文件输出路径””;
需要说明的是,所述的变更内容可以输出到任意方便解析查看的文件格式中,本实施例中变更内容输出到svnDiff.txt文本文件中但不限于此,比如亦可输入到.log或是.xml文件中。
步骤S03:解析变更内容文件svnDiff.txt,过滤分析每个SQL文件的每一处变更内容,提取有效的详细变更信息,并据此分析给出数据库结构变更结论。由于所获取的变更内容文件中可能包含有SQL文件的非变更内容,所以首先要过滤出只包含SQL文件的变更内容,可选的,每个SQL文件的变更内容格式如下所示:
“Index:dbscript/dbscript-common/**/*.sql
=========================================================
---dbscript/dbscript-common/**/*.sql(版本88188)
+++dbscript/dbscript-common/**/*.sql(版本88244)
@@-1188,7+1188,7@@
autoBWFrequency numeric(10,0)null,
autoBWMultiple numeric(10,0)null,
tunnelType int null,
-role int null,
+neRole int null,
direction int null,
attrInt1 int null,
attrInt2 int null”;
其中Index:用于标记有变化的SQL文件的SVN路径,每一处形如@@-1188,7+1188,7@@之后标记的是SQL文件中具体的变更内容,“-1188,7”和“+1188,7”分别指示变更内容在BASE版本和HEAD版本中的具体位置信息。需要注意的是只有标记有“-”或是“+”才是真正变化的内容,其余信息是svn diff命令为统一上下文而输出的,方便定位变更内容在源文件中的位置。
所述的提取有效的详细变更信息指的是对变更内容过滤掉空白、注释等与SQL内容变化无关的信息。所述的对有效变更内容进行分析包括获取变更的对象类型、对象名称、对象变更前内容、对象变更后内容,对于字段、主键、索引等对象还要根据标记位@@信息获取对象所属的表信息,需要说明的是,对于修改的内容,svn diff命令看到的是先删除后增加。
所述的分析给出变更结论指的是依据自定义的规则,比较删除部分和增加部分的内容,以判断数据库结构变更情况。所述自定义规则列举如下,但并不限于此:
若是字段长度的修改,则不允许缩小;
若字段约束由null变为not null,则必须增加默认值约束;
若是字段类型修改,则修改后的类型要兼容修改前的,以保证表非空的时候转换不报错;
若是表增加或修改主键,则必须定义主键名,且按照主键_表名称的格式命名;
对象命名统一要求按照大写命名。
对于不符合自定义规则的SQL内容变更都认为是不合法的变更。
可选的,本实施例中首先利用正则表达式进行匹配判断变更类型,比如定义数据类型、null或not null的关键字用于判断是否是字段属性变化,定义create table的关键字用于判断是否是新增表,定义constraint、primary key的关键字用于判断是主键变化,定义create index的关键字用于判断是索引变更等,但不限于此,然后根据自定义规则分析给出SQL内容变更结论,比如是 字段长度变化、修改字段名称、主键名称变化、新增表等,以及这些变更是否合法。
步骤S04:根据版本管理工具svn info命令,获取每个SQL文件的变更责任人及修改日期,以便对于不合规范的SQL变更内容跟踪整改。
可选的,本实施例中应用如下命令:
“svn info-r HEAD“SQL文件SVN路径”>>“svn信息文件输出路径””;
可选的,可以将每个SQL文件的svn info命令生成到批处理中,然后执行批处理获取所有SQL文件变更的责任人和修改日期,比如,本实施例中生成批处理svnInfo.bat。
步骤S05:将步骤S03和S04中获取到的SQL文件的相关变更信息输出到EXCEL报表中,但不限于此,具体的统计信息包括:修改日期、修改责任人、SVN项目版本路径、修改的SQL文件名称、对象所属表名称、对象类型、对象名称、对象变更前内容、对象变更后内容、变更结论,其中,修改日期、修改责任人、SVN项目版本路径、修改的SQL文件名称、对象所属表名称、对象类型和对象名称可以从变更内容文件svnDiff.txt直接读取,对象变更前内容、对象变更后内容则是经过统计后的变更情况介绍,变更结论则是经过自定义的规则判断后得出的结论。
EXCEL报表的形式让数据库结构变更情况一目了然,方便DBA检查变更内容是否符合规范,及时反馈给责任人修改跟踪。
图4为本发明实施例的数据库变更信息管理系统结构示意图,该管理系统包括获取模块、提取分析模块和输出模块,其中获取模块可通过图3中步骤S02实施,提取分析模块通过步骤S03和S04实施,输出模块可通过步骤S05实施。上述模块所完成的功能类似于第三、四实施例中确定模块、判断模块所完成的功能,只是功能划分的方式不同而已。可选的,根据所述的实施方案,可将数据库变更信息管理系统部署到版本机,随项目版本分支更新每天定时统计,自动监控SQL文件变化情况,汇总详细变更内容,及时捕获数据库变更信息,同时为自动生成数据库升级脚本提供依据。
本发明实施例的所述获取数据库变更信息的方法,解决了软件项目开发过程中,无法及时准确获知数据库结构变更信息以及脚本变更合法性的问题,提高了数据库的可维护性。与相关技术相比较,本发明实施例有如下优点:
自动监控任何有变化的SQL文件;
通过自定义的规则文件,自动分析出数据库结构变更情况;
汇总分析结果,让数据库的变更情况一目了然;
及早发现脚本变更中的不合法和不规范性问题,降低数据库升级脚本出错的概率和风险。
让数据库升级脚本的自动化工作变为可能。
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储与存储器中的程序/指令来实现其相应功能。本发明不限于任何特定形式的硬件和软件的结合。
通过具体实施方式的说明,应当可对本发明为达成预定目的所采取的技术手段及功效得以更加深入且具体的了解,然而所附图示仅是提供参考与说明之用,并非用来对本发明加以限制。
工业实用性
上述技术方案准确的获知了数据库文件变更情况,并且可以分析此变更的规范性、合法性,防止不合法的变更导致数据库升级脚本的维护性降低,同时也可以缓解人工审核的压力和降低工作量。

Claims (12)

  1. 一种获取数据库变更信息的方法,包括:
    基于变更前后两个版本的结构化查询语言SQL文件之间的变更内容,确定变更的对象信息;
    针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
  2. 根据权利要求1所述的获取数据库变更信息的方法,还包括:
    在所述基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息之前,
    确定变更前后两个版本的SQL文件之间的变更内容。
  3. 根据权利要求2所述的获取数据库变更信息的方法,其中,确定变更前后两个版本的SQL文件之间的变更内容,包括:
    利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;
    基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
  4. 根据权利要求3所述的获取数据库变更信息的方法,其中,所述方法,还包括:
    从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
    利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;
    将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
  5. 根据权利要求1所述的获取数据库变更信息的方法,其中,所述基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息,包括:
    根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型;
    基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。
  6. 根据权利要求1所述的获取数据库变更信息的方法,其中,针对变更的对象信息进行合法性判断,包括:
    判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
    对于字段长度的变更,则不允许缩小;
    对于字段约束由null变为not null,则必须增加默认值约束;
    对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
    对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
    对于对象名称的变更,统一要求大写命名。
  7. 一种获取数据库变更信息的装置,包括:
    确定模块,设置为基于变更前后两个版本的SQL文件之间的变更内容,确定变更的对象信息;
    判断模块,设置为针对变更的对象信息进行合法性判断,并输出合法性判断的结果。
  8. 根据权利要求7所述的获取数据库变更信息的装置,所述确定模块还设置为:
    确定变更前后两个版本的SQL文件之间的变更内容。
  9. 根据权利要求8所述的获取数据库变更信息的装置,其中,所述确定模块是设置为采用以下方式实现确定变更前后两个版本的SQL文件之间的变更内容:
    利用版本管理工具对同一个项目分支中变更前后的两个版本的SQL文件执行区别比对命令,得到初步变更内容;
    基于初步变更内容进行空白信息和注释信息的过滤后,得到有效变更内容,即作为变更前后两个版本的SQL文件之间的变更内容。
  10. 根据权利要求9所述的获取数据库变更信息的装置,所述确定模块,还设置为:
    从执行区别比对命令所得到的初步变更内容所在的文件中获取以下辅助信息:项目分支中的SQL文件的路径、修改的SQL文件名称和变更的对象所属的表名称;
    利用版本管理工具对变更后的版本的SQL文件执行区别信息获取命令,得到该版本的SQL文件对应的修改日期和修改责任人;
    所述判断模块还设置为:
    将所述辅助信息、修改日期和修改责任人连同合法性判断的结果一起输出。
  11. 根据权利要求7所述的获取数据库变更信息的装置,其中,所述确定模块是设置为:
    根据在变更前后两个版本的SQL文件之间的变更内容中所包含的关键字确定变更的对象类型;
    基于所述变更内容和确定出的变更的对象类型,确定变更的对象名称,并确定以下统计信息:对象变更前内容和对象变更后内容。
  12. 根据权利要求7所述的获取数据库变更信息的装置,其中,所述判断模块是设置为:
    判断变更的对象信息是否满足下面的条件的至少一个,若是,则判定合法,若不是,则判定不合法:
    对于字段长度的变更,则不允许缩小;
    对于字段约束由null变为not null,则必须增加默认值约束;
    对于字段类型的变更,则变更后的字段类型要兼容变更前的字段类型;
    对于表名称的变更、增加主键或者修改主键,则必须按照主键名_表名的格式来命名主键;
    对于对象名称的变更,统一要求大写命名。
PCT/CN2016/090172 2015-09-08 2016-07-15 一种获取数据库变更信息的方法和装置 WO2017041578A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510566015.9 2015-09-08
CN201510566015.9A CN106503019A (zh) 2015-09-08 2015-09-08 一种获取数据库变更信息的方法和装置

Publications (1)

Publication Number Publication Date
WO2017041578A1 true WO2017041578A1 (zh) 2017-03-16

Family

ID=58240546

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/090172 WO2017041578A1 (zh) 2015-09-08 2016-07-15 一种获取数据库变更信息的方法和装置

Country Status (2)

Country Link
CN (1) CN106503019A (zh)
WO (1) WO2017041578A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508355A (zh) * 2018-10-19 2019-03-22 平安科技(深圳)有限公司 一种数据抽取方法、系统及终端设备
CN111611227A (zh) * 2020-05-21 2020-09-01 浩云科技股份有限公司 一种自定义监听数据库变化产生自定义消息结构的方法及控制装置
CN111651431A (zh) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 一种面向数据库服务的管理流程标准化方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255925B (zh) * 2017-11-10 2021-12-10 平安普惠企业管理有限公司 一种数据表结构变更情况的显示方法及其终端
CN108874964A (zh) * 2018-06-07 2018-11-23 火烈鸟网络(广州)股份有限公司 一种监控数据库的方法及系统
CN109446214B (zh) * 2018-10-22 2021-08-06 普元信息技术股份有限公司 大数据背景下基于乐观锁机制实现主数据版本管理的系统及方法
CN112256672B (zh) * 2020-10-22 2023-05-30 中国联合网络通信集团有限公司 数据库变更审批方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313244A1 (en) * 2007-06-15 2008-12-18 Akira Ito Method and system for data processing with database update for the same
CN101499069A (zh) * 2008-02-02 2009-08-05 中兴通讯股份有限公司 内存数据库文件的更新方法及更新装置
CN102073640A (zh) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Sql语句的检测方法、系统及服务器
CN103514166A (zh) * 2012-06-15 2014-01-15 阿里巴巴集团控股有限公司 Sql检查方法与装置
CN103810257A (zh) * 2014-01-24 2014-05-21 华为技术有限公司 一种升级软件数据库的方法、装置及设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402559A (zh) * 2010-09-16 2012-04-04 中兴通讯股份有限公司 一种数据库升级脚本的生成方法和装置
CN103294724B (zh) * 2012-03-05 2018-11-23 百度在线网络技术(北京)有限公司 一种数据库结构的管理方法及系统
CN103218398B (zh) * 2013-03-13 2015-02-25 江苏省电力公司电力科学研究院 智能变电站scl文件差异性比较方法
CN104376073A (zh) * 2014-11-14 2015-02-25 北京锐安科技有限公司 一种数据库恢复方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313244A1 (en) * 2007-06-15 2008-12-18 Akira Ito Method and system for data processing with database update for the same
CN101499069A (zh) * 2008-02-02 2009-08-05 中兴通讯股份有限公司 内存数据库文件的更新方法及更新装置
CN102073640A (zh) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Sql语句的检测方法、系统及服务器
CN103514166A (zh) * 2012-06-15 2014-01-15 阿里巴巴集团控股有限公司 Sql检查方法与装置
CN103810257A (zh) * 2014-01-24 2014-05-21 华为技术有限公司 一种升级软件数据库的方法、装置及设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109508355A (zh) * 2018-10-19 2019-03-22 平安科技(深圳)有限公司 一种数据抽取方法、系统及终端设备
CN111611227A (zh) * 2020-05-21 2020-09-01 浩云科技股份有限公司 一种自定义监听数据库变化产生自定义消息结构的方法及控制装置
CN111651431A (zh) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 一种面向数据库服务的管理流程标准化方法
CN111651431B (zh) * 2020-06-09 2023-06-27 中国雄安集团数字城市科技有限公司 一种面向数据库服务的管理流程标准化方法

Also Published As

Publication number Publication date
CN106503019A (zh) 2017-03-15

Similar Documents

Publication Publication Date Title
WO2017041578A1 (zh) 一种获取数据库变更信息的方法和装置
US8005803B2 (en) Best practices analyzer
KR101755365B1 (ko) 레코드 포맷 정보의 관리
US9449060B2 (en) Post-migration validation of ETL jobs and exception management
US20140006459A1 (en) Rule-based automated test data generation
US10223185B2 (en) Automated defect diagnosis from machine diagnostic data
US11599539B2 (en) Column lineage and metadata propagation
CN103092761A (zh) 基于差异信息文件识别和检查修改代码块的方法及装置
US20090240694A1 (en) Techniques for application data scrubbing, reporting, and analysis
US9256827B2 (en) Portable data management using rule definitions
US9037552B2 (en) Methods for analyzing a database and devices thereof
CN106843840A (zh) 一种基于相似度分析的源代码版本演化注释复用方法
CN112579461A (zh) 断言处理方法、系统和存储介质
US9367307B2 (en) Staged points-to analysis for large code bases
US8332335B2 (en) Systems and methods for decision pattern identification and application
US10782942B1 (en) Rapid onboarding of data from diverse data sources into standardized objects with parser and unit test generation
CN113672233B (zh) 一种基于Redfish的服务器带外管理方法、装置及设备
Kakarontzas et al. Component certification as a prerequisite forwidespread oss reuse
Kolovos et al. Towards flexible parsing of structured textual model representations
JP2013020519A (ja) プログラム改善支援システム
US11693834B2 (en) Model generation service for data retrieval
US8510274B2 (en) Method for verifying conversion, apparatus and program of the same
CN112445494A (zh) 实时计算任务的部署方法、装置及实时计算系统
JP5003293B2 (ja) データ検索装置、データ検索システム、データ検索方法および、データ検索プログラム
CN115543477A (zh) 数据库语句的处理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16843516

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16843516

Country of ref document: EP

Kind code of ref document: A1