A database compatibility verification method, device and equipment

By generating a verification executor task and running the verification data set on the target database, the time-consuming and cumbersome problem of database compatibility verification in the existing technology is solved, and efficient compatibility testing of applications and multiple databases is achieved.

CN119046265BActive Publication Date: 2025-01-21BEIJING SUWELL TECHNOLOGY CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411524376.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-01-21
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

Existing database compatibility verification methods are time-consuming and cumbersome, unable to fully cover various situations, resulting in inefficiency and high cost.

Method used

By obtaining the verification data set generated when the target application calls the source database instance, generate a verification executor task, and run the verification data set on the target database to obtain the running results to determine the compatibility of the application with multiple databases.

Benefits of technology

It improves the efficiency of database compatibility testing, can test the compatibility of applications with multiple databases, and reduces testing costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046265B_ABST
    Figure CN119046265B_ABST
Patent Text Reader

Abstract

The present invention provides a database compatibility verification method, device and equipment, the method comprising: obtaining a verification data set generated when a target application calls a source database instance; generating a verification executor task according to the verification data set; calling a target database to be verified through the verification executor task, and running the verification data set on the target database to obtain an operation result; determining the compatibility verification result of the target database to the target application according to the operation result; the source data of the target database is the same as that of the source database. The scheme of the present invention can test the compatibility of an application with multiple databases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer information technology processing technology, and in particular to a database compatibility verification method, device and equipment. Background Art

[0002] In the field of software application development, customers' relational databases vary depending on their purchasing situations. In order to ensure the compatibility of applications on different database management systems (DBMS), sufficient testing and verification are usually required. The current compatibility verification methods are often time-consuming and cumbersome, requiring separate testing for each database, and often fail to fully cover various situations, resulting in low efficiency and high costs. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a database compatibility verification method, device and equipment, which can test the compatibility of an application program with multiple databases, thereby improving the efficiency of database compatibility testing.

[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0005] A database compatibility verification method, comprising:

[0006] Obtain the verification data set generated when the target application calls the source database instance;

[0007] Generating a verification executor task according to the verification data set;

[0008] Calling the target database to be verified through the verification executor task, and running the verification data set on the target database to obtain the running result;

[0009] According to the running result, a compatibility verification result of the target database to the target application is determined; the source data of the target database is the same as that of the source database.

[0010] Optionally, obtain the verification data set generated when the target application calls the source database instance, including:

[0011] Obtain the target database operation statements generated during the operation of the target application calling the source database instance;

[0012] A set of target database operation statements is determined as a verification data set.

[0013] Optionally, generating a verification executor task according to the verification data set includes:

[0014] The verification data set is saved to a verification executor, and a target database to be verified is determined;

[0015] A verification executor task is generated according to the target database.

[0016] Optionally, calling the target database to be verified through the verification executor task, and running the verification data set on the target database to obtain the running result, including:

[0017] Calling the target database to be verified through the verification executor task, and obtaining the target driver of the target database;

[0018] According to the target driver, the target database operation statements in the verification data set are executed to obtain the operation results.

[0019] Optionally, according to the target driver, running the target database operation statement in the verification data set to obtain the running result includes:

[0020] According to the target driver, the target database operation statement is subjected to syntax verification, compatibility verification and preset identifier verifier integration verification;

[0021] When the syntax verification, compatibility verification and preset identifier verifier integration verification are all passed, the target database operation statement is executed to obtain an execution result;

[0022] According to the execution result, an operation result is obtained.

[0023] Optionally, determining, according to the running result, a compatibility verification result of the target database with the application program includes:

[0024] When the running result indicates that all target database operation statements in the verification data set are successfully executed, a first verification result that the application program is compatible with the target database is obtained;

[0025] Otherwise, according to the execution status of the target database operation statement, a second verification result is obtained that the application is incompatible with the target database.

[0026] Optionally, otherwise, obtaining a second verification result indicating that the target application is incompatible with the target database according to the execution status of the target database operation statement includes:

[0027] When the target database operation statement is interrupted, manually repair the interrupted statement and save the repaired statement;

[0028] The repaired statement is continuously executed to obtain a second verification result indicating that the target application is incompatible with the target database.

[0029] Optionally, the database compatibility verification method also includes:

[0030] A compatibility verification summary report is obtained according to the compatibility verification result of the target database and the target application; the compatibility verification summary report includes a change record of the target database operation statement during the execution of the verification data set.

[0031] The present invention also provides a database compatibility verification device, comprising:

[0032] An acquisition module is used to acquire a verification data set generated when a target application calls a source database instance;

[0033] A processing module is used to generate a verification executor task based on the verification data set; call the target database that needs to be verified through the verification executor task, and run the verification data set on the target database to obtain an operation result; based on the operation result, determine the compatibility verification result of the target database with the application; the source data of the target database is the same as that of the source database.

[0034] The present invention also provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is run by the processor, the method as described above is executed.

[0035] The above solution of the present invention includes at least the following beneficial effects:

[0036] The above scheme of the present invention obtains the verification data set generated when the target application calls the source database instance; generates a verification executor task according to the verification data set; calls the target database to be verified through the verification executor task, and runs the verification data set on the target database to obtain the running result; determines the compatibility verification result of the target database to the application according to the running result; the source data of the target database is the same as that of the source database. The compatibility of the application with multiple databases can be tested, thereby improving the efficiency of database compatibility testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flowchart of a database compatibility verification method according to an embodiment of the present invention;

[0038] Figure 2 It is a specific flow chart of the database compatibility verification method according to an embodiment of the present invention;

[0039] Figure 3 It is a structural diagram of a database compatibility verification device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0041] like Figure 1 As shown, an embodiment of the present invention provides a database compatibility verification method, including:

[0042] Step 11, obtaining a verification data set generated when the target application calls the source database instance;

[0043] Step 12, generating a verification executor task according to the verification data set;

[0044] Step 13, calling the target database to be verified through the verification executor task, and running the verification data set on the target database to obtain the running result;

[0045] Step 14: Determine the compatibility verification result of the target database with the application program according to the operation result; the source data of the target database is the same as that of the source database.

[0046] In this embodiment, the source database refers to the database instance used by the target application for verification, and the target database refers to the database instances of various database vendors whose compatibility needs to be verified. Figure 2 As shown, the target application calls the source database, and the interceptor intercepts the verification data set generated during the operation of the target application. The verification data set includes multiple target database operation statements. The verification data set is replayed on the target database that needs to be verified through the verification executor to obtain the operation result. According to the operation result, the compatibility information between the target application and the target database is obtained, and the problems therein are specifically solved. It should be noted that before the verification data set is replayed and verified on the target database, the target database needs to perform an initial data synchronization with the source database. The specific method includes: through ETL (Extract-Transform-Load, data warehouse technology) tools or data migration tools provided by various database vendors, the structure and data in the source database are migrated to the target database to ensure that the initial data sources of the source database and the target database are consistent.

[0047] In an optional embodiment of the present invention, step 11 may include:

[0048] Step 111, obtaining the target database operation statements generated during the operation of the target application calling the source database instance;

[0049] Step 112: determine the set of target database operation statements as a verification data set.

[0050] In this embodiment, the target application is connected to the source database instance, and the target database operation statements generated during the program running are uniformly intercepted by the recording interceptor and saved in the verification executor. The target database operation statements may include relevant statements such as DML (Data Manipulation Language) and DDL (Data Definition Language). All target database operation statements generated during the running of the target application constitute a verification data set, which is replayed and verified in the target database.

[0051] In an optional embodiment of the present invention, step 12 may include:

[0052] Step 121, saving the verification data set to a verification executor, and determining a target database to be verified;

[0053] Step 122: Generate a verification executor task according to the target database.

[0054] In this embodiment, the user determines the verification data set that needs to be verified and the target database that needs compatibility verification. A verification executor task is generated according to the target database. Figure 2 As shown, there can be multiple target databases, and a verification executor task is generated for each target database. The verification executor task can be executed simultaneously by multiple threads, and multiple verification executor tasks are scheduled by the verification task scheduler, and each task runs independently and does not affect each other.

[0055] In an optional embodiment of the present invention, step 13 may include:

[0056] Step 131, calling the target database to be verified through the verification executor task, and obtaining the target driver of the target database;

[0057] Step 132: according to the target driver, execute the target database operation statement in the verification data set to obtain the operation result.

[0058] In this embodiment, according to different types of target databases, the verification executor loads different target drivers and target data sources, runs the target database operation statements in the verification data set, and simulates the interaction process between the target application and the database. The verification data set sequentially analyzes and executes the target operation statements during the playback of the target database to obtain the operation results of the verification data set in the target database.

[0059] In an optional embodiment of the present invention, step 132 may include:

[0060] Step 1321, according to the target driver, perform syntax verification, compatibility verification and preset identifier verifier integration verification on the target database operation statement;

[0061] Step 1322, when the syntax verification, compatibility verification and preset identifier verifier integration verification are all passed, the target database operation statement is executed to obtain an execution result;

[0062] Step 1323, obtaining the operation result according to the execution result.

[0063] In this embodiment, during the playback of the target database, the verification data set first needs to perform syntax verification, compatibility verification and preset identifier verifier integrated verification on the target database operation statement. The syntax verification mainly includes determining whether the target database operation statement meets the syntax standard; the compatibility verification includes the verification of the syntax set that is clearly not supported by the target database, and the syntax set is obtained by sorting and collecting. This layer verifies the classes of the basic support layer, such as MySQL class, postgres class and Oracle class; the preset identifier verifier integrated verification includes the syntax verification that supports specific manufacturers, and this layer only verifies the special syntax of specific manufacturers. When the above-mentioned syntax verification, compatibility verification and preset identifier verifier integrated verification are all passed, the target database operation statement is executed. The target database operation statement may be successfully executed during the execution process, or the operation may be interrupted. When the operation is interrupted, after manual processing, it is continued to be executed until the overall process is completed. According to the execution result of each target database operation statement, the operation result of the verification data set in the target database is obtained.

[0064] When all the target database operation statements are executed, obtain the data A2' in the target database after the operation statements in the verification data set are executed. Obtain the data A2 in the source database after the source database runs the target application. Perform consistency verification on the data A2' and data A2. When the consistency verification passes, determine the compatibility of the target application and the target database based on the running results of the verification data set replayed in the target database.

[0065] The consistency verification includes the following aspects:

[0066] Verify the number of rows: Compare the number of rows in the source and target databases. You can get the number of rows in each table and compare them by executing SELECT COUNT(*) FROM table_name;.

[0067] Data content verification: compare the data content of a specific field, which can be statistical information such as the sum and average of numeric types, or the existence and distribution of specific strings of string types. For example, SELECT SUM(numeric_column), AVG(numeric_column) FROM source_table; and SELECT SUM(numeric_column), AVG(numeric_column) FROM target_table; compare the results;

[0068] Foreign key relationship verification: Ensure the integrity and consistency of foreign key associations. You can check foreign keys and referential integrity by SELECT * FROMinformation_schema.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'database_name';

[0069] Data checksum verification: Use hash functions such as MD5 and SHA1 to calculate the checksum of the data, and compare the checksum of the data in the source database and the target database to ensure that the data has not been tampered with or lost. For example, use the SQL statement SELECTMD5(GROUP_CONCAT(column1, column2, ... ORDER BY primary_key)) FROM table_name; to calculate the checksum;

[0070] Integrity check: Verify the integrity of the database structure, including entity integrity, reference integrity, and data consistency. This process ensures that the migrated database can maintain the correct logical relationship between data and follow established rules and constraints.

[0071] In an optional embodiment of the present invention, step 14 may include:

[0072] Step 141, when the operation result indicates that all target database operation statements in the verification data set are successfully executed, a first verification result of compatibility between the target application and the target database is obtained;

[0073] Step 142: otherwise, according to the execution status of the target database operation statement, a second verification result is obtained that the target application is incompatible with the target database.

[0074] In this embodiment, the compatibility of the target application and the target database is determined according to the execution of the target database operation statements. When all the target database operation statements are successfully executed, the target application is determined to be compatible with the target database. Otherwise, the target application is considered to be incompatible with the target database. A compatibility verification report is generated according to the interruption and continuation of the target database operation statements that are interrupted.

[0075] In an optional embodiment of the present invention, step 142 may include:

[0076] Step 1421, when the target database operation statement is interrupted, manually repair the interrupted statement and save the repaired statement;

[0077] Step 1422: Continue to execute the repaired statement to obtain a second verification result indicating that the target application is incompatible with the target database.

[0078] In this embodiment, the verification executor task includes sequentially executing all target database operation statements in the verification data set. When a problem occurs in the execution of a target database operation statement, the execution process will be interrupted here, and manual intervention will be required to correct the statement that is currently executing the problem, and record the statements before and after the repair to ensure that the modified statement can conform to the grammatical structure of the current playback target database. After the modification is completed, the subsequent statements will be executed. Repeat the above process if a problem occurs. After the overall verification is completed, the repair record participated in by the personnel compares the original statement with the repair statement, and a grammar compatibility report can be generated.

[0079] In an optional embodiment of the present invention, the database compatibility verification method further includes:

[0080] A compatibility verification summary report is obtained according to the compatibility verification result of the target database and the application program; the compatibility verification summary report includes a change record of the target database operation statement during the execution of the verification data set.

[0081] In this embodiment, a target database and application compatibility verification summary report is generated based on the successful execution of the target database operation statement during the verification data set playback, or the interrupted execution record, and the modification process of the target database operation statement after the interrupted execution.

[0082] The implementation process of the above method is further described below with a specific embodiment:

[0083] Embodiment 1,

[0084] The source database is PostgreSQL, and the target databases are Renda Jincang Database, DAMO Database, MySQL8.0, and Yashan Database.

[0085] 1. Migrate the PostgreSQL basic data set A1 to each target database using the data migration tool provided by the manufacturer to obtain the source data A1 of each target database;

[0086] 2. Verify the upgraded application on PostgreSQL and conduct overall functional verification test. During the test, the data collector will record (collect) the data generated during the execution process. After the application test is completed, the verification data set Y1 is generated. At this time, the PostgreSQL data is A2;

[0087] 3. The verification executor loads the verification data set Y1 and generates verification execution tasks according to the target database type for verification. The Renmin University of China Jincang database, DAMO database, MySQL8.0, and Yashan database correspond to verification tasks T1, T2, T3, and T4 respectively;

[0088] 4. The verification executor loads verification tasks T1, T2, T3, and T4 in multiple threads and executes the statements in Y1 in sequence;

[0089] 5. After the Y1 data set is executed in sequence, the data of each target database is now A2'. The verification executor generates a data consistency verification task to confirm that A2' of each target database is consistent with A2. The verification methods are all automated verification tasks as shown in the table;

[0090] 6. After the consistency verification task is completed, a compatibility verification summary report is generated based on the manual change records generated during the verification process of the verification data set Y1.

[0091] The database compatibility verification method of the present invention intercepts SQL execution logs, plays them back in each target database, obtains an application compatible database list, and solves the problems therein specifically. The method can effectively improve the stability and reliability of the application in a multi-database environment, reduce the testing cost and time cost, and improve the testing efficiency.

[0092] like Figure 3 As shown, the present invention also provides a database compatibility verification device 30, comprising:

[0093] An acquisition module 31 is used to acquire a verification data set generated when a target application program calls a source database instance;

[0094] The processing module 32 is used to generate a verification executor task based on the verification data set; call the target database that needs to be verified through the verification executor task, and run the verification data set on the target database to obtain an operation result; determine the compatibility verification result of the target database with the application based on the operation result; the source data of the target database is the same as that of the source database.

[0095] Optionally, obtain the verification data set generated when the target application calls the source database instance, including:

[0096] Obtain the target database operation statements generated during the operation of the target application calling the source database instance;

[0097] A set of target database operation statements is determined as a verification data set.

[0098] Optionally, generating a verification executor task according to the verification data set includes:

[0099] The verification data set is saved to a verification executor, and a target database to be verified is determined;

[0100] A verification executor task is generated according to the target database.

[0101] Optionally, calling the target database to be verified through the verification executor task, and running the verification data set on the target database to obtain the running result, including:

[0102] Calling the target database to be verified through the verification executor task, and obtaining the target driver of the target database;

[0103] According to the target driver, the target database operation statements in the verification data set are executed to obtain the operation results.

[0104] Optionally, according to the target driver, running the target database operation statement in the verification data set to obtain the running result includes:

[0105] According to the target driver, the target database operation statement is subjected to syntax verification, compatibility verification and preset identifier verifier integration verification;

[0106] When the syntax verification, compatibility verification and preset identifier verifier integration verification are all passed, the target database operation statement is executed to obtain an execution result;

[0107] According to the execution result, an operation result is obtained.

[0108] Optionally, determining, according to the running result, a compatibility verification result of the target database with the application program includes:

[0109] When the running result indicates that all target database operation statements in the verification data set are successfully executed, a first verification result that the application program is compatible with the target database is obtained;

[0110] Otherwise, according to the execution status of the target database operation statement, a second verification result is obtained that the application is incompatible with the target database.

[0111] Optionally, otherwise, obtaining a second verification result indicating that the target application is incompatible with the target database according to the execution status of the target database operation statement includes:

[0112] When the target database operation statement is interrupted, manually repair the interrupted statement and save the repaired statement;

[0113] The repaired statement is continuously executed to obtain a second verification result indicating that the target application is incompatible with the target database.

[0114] Optionally, the processing module 32 may also be used for:

[0115] A compatibility verification summary report is obtained according to the compatibility verification result of the target database and the target application; the compatibility verification summary report includes a change record of the target database operation statement during the execution of the verification data set.

[0116] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0117] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0118] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0120] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0123] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0124] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understandable that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or a network of computing devices, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0125] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0126] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A database compatibility verification method, characterized in that: include: Migrate the structure and data in the source database to the target database so that the source database is consistent with the initial data source of the target database; Obtain the verification data set generated when the target application calls the source database instance; Generating a verification executor task according to the verification data set; Calling the target database to be verified through the verification executor task, and running the verification data set on the target database to obtain the running result; Determining, according to the running result, a compatibility verification result of the target database with the target application; The target database has the same source data as the source database; The verification data set generated when the target application calls the source database instance is obtained, including: Obtaining target database operation statements generated during the operation of a target application calling a source database instance; determining a set of target database operation statements as a verification data set; The verification executor task calls the target database to be verified, and runs the verification data set on the target database to obtain the running result, including: Calling the target database to be verified through the verification executor task, and obtaining the target driver of the target database; According to the target driver, the target database operation statement in the verification data set is executed to obtain the operation result; Wherein, according to the target driver, the target database operation statement in the verification data set is run to obtain the running result, including: According to the target driver, the target database operation statement is subjected to syntax verification, compatibility verification and preset identifier verifier integrated verification; wherein the syntax verification includes determining whether the target database operation statement conforms to the syntax standard, the compatibility verification includes verifying the syntax set that is not supported by the target database, the syntax set is obtained by sorting and collecting, and the preset identifier verifier integrated verification includes the syntax verification of a specific manufacturer; When the syntax verification, compatibility verification and preset identifier verifier integration verification are all passed, the target database operation statement is executed to obtain the execution result; wherein, when all the target database operation statements are executed, the data A2' of the target database after the operation statements in the verification data set are executed is obtained; at the same time, the data A2 in the source database after the source database runs the target application is obtained; the data A2' and the data A2 are verified for consistency, and when the consistency verification passes, the compatibility of the target application and the target database is determined according to the running result of the verification data set replayed in the target database; According to the execution result, an operation result is obtained; Wherein, determining the compatibility verification result of the target database to the target application according to the operation result includes: When the operation result indicates that all target database operation statements in the verification data set are successfully executed, a first verification result is obtained that the target application is compatible with the target database; otherwise, a second verification result is obtained that the target application is incompatible with the target database according to the execution status of the target database operation statements; Wherein, obtaining a second verification result that the target application is incompatible with the target database according to the execution status of the target database operation statement includes: When the target database operation statement is interrupted, manually repair the interrupted statement and save the repaired statement; The repaired statement is continuously executed to obtain a second verification result indicating that the target application is incompatible with the target database.

2. The database compatibility verification method according to claim 1, characterized in that: Generate a verification executor task based on the verification data set, including: The verification data set is saved to a verification executor, and a target database to be verified is determined; A verification executor task is generated according to the target database.

3. The database compatibility verification method according to claim 1, characterized in that: Also includes: A compatibility verification summary report is obtained according to the compatibility verification result of the target database and the target application; the compatibility verification summary report includes a change record of the target database operation statement during the execution of the verification data set.

4. A database compatibility verification device, characterized in that: include: The acquisition module is used to migrate the structure and data in the source database to the target database so that the source database is consistent with the initial data source of the target database; Obtain the verification data set generated when the target application calls the source database instance; Specifically, it includes: obtaining target database operation statements generated during the operation of the target application program calling the source database instance; determining the set of target database operation statements as a verification data set; A processing module is used to generate a verification executor task according to the verification data set; call the target database to be verified through the verification executor task, and run the verification data set on the target database to obtain an operation result; according to the operation result, determine the compatibility verification result of the target database with the target application; the source data of the target database is the same as that of the source database; The verification executor task calls the target database to be verified, and runs the verification data set on the target database to obtain the running result, including: Calling the target database to be verified through the verification executor task, and obtaining the target driver of the target database; According to the target driver, the target database operation statement in the verification data set is executed to obtain the operation result; Wherein, according to the target driver, the target database operation statement in the verification data set is run to obtain the running result, including: According to the target driver, the target database operation statement is subjected to syntax verification, compatibility verification and preset identifier verifier integrated verification; wherein the syntax verification includes determining whether the target database operation statement conforms to the syntax standard, the compatibility verification includes verifying the syntax set that is not supported by the target database, the syntax set is obtained by sorting and collecting, and the preset identifier verifier integrated verification includes the syntax verification of a specific manufacturer; When the syntax verification, compatibility verification and preset identifier verifier integration verification are all passed, the target database operation statement is executed to obtain the execution result; wherein, when all the target database operation statements are executed, the data A2' of the target database after the operation statements in the verification data set are executed is obtained; at the same time, the data A2 in the source database after the source database runs the target application is obtained; the data A2' and the data A2 are verified for consistency, and when the consistency verification passes, the compatibility of the target application and the target database is determined according to the running result of the verification data set replayed in the target database; According to the execution result, an operation result is obtained; Wherein, determining the compatibility verification result of the target database to the target application according to the operation result includes: When the operation result indicates that all target database operation statements in the verification data set are successfully executed, a first verification result is obtained that the target application is compatible with the target database; Otherwise, obtaining a second verification result that the target application is incompatible with the target database according to the execution status of the target database operation statement; Wherein, obtaining a second verification result that the target application is incompatible with the target database according to the execution status of the target database operation statement includes: When the target database operation statement is interrupted, manually repair the interrupted statement and save the repaired statement; The repaired statement is continuously executed to obtain a second verification result indicating that the target application is incompatible with the target database.

5. A computing device, characterized in that: include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 3 is performed.

Citation Information

Patent Citations

  • Database compatibility evaluation method and device, electronic equipment and storage medium

    CN117389986A