WO2022062593A1 - Method for assessing database, apparatus, computing device, and computer program product - Google Patents

Method for assessing database, apparatus, computing device, and computer program product Download PDF

Info

Publication number
WO2022062593A1
WO2022062593A1 PCT/CN2021/106618 CN2021106618W WO2022062593A1 WO 2022062593 A1 WO2022062593 A1 WO 2022062593A1 CN 2021106618 W CN2021106618 W CN 2021106618W WO 2022062593 A1 WO2022062593 A1 WO 2022062593A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
candidate
databases
user interface
data structure
Prior art date
Application number
PCT/CN2021/106618
Other languages
French (fr)
Chinese (zh)
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 WO2022062593A1 publication Critical patent/WO2022062593A1/en

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/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • 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
    • 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/25Integrating or interfacing systems involving database management systems
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of computers, in particular to methods and apparatuses, computing devices and computer program products for evaluating databases.
  • the present application provides a method and apparatus for evaluating a database, a computing device and a computer program product, which can improve the efficiency of database migration.
  • the present application provides a method of evaluating a database.
  • One or more candidate databases are displayed on the user interface, and the candidate databases are databases determined in combination with the characteristics of the source database instance; the one or more candidate databases are displayed on the user interface, respectively deployed from the source database instance.
  • the amount of work required for the migrated data structures is not limited to one or more candidate databases.
  • the workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate database in combination with the workload.
  • the target database is used to deploy data structures migrated from the source database instance.
  • the apparatus obtains a target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
  • the device selects candidate databases from multiple databases in combination with the characteristics and workload of the source database, and the candidate databases after the screening are all databases suitable for carrying the data structures migrated from the source database.
  • the device presents the optimal candidate database on the user interface, and the user can select and determine the target database as needed, which can improve the efficiency of database migration and ensure the stability of the evaluation database.
  • the device displays the workload of the candidate database on the user interface, and the user can also select the candidate database with less workload as the target database, which can reduce the migration time of the data structure of the database.
  • the workload required for deploying the data structure in the candidate database is for a user to determine a target database from the one or more candidate databases in the user interface.
  • the workload required to deploy the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following combinations: syntax conversion rate, compatibility degree, and amount of code.
  • the priority of the candidate database is displayed on the user interface.
  • the user can know the migration compatibility degree of the candidate database at a glance, and the user can further select the candidate database with high priority as the target database, which can improve the stability and success rate of the evaluation database.
  • the user can also select a suitable candidate database as the target database in combination with other factors (such as cost).
  • one or more specification configurations of the candidate database are displayed on the user interface.
  • a specification configuration determined by a user from one or more specification configurations in the target database is obtained.
  • the specification configuration includes one or more of the following combinations:
  • the source database and the candidate database are databases of different types.
  • the characteristics of the source database instance include one or more of the following combinations:
  • the characteristics of the source database instance are determined based on operating parameters of the source database instance
  • the operating parameters of the source database instance include one or more combinations of the following parameters:
  • TPS Transactions per second
  • QPS query rate per second
  • IOPS input and output operations per second
  • memory usage CPU usage
  • active sessions database configuration
  • database capacity database capacity
  • table complexity database complexity
  • SQL structured query language
  • the one or more candidate databases are determined in combination with the characteristics of the source database instance and database compatibility, and the database compatibility refers to the degree of compatibility between the candidate database and the source database .
  • the present application provides an apparatus for evaluating a database.
  • the apparatus includes a plurality of functional modules for implementing the steps in the method provided by the first aspect or any possible design of the first aspect.
  • the present application provides a computing device including a processor and a memory.
  • the memory stores instructions; the processor executes the instructions stored in the memory, causing the computing device to perform steps in the methods provided by the first aspect or various possible designs of the first aspect, or cause the computing device to deploy the methods provided by the second aspect A means of evaluating the database.
  • the present application provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium.
  • the computing device executes the first aspect or the first aspect.
  • the present application provides a computer program product comprising instructions stored in a computer-readable storage medium.
  • the processor of the computing device may read the instruction from the computer-readable storage medium, and the processor executes the instruction, causing the computing device to perform the steps in the method provided by the above-mentioned first aspect or various possible designs of the first aspect, or cause the The computing device deploys the data node evaluation database apparatus provided in the second aspect.
  • FIG. 1 is a schematic diagram of a scenario of database migration provided by the present application.
  • Fig. 2 is a kind of realization schematic diagram of screening candidate database
  • FIG. 3 is a schematic diagram of a user interface for the application to select a target database from a plurality of candidate databases
  • FIG. 4 is a schematic flowchart of a method for evaluating a database provided by the present application.
  • FIG. 5 is a schematic diagram of a logical structure of an apparatus for evaluating a database provided by the application
  • FIG. 6 is a schematic structural diagram of a computing device 800 provided by the present application.
  • the source database instance 11 deploys the source database 111 .
  • the source database instance 11 provides database services through the source database 111 , for example, for a user to query data in the source database 111 .
  • FIG. 1 also illustrates a database migration scenario
  • the source database 111 is the database of the data structure to be migrated
  • the target database 211 is the database used to deploy the migrated data structure.
  • the data structure of the source database is divided into three categories:
  • the first type of data structure of the source database is the data structure natively supported by the target database to the source database;
  • the second type of data structure of the source database which is transformed into a data structure supported by the target database through tools
  • the third type of data structure of the source database is other data structures other than the first type of data structure and the second type of data structure.
  • the third type of data structure is not supported by the target database, and cannot be transformed into a data structure supported by the target database through tools.
  • An implementation example of deploying the data structure migrated from the source database 111 to the target database 211 For the first type of data structure, the target database 211 can use it directly; for the second type of data structure of the source database, the target database 211 obtains the data structure through syntax conversion The tool transforms the data structure of the second type of data structure; for the third type of data structure of the source database, feedback to the user (eg feedback through the user interface) to modify the suggestion or provide an alternative data structure.
  • the data structure can include one or more of the following combinations:
  • Table structure index structure, view, materialized view, procedure, sequence, function, package, etc.
  • the source database 111 and the target database 211 are different types of databases.
  • the source database 111 and the target database 211 are heterogeneous databases.
  • the source database 111 is a relational database
  • the target database 211 is a non-relational database
  • the source database 111 is a non-relational database
  • the target database 211 is a relational database
  • the source database 111 and target database 211 are two different types of relational databases
  • source database 111 and target database 211 are two different types of non-relational databases.
  • the source database 111 is an oracle database
  • the target database 211 is a MySQL database or a ProsgreSQL database.
  • the following example provides an implementation manner of obtaining the candidate database, as shown in FIG. 2 .
  • the source database instance 11 is an oracle database instance.
  • the Oracle data structure will be migrated to other heterogeneous databases first.
  • cloud platforms support multiple databases, such as MySQL database, DB2 database, SQL Server database, Postgre SQL database, MongoDB database, Redis database, Memcached database and HBse database.
  • the screening module will screen out multiple candidate databases from these multiple databases based on the characteristics of the oracle database instance. For example, the oracle database is a relational database. Therefore, the screening module considers the compatibility between databases and selects from these multiple databases.
  • the screening module can further consider business scenarios to determine candidate databases. If the characteristics of the oracle database instance indicate that oracle is used for shopping websites with high concurrency, the screening module will select DB2 databases and SQL Server databases as candidate databases; If the feature indicates that oracle is used for patent search websites with low concurrency, the filtering module will select MySQL database as the candidate database.
  • FIG. 3 provides an example of a display manner in which the present application displays the candidate database of FIG. 2 through a user interface.
  • the filtering module filters out 4 types of relational databases: MySQL database, DB2 database, SQL Server database, Postgre SQL database.
  • the screening module evaluates and sorts the business scenarios of these four types of databases combined with patent search websites. MySQL database belongs to the first priority of recommended users, Postgre SQL database belongs to the second priority of recommended users, and both DB2 database and SQL Server database belong to third priority.
  • Migrating the data structures of an oracle database instance to a first-priority MySQL is better than migrating to a second-priority PostgreSQL database.
  • migrating the data structures of an oracle database instance to a second-priority Postgre SQL database is preferable to migrating to a third-priority DB2 database or SQL Server database. That is, the first priority is higher than the second priority, and the second priority is higher than the third priority. Of course, the priority is only the priority order given by the filtering module.
  • Users can choose the target database for migration according to their needs. For example, users can choose Postgre SQL database or DB2 database or SQL Server database as the target database. It is not necessary to choose the first priority. level MySQL database.
  • the screening module will give one or more specification configurations. Examples of two possible business scenarios. If the business is computationally expensive (such as a business with continuous high concurrency), you can choose a computing-based configuration (for example, 8 cores, 32G memory, 128G hard disk); if the business is storage-consuming (such as business with continuous high storage), you can choose storage-type specifications (such as 4 cores, 64G memory, 256 hard drives).
  • a computing-based configuration for example, 8 cores, 32G memory, 128G hard disk
  • storage-type specifications such as 4 cores, 64G memory, 256 hard drives.
  • Deploy the first type of data structure migrated from the oracle database instance deploy the data structure transformed from the second type of data structure migrated from the oracle database instance through the syntax conversion tool, and provide feedback to the user for the third type of data structure of the oracle database instance (for example, through user interface feedback) to suggest changes or provide alternative data structures.
  • the screening module may also provide one or more version number selections, and the version number is not shown in FIG. 3 .
  • the screening module calculates the workload of deploying data structures migrated from the source database in each candidate database (such as database administrator (DBA) workload, development workload, and testing workload, etc. ).
  • the user interface presents: the workload (DBA workload, development workload, testing workload) required to deploy the data structure migrated from the oracle database instance in the MySQL database, and the deployment workload from oracle in the Postgre SQL database
  • the workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate databases in combination with the workload and/or priority.
  • the following example provides a possible implementation manner of how the screening module screens out the candidate database.
  • the operating parameters of the source database instance 11 include one or more of the following: transactions per second (transactions per second, TPS), query rate per second (queries per second, QPS), input/output operations per second (input/output) per second, IOPS), memory usage, central processing unit (CPU) usage, active sessions, database configuration, database capacity, table complexity, and SQL complexity.
  • the characteristics of the source database instance 11 are obtained through analysis.
  • the characteristics of the source database instance 11 include two types of characteristics.
  • the first type of features of the source database instance 11 include one or more of the following: stored procedures, materialized views, table partitions, triggers, in-database scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high Available as well as bulk loading and more.
  • the source database instance 11 may have one or more characteristics of the first type of characteristics, that is, the source database instance 11 may use one or more characteristics of the first type of characteristics, for example, the source database instance 11 may use triggers, and then For example, the source database instance 11 may use a materialized view.
  • the second type of characteristics of the source database instance 11 includes one or more of the following: concurrency, scalability, recovery point objective (RPO), recovery time objective (RTO), deployment across data centers , storage capacity, and storage costs.
  • the candidate database is determined by analysis based on the characteristics of the source database instance 11 and the compatibility between the databases.
  • database instance 11 is an oracle database instance
  • multiple databases are MySQL database, DB2 database, SQL Server database, Postgre SQL database, MongoDB database, Redis database, Memcached database and HBse database, then combine the characteristics of the oracle database instance and the oracle database
  • the compatibility between the instance and these multiple databases determines that MySQL database, DB2 database, SQL Server database, and Postgre SQL database are candidate databases with good compatibility, because MySQL database, DB2 database, SQL Server database, Postgre SQL database and Oracle databases are relational databases, and there are relatively few second- or third-type data structures that need to be transformed between databases.
  • non-relational databases such as MongoDB, Redis, Memcached, and HBse are less compatible with oracle databases, so MongoDB, Redis, Memcached, and HBse are not screened modules. Selected as candidate database.
  • FIG. 4 provides an example of the flow steps of the method, and the steps of the method include steps 41 to 43 .
  • Step S41 displaying one or more candidate databases on the user interface.
  • the candidate database displayed on the user interface is the database determined in combination with the characteristics of the source database instance 11 . Therefore, each candidate database is relatively suitable for deploying the data structure from the source database instance 11 , less second data structure needs to be transformed during deployment, and less third data structure needs to be adjusted by the user during deployment.
  • the characteristics of the source database instance 11 are determined based on operating parameters of the source database instance 11 .
  • the operating parameters of the source database instance 11 include one or more of the following: transactions per second (transactions per second, TPS), query rate per second (queries per second, QPS), input/output operations per second (input/output) per second, IOPS), memory usage, central processing unit (CPU) usage, active sessions, database configuration, database capacity, table complexity, and SQL complexity.
  • the operating parameters of the source database instance 11 may be determined by the services provided by the source database instance 11. If the source database instance 11 supports the continuous high-concurrency shopping website query service, the TPS, QPS, IOPS, Memory usage, CPU usage, active sessions, etc. are relatively high. If the source database instance 11 supports continuous low-concurrency travel website query services, the TPS, QPS, IOPS, memory usage, CPU usage, and active sessions, etc. etc. is relatively low.
  • the characteristics of the source database instance 11 determined based on the operating parameters of the source database instance 11 may include one or more of the following combinations: stored procedures, materialized views, table partitions, triggers, In-library scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high availability, batch loading, concurrency, scalability, recovery point objective (RPO), recovery time objective (RTO), cross-data center deployment, storage capacity, and storage cost, etc.
  • the source database instance 11 may have one or more first-class features (stored procedures, materialized views, table partitions, triggers, in-store scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high availability) and batch loading, etc.), the first type of characteristics may be determined by the business needs of the business carried by the source database instance 11 .
  • the source database instance 11 may have one or more characteristics of the second type (concurrency, scalability, RPO, RTO, storage capacity, storage cost, etc.), and the value of the first type of characteristics may be the value of the service carried by the source database instance 11. decided.
  • the operating parameters of the source database instance 11 reflect the data structure requirements of the business on the source database instance 11
  • the operating parameters of the source database instance 11 determine the characteristics of the source database instance 11, and the characteristics of the source database instance 11 can basically also reflect the business's demand for the source database instance 11. Data structure requirements for database instance 11.
  • each candidate database is determined in combination with the characteristics of the source database instance and database compatibility, where the database compatibility refers to the degree of compatibility between the candidate database and the source database.
  • database compatibility refers to the degree of compatibility between the candidate database and the source database.
  • the degree of compatibility of two databases in a non-relational database is better than the degree of compatibility between a relational database and a non-relational database; similarly, the degree of compatibility between two databases in a relational database is also better than that of a relational database Compatibility with non-relational databases.
  • the screening module uses a screening model to determine the candidate database.
  • the characteristics of the source database instance are compatible with the database as an input to the screening model, so that the screening model can screen candidate databases from multiple databases.
  • the source database and the candidate database are databases of different types.
  • the source database and the candidate database may be two types of databases in relational databases, for example, the source database is an oracle database and the candidate database may be a MySQL database.
  • the source database and the candidate database may be two types of databases in non-relational databases, for example, the source database is a MongoDB database and the candidate database may be a Redis database.
  • the source database may belong to a relational database (eg, an oracle database), and the candidate database may belong to a non-relational database (eg, a Redis database); or, the source database may belong to a non-relational database (eg, a Redis database), and the candidate database Can belong to relational database (eg oracle database).
  • a relational database eg, an oracle database
  • the candidate database may belong to a non-relational database (eg, a Redis database)
  • the source database may belong to a non-relational database (eg, a Redis database)
  • the candidate database Can belong to relational database (eg oracle database).
  • Figure 3 exemplifies an arrangement that displays multiple candidate databases (MySQL database, DB2 database, SQL Server database, and Postgre SQL database).
  • a priority order of multiple candidate databases is presented to the user.
  • MySQL database belongs to the first priority of recommended users
  • Postgre SQL database belongs to the second priority of recommended users
  • both DB2 database and SQL Server database belong to the third priority.
  • the MySQL database with the first priority is most suitable for hosting the data structure of the Oracle database instance to be migrated from
  • the Postgre SQL database with the second priority is better suitable for hosting the data structure of the Oracle database instance from the migration
  • the database is generally suitable for hosting the data structures from the migrated oracle database instance.
  • a possible user interface design where one or more specification configurations of the candidate database are displayed.
  • the user is presented with two specifications for each candidate database: one specification configuration is (8 cores, 32G memory, 128G hard disk), and the other specification configuration (4 cores, 64G memory, 256 hard disks).
  • one specification configuration is (8 cores, 32G memory, 128G hard disk)
  • the other specification configuration (4 cores, 64G memory, 256 hard disks).
  • the business is computing-consuming (such as a business with continuous high concurrency)
  • you can choose a computing-based specification such as 8 cores, 32G memory, 128G hard disk.
  • storage-type specifications such as 4 cores, 64G memory, 256 hard drives.
  • the user can select the specification configuration in combination with the business, and in addition, the user can also select the specification configuration considering the cost.
  • the user can first determine the target database from one or more candidate databases of the user interface, and then determine a specification configuration from one or more specification configurations of the target database, and accordingly, the system will The specification and configuration determined by the user will be obtained.
  • the user selects the MySQL database as the target database, and further selects the specification and configuration of the MySQL database (8 cores, 32G memory, 128G hard disk).
  • the data structure of the source database 111 eg, the oracle database
  • the target database eg, the MySQL database configured by the user-specified specification.
  • the specification configuration of the candidate database includes one or more combinations of the following: processor, memory, hard disk, and input/output (IO) configuration.
  • processor for example, as shown in Figure 3, one specification configuration can be an 8-core processor, 32G memory and a 128G hard disk, and another specification configuration can be a 4-core processor, 64G memory and 256G hard disk.
  • Step S42 displaying on the user interface the workload required to deploy the data structures migrated from the source database instance in the one or more candidate databases respectively.
  • the workload includes one or more combinations of the following: DBA workload, development workload, and testing workload.
  • DBA workload refers to the workload required by the database administrator to deploy the data structure migrated from the source database instance in the candidate database.
  • Development workload refers to the workload of developers to develop the code required to deploy the data structures migrated from the source database instance in the candidate database.
  • Test workload refers to the workload of the tester to test the code required to deploy the data structure migrated from the source database instance in the candidate database.
  • the workload required for deploying the data structure in the candidate database is used for the user to determine the target database from the one or more candidate databases in the user interface.
  • the user interface presents: the workload (DBA workload, development workload, testing workload) required to deploy the data structure migrated from the oracle database instance in the MySQL database, and the deployment workload from oracle in the Postgre SQL database
  • the workload (DBA workload, development workload, and test workload) required to migrate the data structure of the database instance, and the workload required to deploy the data structure migrated from the oracle database instance in the DB2 database (DBA workload, development workload) , test workload), the workload (DBA workload, development workload, test workload) required to deploy the data structure migrated from the oracle database instance in the SQL Server database.
  • the workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate databases in combination with the workload and/or priority.
  • the workload required to deploy the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following combinations: syntax conversion rate, compatibility degree, and code amount .
  • the syntax conversion rate as a parameter refers to the conversion rate of converting the data structure syntax of the source database instance into the candidate database.
  • the degree of compatibility as a parameter refers to the degree of compatibility between the source database and the candidate database.
  • the amount of code used as a parameter refers to the amount of code required to implement the deployment of the data structure of the source database instance in the candidate database.
  • the parameter used to evaluate the workload required to deploy the data structure in the candidate database may also include other parameters other than the syntax conversion rate, the degree of compatibility, and the amount of code, for example, the other parameter may include the DBA knowledge base, Such other parameters may include, for example, an evaluation baseline used by historical evaluation workloads.
  • the screening module can use a workload evaluation model, and use the parameters (such as syntax conversion rate, compatibility level, and code amount) as the input of the workload evaluation model, and the evaluation model can output workload (such as DBA workload). , development effort, and testing effort).
  • parameters such as syntax conversion rate, compatibility level, and code amount
  • the evaluation model can output workload (such as DBA workload). , development effort, and testing effort).
  • Step S43 Obtain a target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
  • the system After the user determines the target database on the user interface, the system obtains the target database determined by the user. Subsequently, an instance of the target database can be deployed, and the data structure migrated from the source database instance can be deployed in the target database through the instance.
  • the user selects the MySQL database as the target database on the user interface, and determines that the specifications of the MySQL database are configured as an 8-core processor, 32G of memory, and 128G of hard disk. Subsequently, when the data structure of the oracle database instance needs to be migrated, the system deploys the MySQL database instance with the specified configuration (8-core processor, 32G memory, and 128G hard disk). In this way, the MySQL database instance can deploy the data structures migrated from the oracle database instance in the MySQL database.
  • the MySQL database instance can be used natively, that is, the MySQL database instance can deploy the first type of data structure in the MySQL database. ;
  • the MySQL database instance transforms the data structure of the second type of data structure through the syntax conversion tool, and deploys the transformed data structure in the MySQL database; for the second type of data structure migrated from the oracle database instance.
  • Three types of data structures that provide feedback to the user (eg, through user interface feedback) to suggest modifications or to provide alternative data structures.
  • the present application also provides an apparatus for evaluating the database, and the apparatus can be deployed on the computing device (such as a server) of the present application.
  • the apparatus includes functional units for implementing the above method for evaluating a database; this application does not limit how the functional units are divided in the apparatus.
  • the division of a functional unit of the apparatus for evaluating the database is exemplarily provided below, as shown in FIG. 5 .
  • the device 50 includes:
  • the candidate database display module 51 is used to display one or more candidate databases on the user interface, and the candidate databases are databases determined in combination with the characteristics of the source database instance;
  • the workload display module 52 is configured to display, on the user interface, the workload required to deploy the data structures migrated from the source database instance in the one or more candidate databases respectively.
  • apparatus 50 comprising:
  • the obtaining module 53 is configured to obtain the target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
  • the effort required to deploy the data structure in the candidate database is for the user to determine the target database from the one or more candidate databases in the user interface.
  • the effort required to deploy the data structure in the candidate database is determined based on parameters including one or more combinations of the following: syntax conversion rate, degree of compatibility, and code quantity.
  • the candidate database display module 51 is configured to display the priority of the candidate database on the user interface.
  • the candidate database display module 52 is configured to display one or more specification configurations of the candidate database on the user interface.
  • the obtaining module 53 is configured to obtain the specification configuration determined by the user from one or more specification configurations of the target database.
  • One possible design of device 50 includes one or more of the following combinations:
  • the source database and the candidate database are different types of databases.
  • FIG. 6 schematically provides a possible basic hardware architecture of the computing device of the present application.
  • computing device 800 includes processor 801 , memory 802 , communication interface 803 , and bus 804 .
  • the number of processors 801 may be one or more, and FIG. 6 only illustrates one of the processors 801.
  • the processor 801 may be a central processing unit (central processing unit, CPU). If the computing device 800 has multiple processors 801, the multiple processors 801 may be of different types, or may be the same. Optionally, the multiple processors 801 of the computing device 800 may also be integrated into a multi-core processor.
  • the memory 802 stores instructions and data; the memory 802 can store the instructions and data required to implement the method for evaluating the database provided by the present application, and the memory 802 can also store the instructions for implementing the steps performed by the apparatus for evaluating the database in the method for evaluating the database .
  • the memory 802 may be any one or any combination of the following storage media: non-volatile memory (eg, read only memory (ROM), solid state disk (SSD), hard disk (HDD), optical disk), volatile memory.
  • the communication interface 803 may be any one or any combination of the following devices: a network interface (eg, an Ethernet interface), a wireless network card, and other devices with a network access function.
  • the communication interface 803 is used for data communication between the computing device 800 and other computing devices or terminals.
  • Figure 6 represents the bus 804 with a thick line.
  • a bus 804 may connect the processor 801 with the memory 802 and the communication interface 803 . In this way, through the bus 804, the processor 801 can access the memory 802, and can also use the communication interface 803 to perform data interaction with other computing devices or terminals.
  • the computing device 800 executes the instructions in the memory 802, so that the computing device 800 implements the method for evaluating the database provided by the present application.
  • the computing device 800 executes the instructions in the memory 802, so that the computing device 800 implements the apparatus 50 of the evaluation database of the present application.
  • the present application provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium.
  • the processor 801 of the computing device 800 executes the instruction, the method for the computing device 800 to execute the foregoing evaluation database is executed by the coordinating node or the computing device 800 implements the functions of the apparatus for evaluating the database of the present application.
  • the present application provides a computer program product comprising instructions stored in a computer-readable storage medium.
  • the processor 801 of the computing device 800 can read the instruction from the computer-readable storage medium, and the processor 801 executes the instruction, causing the computing device 800 to perform the steps performed by the coordinating node in the above-mentioned method for evaluating a database, or causing the computing device 800 to implement The function of the means of evaluating the database of this application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided in the present application is a method for assessing a database, an apparatus, a computing device, and a computer program product. In the present method, one or more candidate databases are displayed on a user interface, the candidate databases being databases determined via incorporating a feature of a source database instance; and a workload required to deploy a data structure migrated from the source database instance for each among one or more of the candidate databases are displayed on the user interface. Consequently, workloads are presented on the user interface, which facilitates a user in taking the workloads into consideration, and a target database is determined from the candidate databases via incorporating the workloads. The target database is used for deploying a data structure migrated from the source database instance.

Description

评估数据库的方法和装置、计算设备和计算机程序产品Method and apparatus, computing device and computer program product for evaluating a database 技术领域technical field
本申请涉及计算机领域,尤其涉及评估数据库的方法和装置、计算设备和计算机程序产品。The present application relates to the field of computers, in particular to methods and apparatuses, computing devices and computer program products for evaluating databases.
背景技术Background technique
异构数据库之间存在数据库引擎的差异,各种数据库之间的对象结构设计、结构化查询语言(Structured Query Language,SQL)语法、权限管控等都有较大的差异性。如何快速的进行异构数据库的迁移成为用户的难点。There are differences in database engines between heterogeneous databases, and there are great differences in object structure design, Structured Query Language (SQL) syntax, and authority control among various databases. How to quickly migrate heterogeneous databases becomes a difficult point for users.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供了一种评估数据库的方法和装置、计算设备和计算机程序产品,可以提高数据库迁移的效率。In view of this, the present application provides a method and apparatus for evaluating a database, a computing device and a computer program product, which can improve the efficiency of database migration.
第一方面,本申请提供一种评估数据库的方法。在用户界面显示一个或多个候选数据库,所述候选数据库是结合源数据库实例的特征确定的数据库;在所述用户界面显示在一个或多个所述候选数据库中各自部署从所述源数据库实例迁移的数据结构所需的工作量。In a first aspect, the present application provides a method of evaluating a database. One or more candidate databases are displayed on the user interface, and the candidate databases are databases determined in combination with the characteristics of the source database instance; the one or more candidate databases are displayed on the user interface, respectively deployed from the source database instance. The amount of work required for the migrated data structures.
在用户界面展示工作量,便于用户考虑工作量,结合工作量从候选数据库中确定目标数据库。目标数据库用于部署从所述源数据库实例迁移的数据结构。The workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate database in combination with the workload. The target database is used to deploy data structures migrated from the source database instance.
第一方面的一种可能设计,装置获取用户从所述一个或多个候选数据库中确定的目标数据库,所述目标数据库用于部署从所述源数据库实例迁移的数据结构。In a possible design of the first aspect, the apparatus obtains a target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
这样,装置会结合源数据库的特征和工作量从多个数据库中筛选出候选数据库,经过筛选后的候选数据库均为适合承载从源数据库迁移的数据结构的数据库。装置在用户界面呈现较优选择的候选数据库,用户可以按需选择确定目标数据库,可以提高数据库迁移的效率和保证评估数据库的稳定性。另外,装置在用户界面呈现候选数据库的工作量,用户也可以选择工作量小的次优选的候选数据库作为目标数据库,可以减少数据库的数据结构的迁移时间。In this way, the device selects candidate databases from multiple databases in combination with the characteristics and workload of the source database, and the candidate databases after the screening are all databases suitable for carrying the data structures migrated from the source database. The device presents the optimal candidate database on the user interface, and the user can select and determine the target database as needed, which can improve the efficiency of database migration and ensure the stability of the evaluation database. In addition, the device displays the workload of the candidate database on the user interface, and the user can also select the candidate database with less workload as the target database, which can reduce the migration time of the data structure of the database.
第一方面的一种可能设计,在所述候选数据库部署所述数据结构所需的工作量,用于供用户在所述用户界面从所述一个或多个候选数据库中确定目标数据库。In a possible design of the first aspect, the workload required for deploying the data structure in the candidate database is for a user to determine a target database from the one or more candidate databases in the user interface.
第一方面的一种可能设计,在所述候选数据库部署所述数据结构所需的工作量是基于参数确定的,所述参数包括如下的一种或多种组合:语法转换率、兼容程度以及代码量。In a possible design of the first aspect, the workload required to deploy the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following combinations: syntax conversion rate, compatibility degree, and amount of code.
第一方面的一种可能设计,在所述用户界面显示所述候选数据库的优先级。In a possible design of the first aspect, the priority of the candidate database is displayed on the user interface.
这样,用户可以一目了然候选数据库的迁移兼容程度,用户可以进一步选择优先级高的候选数据库作为目标数据库,这样可以提高评估数据库的稳定性和成功率。当然,用户也可以结合其它因素(例如成本),选择适合的候选数据库作为目标数据库。In this way, the user can know the migration compatibility degree of the candidate database at a glance, and the user can further select the candidate database with high priority as the target database, which can improve the stability and success rate of the evaluation database. Of course, the user can also select a suitable candidate database as the target database in combination with other factors (such as cost).
第一方面的一种可能设计,在所述用户界面显示所述候选数据库的一个或多个规格配置。In a possible design of the first aspect, one or more specification configurations of the candidate database are displayed on the user interface.
这样,用户可以进一步选择出适合业务的规格配置。In this way, the user can further select the specification configuration suitable for the business.
第一方面的一种可能设计,获取用户从所述目标数据库的一个或多个规格配置中确定的规格配置。In a possible design of the first aspect, a specification configuration determined by a user from one or more specification configurations in the target database is obtained.
第一方面的一种可能设计,所述规格配置包括如下的一种或多种组合:In a possible design of the first aspect, the specification configuration includes one or more of the following combinations:
处理器、内存、硬盘以及输入输出IO配置。Processor, memory, hard disk and input and output IO configuration.
第一方面的一种可能设计,所述源数据库与所述候选数据库为不同类型的数据库。In a possible design of the first aspect, the source database and the candidate database are databases of different types.
第一方面的一种可能设计,所述源数据库实例的特征包括如下的一种或多种组合:In a possible design of the first aspect, the characteristics of the source database instance include one or more of the following combinations:
存储过程、物化视图、表分区、触发器、库内调度、资源管理、健康监控、审计、闪回、备份恢复、集群高可用、批量装载、并发度、扩展度、恢复点目标RPO,恢复时间目标RTO、跨数据中心部署、存储容量以及存储成本。Stored procedures, materialized views, table partitions, triggers, in-library scheduling, resource management, health monitoring, auditing, flashback, backup recovery, cluster high availability, bulk loading, concurrency, scalability, recovery point target RPO, recovery time Target RTO, deployment across data centers, storage capacity, and storage cost.
第一方面的一种可能设计,所述源数据库实例的特征是基于所述源数据库实例的运行参数确定的;In a possible design of the first aspect, the characteristics of the source database instance are determined based on operating parameters of the source database instance;
其中,所述源数据库实例的运行参数包括如下参数的一种或多种组合:Wherein, the operating parameters of the source database instance include one or more combinations of the following parameters:
每秒事务数TPS、每秒查询率QPS、每秒输入输出操作IOPS、内存使用率、中央处理器CPU使用率、活跃会话、数据库配置、数据库容量、表复杂度以及结构化查询语言SQL复杂度。Transactions per second (TPS), query rate per second (QPS), input and output operations per second (IOPS), memory usage, CPU usage, active sessions, database configuration, database capacity, table complexity, and structured query language (SQL) complexity .
第一方面的一种可能设计,所述一个或多个候选数据库是结合源数据库实例的特征和数据库兼容性确定的,所述数据库兼容性是指所述候选数据库与所述源数据库的兼容程度。In a possible design of the first aspect, the one or more candidate databases are determined in combination with the characteristics of the source database instance and database compatibility, and the database compatibility refers to the degree of compatibility between the candidate database and the source database .
第二方面,本申请提供一种评估数据库的装置。该装置包括的多个功能模块,用于实现第一方面或第一方面的任意可能设计提供的方法中的步骤。In a second aspect, the present application provides an apparatus for evaluating a database. The apparatus includes a plurality of functional modules for implementing the steps in the method provided by the first aspect or any possible design of the first aspect.
第三方面,本申请提供一种计算设备,该计算设备包括处理器和存储器。该存储器存储指令;该处理器执行该存储器存储的指令,使得该计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法中的步骤,或者使得该计算设备部署第二方面提供的评估数据库的装置。In a third aspect, the present application provides a computing device including a processor and a memory. The memory stores instructions; the processor executes the instructions stored in the memory, causing the computing device to perform steps in the methods provided by the first aspect or various possible designs of the first aspect, or cause the computing device to deploy the methods provided by the second aspect A means of evaluating the database.
第四方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当计算设备的处理器执行该指令时,该计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法中的步骤,或者该计算设备部署第二方面提供的评估数据库的装置。In a fourth aspect, the present application provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium. When a processor of a computing device executes the instruction, the computing device executes the first aspect or the first aspect. Various possible designs of the steps in the method provided, or the computing device deploying the means for the evaluation database provided by the second aspect.
第七方面,本申请提供一种计算机程序产品,该计算机程序产品包括指令,该指令存储在计算机可读存储介质中。计算设备的处理器可以从计算机可读存储介质读取该指令,处理器执行该指令,使得该计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法中的步骤,或者使得该计算设备部署第二方面提供的数据节点评估数据库的装置。In a seventh aspect, the present application provides a computer program product comprising instructions stored in a computer-readable storage medium. The processor of the computing device may read the instruction from the computer-readable storage medium, and the processor executes the instruction, causing the computing device to perform the steps in the method provided by the above-mentioned first aspect or various possible designs of the first aspect, or cause the The computing device deploys the data node evaluation database apparatus provided in the second aspect.
附图说明Description of drawings
图1为本申请提供的数据库迁移的一种场景示意图;1 is a schematic diagram of a scenario of database migration provided by the present application;
图2为筛选候选数据库的一种实现示意图;Fig. 2 is a kind of realization schematic diagram of screening candidate database;
图3为本申请在用户界面供用户从多个候选数据库选择目标数据库的一种示意图;3 is a schematic diagram of a user interface for the application to select a target database from a plurality of candidate databases;
图4为本申请提供的在评估数据库的方法一种流程示意图;4 is a schematic flowchart of a method for evaluating a database provided by the present application;
图5为本申请提供的评估数据库的装置的一种逻辑结构示意图;5 is a schematic diagram of a logical structure of an apparatus for evaluating a database provided by the application;
图6为本申请提供的计算设备800的一种结构示意图。FIG. 6 is a schematic structural diagram of a computing device 800 provided by the present application.
具体实施方式detailed description
下面将结合本申请中的附图,对本申请提供的技术方案进行描述。The technical solutions provided by the present application will be described below with reference to the accompanying drawings in the present application.
如图1,源数据库实例11部署源数据库111。源数据库实例11通过源数据库111提供数据库服务,例如供用户查询源数据库111中的数据。As shown in FIG. 1 , the source database instance 11 deploys the source database 111 . The source database instance 11 provides database services through the source database 111 , for example, for a user to query data in the source database 111 .
如图1还示意了一种数据库迁移场景,源数据库111为待迁移数据结构的数据库,目标数据库211为用于部署迁移的数据结构的数据库。FIG. 1 also illustrates a database migration scenario, the source database 111 is the database of the data structure to be migrated, and the target database 211 is the database used to deploy the migrated data structure.
举例说明,源数据库的数据结构分为三类:For example, the data structure of the source database is divided into three categories:
源数据库的第一类数据结构是目标数据库对源数据库原生支持的数据结构;The first type of data structure of the source database is the data structure natively supported by the target database to the source database;
源数据库的第二类数据结构,这类数据结构通过工具改造成目标数据库支持的数据结构;The second type of data structure of the source database, which is transformed into a data structure supported by the target database through tools;
源数据库的第三类数据结构,是除了第一类数据结构和第二类数据结构以外的其它数据结构。举例说明,第三类数据结构不被目标数据库支持,也不能够通过工具改造成被目标数据库支持的数据结构。The third type of data structure of the source database is other data structures other than the first type of data structure and the second type of data structure. For example, the third type of data structure is not supported by the target database, and cannot be transformed into a data structure supported by the target database through tools.
目标数据库211部署从源数据库111迁移的数据结构的一种实现举例,对于第一类数据结构,目标数据库211可以直接使用;对于源数据库的第二类数据结构,在目标数据库211获取通过语法转换工具改造第二类数据结构所得的数据结构;对于源数据库的第三类数据结构,向用户反馈(例如通过用户界面反馈)修改建议或者提供替代的数据结构。An implementation example of deploying the data structure migrated from the source database 111 to the target database 211. For the first type of data structure, the target database 211 can use it directly; for the second type of data structure of the source database, the target database 211 obtains the data structure through syntax conversion The tool transforms the data structure of the second type of data structure; for the third type of data structure of the source database, feedback to the user (eg feedback through the user interface) to modify the suggestion or provide an alternative data structure.
举例说明,数据结构可以包括如下的一种或多种组合:For example, the data structure can include one or more of the following combinations:
表(table)结构、索引(index)结构、视图(view)、物化视图(materilized view)、过程(procedure)、序列(sequence)、函数(function)以及包(package)等等。Table structure, index structure, view, materialized view, procedure, sequence, function, package, etc.
一种可能的实现场景,源数据库111和目标数据库211为不同类型的数据库。源数据库111和目标数据库211为异构的数据库。例如,源数据库111为一种关系型数据库,目标数据库211为一种非关系型数据库;例如,源数据库111为一种非关系型数据库,目标数据库211为一种关系型数据库;例如,源数据库111和目标数据库211为两种不同类型的关系型数据库;例如,源数据库111和目标数据库211为两种不同类型的非关系型数据库。举例说明,源数据库111为oracle数据库,目标数据库211为MySQL数据库或者ProsgreSQL数据库。In a possible implementation scenario, the source database 111 and the target database 211 are different types of databases. The source database 111 and the target database 211 are heterogeneous databases. For example, the source database 111 is a relational database, and the target database 211 is a non-relational database; for example, the source database 111 is a non-relational database, and the target database 211 is a relational database; for example, the source database 111 and target database 211 are two different types of relational databases; for example, source database 111 and target database 211 are two different types of non-relational databases. For example, the source database 111 is an oracle database, and the target database 211 is a MySQL database or a ProsgreSQL database.
候选数据库Candidate database
下面举例提供一种获得候选数据库的实现方式,如图2所示。The following example provides an implementation manner of obtaining the candidate database, as shown in FIG. 2 .
如果源数据库111为oracle数据库,源数据库实例11为oracle数据库实例。当用 户期望迁移oracle数据库的数据到其它异构的数据库之前,会先迁移oracle的数据结构到其它异构的数据库。通常云平台支持多个数据库,例如MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库、MongoDB数据库、Redis数据库、Memcached数据库以及HBse数据库。筛选模块会基于oracle数据库实例的特征从这多个数据库中筛选出多个候选数据库,例如oracle数据库为关系型数据库,因此筛选模块考虑数据库之间的兼容性问题,从这多个数据库中选出了多个关系型数据库(MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库)作为候选数据库。筛选模块还可以进一步考虑业务场景来确定候选数据库,如果oracle数据库实例的特征指示oracle用于高并发量的购物网站,则筛选模块会选择DB2数据库和SQL Server数据库作为候选数据库;如果oracle数据库实例的特征指示oracle用于低并发量的专利检索网站,则筛选模块会选择MySQL数据库作为候选数据库。If the source database 111 is an oracle database, the source database instance 11 is an oracle database instance. When the user expects to migrate the Oracle database data to other heterogeneous databases, the Oracle data structure will be migrated to other heterogeneous databases first. Usually cloud platforms support multiple databases, such as MySQL database, DB2 database, SQL Server database, Postgre SQL database, MongoDB database, Redis database, Memcached database and HBse database. The screening module will screen out multiple candidate databases from these multiple databases based on the characteristics of the oracle database instance. For example, the oracle database is a relational database. Therefore, the screening module considers the compatibility between databases and selects from these multiple databases. Several relational databases (MySQL database, DB2 database, SQL Server database, Postgre SQL database) were selected as candidate databases. The screening module can further consider business scenarios to determine candidate databases. If the characteristics of the oracle database instance indicate that oracle is used for shopping websites with high concurrency, the screening module will select DB2 databases and SQL Server databases as candidate databases; If the feature indicates that oracle is used for patent search websites with low concurrency, the filtering module will select MySQL database as the candidate database.
图3举例提供了本申请通过用户界面显示图2的候选数据库的一种显示方式。假设oracle数据库实例部署专利检索网站,现希望将oracle数据库实例的数据结构做数据库迁移评估。筛选模块筛选出4类关系型数据库:MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库。筛选模块对这4类数据库结合专利检索网站的业务场景做了评估排序,MySQL数据库属于推荐用户的第一优先级,Postgre SQL数据库属于推荐用户的第二优先级,DB2数据库和SQL Server数据库均属于第三优先级。将oracle数据库实例的数据结构迁移到第一优先级的MySQL,优于迁移到第二优先级的Postgre SQL数据库。类似地,将oracle数据库实例的数据结构迁移到第二优先级的Postgre SQL数据库,优于迁移到第三优先级的DB2数据库或者SQL Server数据库。即第一优先级高于第二优先级,第二优先级高于第三优先级。当然,优先级仅是筛选模块给出的优先级排序,用户可以按需求选择迁移的目标数据库,例如用户可以选择Postgre SQL数据库或者DB2数据库或者SQL Server数据库作为目标数据库,不是非得选择位于第一优先级的MySQL数据库。FIG. 3 provides an example of a display manner in which the present application displays the candidate database of FIG. 2 through a user interface. Suppose the Oracle database instance deploys a patent search website, and now it is hoped that the data structure of the Oracle database instance will be evaluated for database migration. The filtering module filters out 4 types of relational databases: MySQL database, DB2 database, SQL Server database, Postgre SQL database. The screening module evaluates and sorts the business scenarios of these four types of databases combined with patent search websites. MySQL database belongs to the first priority of recommended users, Postgre SQL database belongs to the second priority of recommended users, and both DB2 database and SQL Server database belong to third priority. Migrating the data structures of an oracle database instance to a first-priority MySQL is better than migrating to a second-priority PostgreSQL database. Similarly, migrating the data structures of an oracle database instance to a second-priority Postgre SQL database is preferable to migrating to a third-priority DB2 database or SQL Server database. That is, the first priority is higher than the second priority, and the second priority is higher than the third priority. Of course, the priority is only the priority order given by the filtering module. Users can choose the target database for migration according to their needs. For example, users can choose Postgre SQL database or DB2 database or SQL Server database as the target database. It is not necessary to choose the first priority. level MySQL database.
如图3,每个候选数据库,筛选模块会给出一个或多个规格配置。两种可能的业务场景举例,如果业务是计算消耗型的(例如持续高并发量的业务),可以选择计算型的规格配置(例如8核,32G内存,128G硬盘);如果业务是存储消耗型的(例如持续高存储量的业务),可以选择存储型的规格配置(例如4核,64G内存,256硬盘)。As shown in Figure 3, for each candidate database, the screening module will give one or more specification configurations. Examples of two possible business scenarios. If the business is computationally expensive (such as a business with continuous high concurrency), you can choose a computing-based configuration (for example, 8 cores, 32G memory, 128G hard disk); if the business is storage-consuming (such as business with continuous high storage), you can choose storage-type specifications (such as 4 cores, 64G memory, 256 hard drives).
结合图3说明下如何从多个候选数据库选择一个目标数据库及规格。用户可以通过用户界面选中MySQL数据库,然后MySQL数据库这一行进一步选择规格配置(8核,32G内存,128G硬盘)。后续,就会创建MySQL数据库实例,便于将oracle数据库实例上面的oracle数据库中的数据结构迁移到MySQL数据库实例,即在MySQL数据库实例中部署从oracle迁移的数据结构:How to select a target database and specifications from multiple candidate databases will be described with reference to FIG. 3 . Users can select the MySQL database through the user interface, and then further select the specification configuration (8 cores, 32G memory, 128G hard disk) in the MySQL database line. Subsequently, a MySQL database instance will be created, which is convenient for migrating the data structure in the oracle database above the oracle database instance to the MySQL database instance, that is, deploying the data structure migrated from oracle in the MySQL database instance:
部署从oracle数据库实例迁移的第一类数据结构,部署对oracle数据库实例迁移的第二类数据结构通过语法转换工具改造所得的数据结构,针对oracle数据库实例的第三类数据结构向用户反馈(例如通过用户界面反馈)修改建议或者提供替代的数据结构。Deploy the first type of data structure migrated from the oracle database instance, deploy the data structure transformed from the second type of data structure migrated from the oracle database instance through the syntax conversion tool, and provide feedback to the user for the third type of data structure of the oracle database instance (for example, through user interface feedback) to suggest changes or provide alternative data structures.
一种可能的实现方式,针对每个候选数据库,筛选模块还可以提供一个或多个版本号选择,图3未示意出版本号。In a possible implementation manner, for each candidate database, the screening module may also provide one or more version number selections, and the version number is not shown in FIG. 3 .
针对每个候选数据库,筛选模块都计算出在各个候选数据库部署从源数据库迁移过 来的数据结构的工作量(例如数据库管理员(Database administrator,DBA)工作量、开发工作量和测试工作量等等)。例如,如图3,在用户界面呈现了:在MySQL数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在Postgre SQL数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在DB2数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在SQL Server数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量)。在用户界面展示工作量,便于用户考虑工作量,结合工作量和/或优先级从候选数据库中确定目标数据库。For each candidate database, the screening module calculates the workload of deploying data structures migrated from the source database in each candidate database (such as database administrator (DBA) workload, development workload, and testing workload, etc. ). For example, as shown in Figure 3, the user interface presents: the workload (DBA workload, development workload, testing workload) required to deploy the data structure migrated from the oracle database instance in the MySQL database, and the deployment workload from oracle in the Postgre SQL database The workload (DBA workload, development workload, and test workload) required to migrate the data structure of the database instance, and the workload required to deploy the data structure migrated from the oracle database instance in the DB2 database (DBA workload, development workload) , test workload), the workload (DBA workload, development workload, test workload) required to deploy the data structure migrated from the oracle database instance in the SQL Server database. The workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate databases in combination with the workload and/or priority.
下面举例提供筛选模块如何筛选出候选数据库的一种可能的实现方式方式。The following example provides a possible implementation manner of how the screening module screens out the candidate database.
首先,采集跟源数据库实例11的运行参数。该源数据库实例11的运行参数包括如下的一种或多种:每秒事务数(transactions per second,TPS)、每秒查询率(queries per second,QPS)、每秒输入输出操作(input/output per second,IOPS)、内存使用率、中央处理器(central processing unit,CPU)使用率、活跃会话、数据库配置、数据库容量、表复杂度以及SQL复杂度。First, the operating parameters of the source database instance 11 are collected. The operating parameters of the source database instance 11 include one or more of the following: transactions per second (transactions per second, TPS), query rate per second (queries per second, QPS), input/output operations per second (input/output) per second, IOPS), memory usage, central processing unit (CPU) usage, active sessions, database configuration, database capacity, table complexity, and SQL complexity.
然后,基于该源数据库实例11的运行参数,分析得出该源数据库实例11的特征。源数据库实例11的特征包括两类特征。Then, based on the operating parameters of the source database instance 11, the characteristics of the source database instance 11 are obtained through analysis. The characteristics of the source database instance 11 include two types of characteristics.
源数据库实例11的第一类特征包括如下的一种或多种:存储过程、物化视图、表分区、触发器、库内调度、资源管理、健康监控、审计、闪回、备份恢复、集群高可用以及批量装载等等。源数据库实例11可以具有第一类特征中的一个或多个特征,即源数据库实例11可以使用了第一类特征中的一个或多个特征,例如源数据库实例11可以使用了触发器,再例如源数据库实例11可以使用了物化视图。The first type of features of the source database instance 11 include one or more of the following: stored procedures, materialized views, table partitions, triggers, in-database scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high Available as well as bulk loading and more. The source database instance 11 may have one or more characteristics of the first type of characteristics, that is, the source database instance 11 may use one or more characteristics of the first type of characteristics, for example, the source database instance 11 may use triggers, and then For example, the source database instance 11 may use a materialized view.
源数据库实例11的第二类特征包括如下的一种或多种:并发度、扩展度、恢复点目标(recovery point objective,RPO),恢复时间目标(recovery time objective,RTO)、跨数据中心部署、存储容量以及存储成本等等。The second type of characteristics of the source database instance 11 includes one or more of the following: concurrency, scalability, recovery point objective (RPO), recovery time objective (RTO), deployment across data centers , storage capacity, and storage costs.
一种可能的实现方式方式,基于该源数据库实例11的特征和数据库之间的兼容性,分析确定该候选数据库。例如数据库实例11为oracle数据库实例,多个数据库为MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库、MongoDB数据库、Redis数据库、Memcached数据库以及HBse数据库,则结合oracle数据库实例的特征和该oracle数据库实例与这多个数据库之间的兼容性,确定MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库为兼容性较好的候选数据库,因为MySQL数据库、DB2数据库、SQL Server数据库、Postgre SQL数据库与oracle数据库均为关系型数据库,数据库之间需要改造的第二类数据结构或者第三类数据结构相对少些。相比之下,MongoDB数据库、Redis数据库、Memcached数据库以及HBse数据库这些非关系型数据库与oracle数据库之间的兼容性就差些,所以MongoDB数据库、Redis数据库、Memcached数据库以及HBse数据库都没被筛选模块选为候选数据库。In a possible implementation manner, the candidate database is determined by analysis based on the characteristics of the source database instance 11 and the compatibility between the databases. For example, database instance 11 is an oracle database instance, and multiple databases are MySQL database, DB2 database, SQL Server database, Postgre SQL database, MongoDB database, Redis database, Memcached database and HBse database, then combine the characteristics of the oracle database instance and the oracle database The compatibility between the instance and these multiple databases determines that MySQL database, DB2 database, SQL Server database, and Postgre SQL database are candidate databases with good compatibility, because MySQL database, DB2 database, SQL Server database, Postgre SQL database and Oracle databases are relational databases, and there are relatively few second- or third-type data structures that need to be transformed between databases. In contrast, non-relational databases such as MongoDB, Redis, Memcached, and HBse are less compatible with oracle databases, so MongoDB, Redis, Memcached, and HBse are not screened modules. Selected as candidate database.
下面结合图1-图4,举例说明本申请提供的评估数据库的方法。其中,图4举例提供了该方法的流程步骤,该方法的步骤包括步骤41至步骤43。The method for evaluating the database provided by the present application is exemplified below with reference to FIG. 1 to FIG. 4 . Wherein, FIG. 4 provides an example of the flow steps of the method, and the steps of the method include steps 41 to 43 .
步骤S41,在用户界面显示一个或多个候选数据库。Step S41, displaying one or more candidate databases on the user interface.
用户界面显示的候选数据库,是结合源数据库实例11的特征确定的数据库。因此,每个候选数据库是相对适合部署从源数据库实例11的数据结构的,部署时候需要改造的第二数据结构较少,部署时候需要用户配合调整的第三数据结构较少。The candidate database displayed on the user interface is the database determined in combination with the characteristics of the source database instance 11 . Therefore, each candidate database is relatively suitable for deploying the data structure from the source database instance 11 , less second data structure needs to be transformed during deployment, and less third data structure needs to be adjusted by the user during deployment.
在一种可能的实现方式中,所述源数据库实例11的特征是基于所述源数据库实例11的运行参数确定的。该源数据库实例11的运行参数包括如下的一种或多种:每秒事务数(transactions per second,TPS)、每秒查询率(queries per second,QPS)、每秒输入输出操作(input/output per second,IOPS)、内存使用率、中央处理器(central processing unit,CPU)使用率、活跃会话、数据库配置、数据库容量、表复杂度以及SQL复杂度。一种实现场景,源数据库实例11的运行参数可以是由该该源数据库实例11提供的业务决定的,如果该源数据库实例11支撑持续高并发的购物网站查询业务,则TPS、QPS、IOPS、内存使用率、CPU使用率以及活跃会话等等相对较高,如果该源数据库实例11支撑持续低并发的旅游网站查询业务,则TPS、QPS、IOPS、内存使用率、CPU使用率以及活跃会话等等相对较低。In a possible implementation manner, the characteristics of the source database instance 11 are determined based on operating parameters of the source database instance 11 . The operating parameters of the source database instance 11 include one or more of the following: transactions per second (transactions per second, TPS), query rate per second (queries per second, QPS), input/output operations per second (input/output) per second, IOPS), memory usage, central processing unit (CPU) usage, active sessions, database configuration, database capacity, table complexity, and SQL complexity. In an implementation scenario, the operating parameters of the source database instance 11 may be determined by the services provided by the source database instance 11. If the source database instance 11 supports the continuous high-concurrency shopping website query service, the TPS, QPS, IOPS, Memory usage, CPU usage, active sessions, etc. are relatively high. If the source database instance 11 supports continuous low-concurrency travel website query services, the TPS, QPS, IOPS, memory usage, CPU usage, and active sessions, etc. etc. is relatively low.
在一种可能的实现方式中,基于所述源数据库实例11的运行参数确定的源数据库实例11的特征可以包括如下的一种或多种组合:存储过程、物化视图、表分区、触发器、库内调度、资源管理、健康监控、审计、闪回、备份恢复、集群高可用、批量装载、并发度、扩展度、恢复点目标RPO,恢复时间目标RTO、跨数据中心部署、存储容量以及存储成本等等。其中,源数据库实例11可以具有一个或多个第一类特征(存储过程、物化视图、表分区、触发器、库内调度、资源管理、健康监控、审计、闪回、备份恢复、集群高可用以及批量装载等等),第一类特征可以是源数据库实例11承载的业务的业务需要所决定的。源数据库实例11可以具有一个或多个第二类特征(并发度、扩展度、RPO、RTO、存储容量以及存储成本等等),第一类特征的值可以是源数据库实例11承载的业务所决定的。In a possible implementation manner, the characteristics of the source database instance 11 determined based on the operating parameters of the source database instance 11 may include one or more of the following combinations: stored procedures, materialized views, table partitions, triggers, In-library scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high availability, batch loading, concurrency, scalability, recovery point objective (RPO), recovery time objective (RTO), cross-data center deployment, storage capacity, and storage cost, etc. The source database instance 11 may have one or more first-class features (stored procedures, materialized views, table partitions, triggers, in-store scheduling, resource management, health monitoring, auditing, flashback, backup and recovery, cluster high availability) and batch loading, etc.), the first type of characteristics may be determined by the business needs of the business carried by the source database instance 11 . The source database instance 11 may have one or more characteristics of the second type (concurrency, scalability, RPO, RTO, storage capacity, storage cost, etc.), and the value of the first type of characteristics may be the value of the service carried by the source database instance 11. decided.
由于源数据库实例11的运行参数反应了业务对源数据库实例11的数据结构需求,源数据库实例11的运行参数确定了源数据库实例11的特征,源数据库实例11的特征基本也可以反应业务对源数据库实例11的数据结构需求。Since the operating parameters of the source database instance 11 reflect the data structure requirements of the business on the source database instance 11, the operating parameters of the source database instance 11 determine the characteristics of the source database instance 11, and the characteristics of the source database instance 11 can basically also reflect the business's demand for the source database instance 11. Data structure requirements for database instance 11.
在一种可能的实现方式中,每个候选数据库都是结合源数据库实例的特征和数据库兼容性确定的,所述数据库兼容性是指所述候选数据库与所述源数据库的兼容程度。例如,非关系型数据库中的两种数据库的兼容程度,就好于关系型数据库与非关系型数据库的兼容程度;类似地,关系型数据库中的两种数据库兼容程度,也好于关系型数据库与非关系型数据库的兼容程度。In a possible implementation manner, each candidate database is determined in combination with the characteristics of the source database instance and database compatibility, where the database compatibility refers to the degree of compatibility between the candidate database and the source database. For example, the degree of compatibility of two databases in a non-relational database is better than the degree of compatibility between a relational database and a non-relational database; similarly, the degree of compatibility between two databases in a relational database is also better than that of a relational database Compatibility with non-relational databases.
在一种可能的实现方式中,筛选模块采用筛选模型确定候选数据库。具体地,源数据库实例的特征和数据库兼容作为该筛选模型的输入,这样,该筛选模型可以从多个数据库中筛选出候选数据库。In a possible implementation manner, the screening module uses a screening model to determine the candidate database. Specifically, the characteristics of the source database instance are compatible with the database as an input to the screening model, so that the screening model can screen candidate databases from multiple databases.
一种可能的实现方式,所述源数据库与所述候选数据库为不同类型的数据库。举例说明,源数据库与候选数据库可以是关系型数据库中的两种类型的数据库,例如源数据库为oracle数据库和候选数据库可以是MySQL数据库。举例说明,源数据库与候选数据库可以是非关系型数据库中的两种类型的数据库,例如源数据库为MongoDB数据库和 候选数据库可以是Redis数据库。举例说明,源数据库可以属于关系型数据库(例如oracle数据库),而候选数据库可以属于非关系型数据库(例如Redis数据库);或者,源数据库可以属于非关系型数据库(例如Redis数据库),而候选数据库可以属于关系型数据库(例如oracle数据库)。In a possible implementation manner, the source database and the candidate database are databases of different types. For example, the source database and the candidate database may be two types of databases in relational databases, for example, the source database is an oracle database and the candidate database may be a MySQL database. For example, the source database and the candidate database may be two types of databases in non-relational databases, for example, the source database is a MongoDB database and the candidate database may be a Redis database. For example, the source database may belong to a relational database (eg, an oracle database), and the candidate database may belong to a non-relational database (eg, a Redis database); or, the source database may belong to a non-relational database (eg, a Redis database), and the candidate database Can belong to relational database (eg oracle database).
本申请对于在用户界面显示候选数据库的排列方式,不做限定。例如,图3就举例给出了一种显示多个候选数据库(MySQL数据库、DB2数据库、SQL Server数据库以及Postgre SQL数据库)的排布方式。The present application does not limit the arrangement of the candidate databases displayed on the user interface. For example, Figure 3 exemplifies an arrangement that displays multiple candidate databases (MySQL database, DB2 database, SQL Server database, and Postgre SQL database).
一种可能的用户界面设计,在所述用户界面显示所述候选数据库的优先级。如图3所示,给用户呈现了多个候选数据库的优先级顺序。其中,MySQL数据库属于推荐用户的第一优先级,Postgre SQL数据库属于推荐用户的第二优先级,DB2数据库和SQL Server数据库均属于第三优先级。第一优先级的MySQL数据库最适合承载从迁移oracle数据库实例的数据结构,第二优先级的Postgre SQL数据库较好适合承载从迁移oracle数据库实例的数据结构,第三优先级的DB2数据库或者SQL Server数据库一般适合承载从迁移oracle数据库实例的数据结构。A possible user interface design in which the priority of the candidate database is displayed. As shown in FIG. 3, a priority order of multiple candidate databases is presented to the user. Among them, MySQL database belongs to the first priority of recommended users, Postgre SQL database belongs to the second priority of recommended users, and both DB2 database and SQL Server database belong to the third priority. The MySQL database with the first priority is most suitable for hosting the data structure of the Oracle database instance to be migrated from, the Postgre SQL database with the second priority is better suitable for hosting the data structure of the Oracle database instance from the migration, and the DB2 database or SQL Server with the third priority The database is generally suitable for hosting the data structures from the migrated oracle database instance.
一种可能的用户界面设计,在所述用户界面显示所述候选数据库的一个或多个规格配置。如图3所示,给用户呈现了每个候选数据库的两个规格配置:一个规格配置是(8核,32G内存,128G硬盘),另一个规格配置(4核,64G内存,256硬盘)。规格配置的选择考虑举例,如果业务是计算消耗型的(例如持续高并发量的业务),则可以选择计算型的规格配置(例如8核,32G内存,128G硬盘),如果业务是存储消耗型的(例如持续高存储量的业务),则可以选择存储型的规格配置(例如4核,64G内存,256硬盘)。这样,用户可以结合业务选择规格配置,另外,用户还可以考虑成本来选择规格配置。A possible user interface design where one or more specification configurations of the candidate database are displayed. As shown in Figure 3, the user is presented with two specifications for each candidate database: one specification configuration is (8 cores, 32G memory, 128G hard disk), and the other specification configuration (4 cores, 64G memory, 256 hard disks). For example, if the business is computing-consuming (such as a business with continuous high concurrency), you can choose a computing-based specification (such as 8 cores, 32G memory, 128G hard disk). If the business is storage-consuming (such as continuous high-storage business), you can choose storage-type specifications (such as 4 cores, 64G memory, 256 hard drives). In this way, the user can select the specification configuration in combination with the business, and in addition, the user can also select the specification configuration considering the cost.
一种可能的用户界面设计,用户可以从用户界面的一个或多个候选数据库中先确定目标数据库,然后再确定该目标数据库的一个或多个规格配置中确定一个规格配置,相应地,系统便会获取用户确定的规格配置。如图3举例,用户选择了MySQL数据库作为目标数据库,并进一步选择了MySQL数据库的规格配置(8核,32G内存,128G硬盘)。后续,便将源数据库111(例如oracle数据库)的数据结构迁移到用户指定规格配置的目标数据库(例如MySQL数据库)。A possible user interface design, the user can first determine the target database from one or more candidate databases of the user interface, and then determine a specification configuration from one or more specification configurations of the target database, and accordingly, the system will The specification and configuration determined by the user will be obtained. As an example in Figure 3, the user selects the MySQL database as the target database, and further selects the specification and configuration of the MySQL database (8 cores, 32G memory, 128G hard disk). Subsequently, the data structure of the source database 111 (eg, the oracle database) is migrated to the target database (eg, the MySQL database) configured by the user-specified specification.
一种可能的实现方式,候选数据库的规格配置包括如下的一种或多种组合:处理器、内存、硬盘以及输入输出(input/output,IO)配置。例如图3,一个规格配置可以是8核的处理器、32G的内存以及128G的硬盘,另一个规格配置可以是4核的处理器、64G的内存以及256G的硬盘。In a possible implementation manner, the specification configuration of the candidate database includes one or more combinations of the following: processor, memory, hard disk, and input/output (IO) configuration. For example, as shown in Figure 3, one specification configuration can be an 8-core processor, 32G memory and a 128G hard disk, and another specification configuration can be a 4-core processor, 64G memory and 256G hard disk.
步骤S42,在所述用户界面显示在一个或多个所述候选数据库中各自部署从所述源数据库实例迁移的数据结构所需的工作量。Step S42, displaying on the user interface the workload required to deploy the data structures migrated from the source database instance in the one or more candidate databases respectively.
该工作量包括如下的一种或多种组合:DBA工作量、开发工作量以及测试工作量。The workload includes one or more combinations of the following: DBA workload, development workload, and testing workload.
DBA工作量,是指数据库管理员在候选数据库部署从源数据库实例迁移的数据结构所需的工作量。DBA workload refers to the workload required by the database administrator to deploy the data structure migrated from the source database instance in the candidate database.
开发工作量,是指开发人员开发出在候选数据库部署从源数据库实例迁移的数据结构所需代码的工作量。Development workload refers to the workload of developers to develop the code required to deploy the data structures migrated from the source database instance in the candidate database.
测试工作量,是指测试人员测试在候选数据库部署从源数据库实例迁移的数据结构所需代码的工作量。Test workload refers to the workload of the tester to test the code required to deploy the data structure migrated from the source database instance in the candidate database.
一种可能的实施方式,在所述候选数据库部署所述数据结构所需的工作量,用于供用户在所述用户界面从所述一个或多个候选数据库中确定目标数据库。In a possible implementation manner, the workload required for deploying the data structure in the candidate database is used for the user to determine the target database from the one or more candidate databases in the user interface.
例如,如图3,在用户界面呈现了:在MySQL数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在Postgre SQL数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在DB2数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量),在SQL Server数据库部署从oracle数据库实例迁移的数据结构所需的工作量(DBA工作量、开发工作量、测试工作量)。在用户界面展示工作量,便于用户考虑工作量,结合工作量和/或优先级从候选数据库中确定目标数据库。For example, as shown in Figure 3, the user interface presents: the workload (DBA workload, development workload, testing workload) required to deploy the data structure migrated from the oracle database instance in the MySQL database, and the deployment workload from oracle in the Postgre SQL database The workload (DBA workload, development workload, and test workload) required to migrate the data structure of the database instance, and the workload required to deploy the data structure migrated from the oracle database instance in the DB2 database (DBA workload, development workload) , test workload), the workload (DBA workload, development workload, test workload) required to deploy the data structure migrated from the oracle database instance in the SQL Server database. The workload is displayed on the user interface, so that the user can consider the workload and determine the target database from the candidate databases in combination with the workload and/or priority.
一种可能的实施方式,在所述候选数据库部署所述数据结构所需的工作量是基于参数确定的,所述参数包括如下的一种或多种组合:语法转换率、兼容程度以及代码量。In a possible implementation manner, the workload required to deploy the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following combinations: syntax conversion rate, compatibility degree, and code amount .
作为参数的语法转换率,是指将源数据库实例的数据结构语法转换为候选数据库的转化率。The syntax conversion rate as a parameter refers to the conversion rate of converting the data structure syntax of the source database instance into the candidate database.
作为参数的兼容程度,是指将源数据库与候选数据库的兼容程度。The degree of compatibility as a parameter refers to the degree of compatibility between the source database and the candidate database.
作为参数的代码量,是指实现将源数据库实例的数据结构在候选数据库部署所需的代码的代码量。The amount of code used as a parameter refers to the amount of code required to implement the deployment of the data structure of the source database instance in the candidate database.
另外,用于评估在所述候选数据库部署所述数据结构所需的工作量的参数还可以包括除了语法转换率、兼容程度以及代码量以外的其它参数,例如该其它参数可以包括DBA知识库,例如该其它参数可以包括历史评估工作量使用的评估基线。In addition, the parameter used to evaluate the workload required to deploy the data structure in the candidate database may also include other parameters other than the syntax conversion rate, the degree of compatibility, and the amount of code, for example, the other parameter may include the DBA knowledge base, Such other parameters may include, for example, an evaluation baseline used by historical evaluation workloads.
一种实现举例,筛选模块可以采用工作量评估模型,将该参数(例如语法转换率、兼容程度以及代码量)作为该工作量评估模型的输入,评估模型便可以输出工作量(例如DBA工作量、开发工作量和测试工作量)。An example of implementation, the screening module can use a workload evaluation model, and use the parameters (such as syntax conversion rate, compatibility level, and code amount) as the input of the workload evaluation model, and the evaluation model can output workload (such as DBA workload). , development effort, and testing effort).
步骤S43,获取用户从所述一个或多个候选数据库中确定的目标数据库,所述目标数据库用于部署从所述源数据库实例迁移的数据结构。Step S43: Obtain a target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
用户在用户界面确定目标数据库后,系统便获取用户确定的目标数据库。后续,可以部署该目标数据库的实例,通过该实例实现在该目标数据库中部署从源数据库实例迁移的数据结构。After the user determines the target database on the user interface, the system obtains the target database determined by the user. Subsequently, an instance of the target database can be deployed, and the data structure migrated from the source database instance can be deployed in the target database through the instance.
以图3为例,用户在用户界面选中了MySQL数据库作为目标数据库,并确定MySQL数据库的规格配置为8核的处理器、32G的内存以及128G的硬盘。后续在需要迁移oracle数据库实例的数据结构时,系统部署具有规格配置(8核的处理器、32G的内存以及128G的硬盘)的MySQL数据库实例。这样,MySQL数据库实例可以在MySQL数据库中部署从oracle数据库实例迁移过来的数据结构。Taking Figure 3 as an example, the user selects the MySQL database as the target database on the user interface, and determines that the specifications of the MySQL database are configured as an 8-core processor, 32G of memory, and 128G of hard disk. Subsequently, when the data structure of the oracle database instance needs to be migrated, the system deploys the MySQL database instance with the specified configuration (8-core processor, 32G memory, and 128G hard disk). In this way, the MySQL database instance can deploy the data structures migrated from the oracle database instance in the MySQL database.
以图3为例说明部署的一种可能实现方式,对于从oracle数据库实例迁移的第一类数据结构,MySQL数据库实例可以原生使用,即MySQL数据库实例可以在MySQL数据库中部署该第一类数据结构;对于从oracle数据库实例迁移的第二类数据结构,MySQL 数据库实例通过语法转换工具改造第二类数据结构所得的数据结构,在MySQL数据库部署改造所得的数据结构;对于从oracle数据库实例迁移的第三类数据结构,向用户反馈(例如通过用户界面反馈)修改建议或者提供替代的数据结构。Take Figure 3 as an example to illustrate a possible implementation of deployment. For the first type of data structure migrated from the Oracle database instance, the MySQL database instance can be used natively, that is, the MySQL database instance can deploy the first type of data structure in the MySQL database. ; For the second type of data structure migrated from the oracle database instance, the MySQL database instance transforms the data structure of the second type of data structure through the syntax conversion tool, and deploys the transformed data structure in the MySQL database; for the second type of data structure migrated from the oracle database instance. Three types of data structures that provide feedback to the user (eg, through user interface feedback) to suggest modifications or to provide alternative data structures.
本申请还提供一种该评估数据库的装置,该装置可以部署在本申请的计算设备(例如服务器)上。该装置包括用于实现上述评估数据库的方法的功能单元;本申请对在该装置中如何划分功能单元不做限定。The present application also provides an apparatus for evaluating the database, and the apparatus can be deployed on the computing device (such as a server) of the present application. The apparatus includes functional units for implementing the above method for evaluating a database; this application does not limit how the functional units are divided in the apparatus.
下面实例性地提供评估数据库的装置的一种功能单元的划分,如图5所示。The division of a functional unit of the apparatus for evaluating the database is exemplarily provided below, as shown in FIG. 5 .
如图5所示,所述装置50包括:As shown in Figure 5, the device 50 includes:
候选数据库显示模块51,用于在用户界面显示一个或多个候选数据库,所述候选数据库是结合源数据库实例的特征确定的数据库;The candidate database display module 51 is used to display one or more candidate databases on the user interface, and the candidate databases are databases determined in combination with the characteristics of the source database instance;
工作量显示模块52,用于在所述用户界面显示在一个或多个所述候选数据库中各自部署从所述源数据库实例迁移的数据结构所需的工作量。The workload display module 52 is configured to display, on the user interface, the workload required to deploy the data structures migrated from the source database instance in the one or more candidate databases respectively.
装置50的一种可能设计,所述装置50包括:One possible design of apparatus 50 comprising:
获取模块53,用于获取用户从所述一个或多个候选数据库中确定的目标数据库,所述目标数据库用于部署从所述源数据库实例迁移的数据结构。The obtaining module 53 is configured to obtain the target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
装置50的一种可能设计,在所述候选数据库部署所述数据结构所需的工作量,用于供用户在所述用户界面从所述一个或多个候选数据库中确定目标数据库。In one possible design of the apparatus 50, the effort required to deploy the data structure in the candidate database is for the user to determine the target database from the one or more candidate databases in the user interface.
装置50的一种可能设计,在所述候选数据库部署所述数据结构所需的工作量是基于参数确定的,所述参数包括如下的一种或多种组合:语法转换率、兼容程度以及代码量。In one possible design of the apparatus 50, the effort required to deploy the data structure in the candidate database is determined based on parameters including one or more combinations of the following: syntax conversion rate, degree of compatibility, and code quantity.
装置50的一种可能设计,所述候选数据库显示模块51,用于在所述用户界面显示所述候选数据库的优先级。In a possible design of the apparatus 50, the candidate database display module 51 is configured to display the priority of the candidate database on the user interface.
装置50的一种可能设计,所述候选数据库显示模块52,用于在所述用户界面显示所述候选数据库的一个或多个规格配置。In a possible design of the apparatus 50, the candidate database display module 52 is configured to display one or more specification configurations of the candidate database on the user interface.
装置50的一种可能设计,获取模块53,用于获取用户从所述目标数据库的一个或多个规格配置中确定的规格配置。In a possible design of the apparatus 50, the obtaining module 53 is configured to obtain the specification configuration determined by the user from one or more specification configurations of the target database.
装置50的一种可能设计,所述规格配置包括如下的一种或多种组合:One possible design of device 50, the specification configuration includes one or more of the following combinations:
处理器、内存、硬盘以及输入输出IO配置。Processor, memory, hard disk and input and output IO configuration.
装置50的一种可能设计,所述源数据库与所述候选数据库为不同类型的数据库。In one possible design of apparatus 50, the source database and the candidate database are different types of databases.
一种可能的设计,图6示意性地提供本申请的计算设备的一种可能的基本硬件架构。As a possible design, FIG. 6 schematically provides a possible basic hardware architecture of the computing device of the present application.
参见图6,计算设备800包括处理器801、存储器802、通信接口803和总线804。Referring to FIG. 6 , computing device 800 includes processor 801 , memory 802 , communication interface 803 , and bus 804 .
计算设备800中,处理器801的数量可以是一个或多个,图6仅示意了其中一个处理器801。可选地,处理器801,可以是中央处理器(central processing unit,CPU)。如果计算设备800具有多个处理器801,多个处理器801的类型可以不同,或者可以相同。可选地,计算设备800的多个处理器801还可以集成为多核处理器。In the computing device 800, the number of processors 801 may be one or more, and FIG. 6 only illustrates one of the processors 801. Optionally, the processor 801 may be a central processing unit (central processing unit, CPU). If the computing device 800 has multiple processors 801, the multiple processors 801 may be of different types, or may be the same. Optionally, the multiple processors 801 of the computing device 800 may also be integrated into a multi-core processor.
存储器802存储指令和数据;存储器802可以存储实现本申请提供的评估数据库的方法所需的指令和数据,存储器802还可以存储用于实现在评估数据库的方法中由评估 数据库的装置执行步骤的指令。存储器802可以是以下存储介质的任一种或任一种组合:非易失性存储器(例如只读存储器(ROM)、固态硬盘(SSD)、硬盘(HDD)、光盘),易失性存储器。The memory 802 stores instructions and data; the memory 802 can store the instructions and data required to implement the method for evaluating the database provided by the present application, and the memory 802 can also store the instructions for implementing the steps performed by the apparatus for evaluating the database in the method for evaluating the database . The memory 802 may be any one or any combination of the following storage media: non-volatile memory (eg, read only memory (ROM), solid state disk (SSD), hard disk (HDD), optical disk), volatile memory.
通信接口803可以是以下器件的任一种或任一种组合:网络接口(例如以太网接口)、无线网卡等具有网络接入功能的器件。The communication interface 803 may be any one or any combination of the following devices: a network interface (eg, an Ethernet interface), a wireless network card, and other devices with a network access function.
通信接口803用于计算设备800与其它计算设备或者终端进行数据通信。The communication interface 803 is used for data communication between the computing device 800 and other computing devices or terminals.
图6用一条粗线表示总线804。总线804可以将处理器801与存储器802和通信接口803连接。这样,通过总线804,处理器801可以访问存储器802,还可以利用通信接口803与其它计算设备或者终端进行数据交互。Figure 6 represents the bus 804 with a thick line. A bus 804 may connect the processor 801 with the memory 802 and the communication interface 803 . In this way, through the bus 804, the processor 801 can access the memory 802, and can also use the communication interface 803 to perform data interaction with other computing devices or terminals.
在本申请中,计算设备800执行存储器802中的指令,使得计算设备800实现本申请提供的评估数据库的方法。或者,计算设备800执行存储器802中的指令,使得该计算设备800实现本申请的评估数据库的装置50。In the present application, the computing device 800 executes the instructions in the memory 802, so that the computing device 800 implements the method for evaluating the database provided by the present application. Alternatively, the computing device 800 executes the instructions in the memory 802, so that the computing device 800 implements the apparatus 50 of the evaluation database of the present application.
本申请提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当计算设备800的处理器801执行该指令时,该计算设备800执行上述评估数据库的方法中由协调节点执行的步骤,或者该计算设备800实现本申请的评估数据库的装置的功能。The present application provides a computer-readable storage medium, where an instruction is stored in the computer-readable storage medium. When the processor 801 of the computing device 800 executes the instruction, the method for the computing device 800 to execute the foregoing evaluation database is executed by the coordinating node or the computing device 800 implements the functions of the apparatus for evaluating the database of the present application.
本申请提供一种计算机程序产品,该计算机程序产品包括指令,该指令存储在计算机可读存储介质中。计算设备800的处理器801可以从计算机可读存储介质读取该指令,处理器801执行该指令,使得计算设备800执行上述评估数据库的方法中由协调节点执行的步骤,或者使得计算设备800实现本申请的评估数据库的装置的功能。The present application provides a computer program product comprising instructions stored in a computer-readable storage medium. The processor 801 of the computing device 800 can read the instruction from the computer-readable storage medium, and the processor 801 executes the instruction, causing the computing device 800 to perform the steps performed by the coordinating node in the above-mentioned method for evaluating a database, or causing the computing device 800 to implement The function of the means of evaluating the database of this application.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改;而这些修改,并不使相应技术方案脱离权利要求的保护范围。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded are modified; and these modifications do not make the corresponding technical solutions deviate from the protection scope of the claims.

Claims (20)

  1. 一种评估数据库的方法,其特征在于,所述方法包括:A method for evaluating a database, the method comprising:
    在用户界面显示一个或多个候选数据库,所述候选数据库是结合源数据库实例的特征确定的数据库;Displaying one or more candidate databases in the user interface, the candidate databases are databases determined in combination with the characteristics of the source database instance;
    在所述用户界面显示在一个或多个所述候选数据库中各自部署从所述源数据库实例迁移的数据结构所需的工作量。The effort required to deploy the data structures migrated from the source database instance in each of the one or more candidate databases is displayed in the user interface.
  2. 根据权利要求1所述的方法,其特征在于,所述方法包括:The method of claim 1, wherein the method comprises:
    获取用户从所述一个或多个候选数据库中确定的目标数据库,所述目标数据库用于部署从所述源数据库实例迁移的数据结构。A target database determined by the user from the one or more candidate databases is obtained, the target database being used to deploy the data structure migrated from the source database instance.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述候选数据库部署所述数据结构所需的工作量,用于供用户在所述用户界面从所述一个或多个候选数据库中确定目标数据库。The method according to claim 1 or 2, wherein the workload required for deploying the data structure in the candidate database is for a user to select from the one or more candidate databases in the user interface Determine the target database.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,在所述候选数据库部署所述数据结构所需的工作量是基于参数确定的,所述参数包括如下的一种或多种组合:语法转换率、兼容程度以及代码量。The method according to any one of claims 1 to 3, wherein the workload required for deploying the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following Combination: Syntax conversion rate, degree of compatibility, and amount of code.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 4, wherein the method comprises:
    在所述用户界面显示所述候选数据库的优先级。The priority of the candidate database is displayed in the user interface.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 5, wherein the method comprises:
    在所述用户界面显示所述候选数据库的一个或多个规格配置。One or more specification configurations of the candidate database are displayed in the user interface.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 6, wherein the method comprises:
    获取用户从所述目标数据库的一个或多个规格配置中确定的规格配置。A specification configuration determined by a user from one or more specification configurations of the target database is obtained.
  8. 根据权利要求6或7任一项所述的方法,其特征在于,所述规格配置包括如下的一种或多种组合:The method according to any one of claims 6 or 7, wherein the specification configuration includes one or more of the following combinations:
    处理器、内存、硬盘以及输入输出IO配置。Processor, memory, hard disk and input and output IO configuration.
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述源数据库与所述候选数据库为不同类型的数据库。The method according to any one of claims 1 to 8, wherein the source database and the candidate database are databases of different types.
  10. 一种评估数据库的装置,其特征在于,所述装置包括:A device for evaluating a database, characterized in that the device comprises:
    候选数据库显示模块,用于在用户界面显示一个或多个候选数据库,所述候选数据库是结合源数据库实例的特征确定的数据库;A candidate database display module, configured to display one or more candidate databases on the user interface, the candidate databases are databases determined in combination with the characteristics of the source database instance;
    工作量显示模块,用于在所述用户界面显示在一个或多个所述候选数据库中各自部署从所述源数据库实例迁移的数据结构所需的工作量。A workload display module, configured to display, on the user interface, the workload required to deploy the data structures migrated from the source database instance in each of the one or more candidate databases.
  11. 根据权利要求10所述的装置,其特征在于,所述装置包括:The apparatus of claim 10, wherein the apparatus comprises:
    获取模块,用于获取用户从所述一个或多个候选数据库中确定的目标数据库,所述目标数据库用于部署从所述源数据库实例迁移的数据结构。The obtaining module is configured to obtain the target database determined by the user from the one or more candidate databases, where the target database is used to deploy the data structure migrated from the source database instance.
  12. 根据权利要求10或11所述的装置,其特征在于,在所述候选数据库部署所述数据结构所需的工作量,用于供用户在所述用户界面从所述一个或多个候选数据库中确定目标数据库。The apparatus according to claim 10 or 11, wherein the workload required for deploying the data structure in the candidate database is for a user to select from the one or more candidate databases in the user interface Determine the target database.
  13. 根据权利要求10至至12任一项所述的装置,其特征在于,在所述候选数据库部署所述数据结构所需的工作量是基于参数确定的,所述参数包括如下的一种或多种组合:语法转换率、兼容程度以及代码量。The apparatus according to any one of claims 10 to 12, wherein the workload required for deploying the data structure in the candidate database is determined based on parameters, and the parameters include one or more of the following: A combination of: syntax conversion rate, degree of compatibility, and amount of code.
  14. 根据权利要求10至13任一项所述的装置,其特征在于,所述候选数据库显示模块,用于在所述用户界面显示所述候选数据库的优先级。The apparatus according to any one of claims 10 to 13, wherein the candidate database display module is configured to display the priority of the candidate database on the user interface.
  15. 根据权利要求10至14任一项所述的装置,其特征在于,所述候选数据库显示模块,用于在所述用户界面显示所述候选数据库的一个或多个规格配置。The apparatus according to any one of claims 10 to 14, wherein the candidate database display module is configured to display one or more specification configurations of the candidate database on the user interface.
  16. 根据权利要求10至15任一项所述的装置,其特征在于,获取模块,用于获取用户从所述目标数据库的一个或多个规格配置中确定的规格配置。The apparatus according to any one of claims 10 to 15, wherein the acquiring module is configured to acquire the specification configuration determined by the user from one or more specification configurations in the target database.
  17. 根据权利要求10至16任一项所述的装置,其特征在于,所述规格配置包括如下的一种或多种组合:The device according to any one of claims 10 to 16, wherein the specification configuration includes one or more of the following combinations:
    处理器、内存、硬盘以及输入输出IO配置。Processor, memory, hard disk and input and output IO configuration.
  18. 根据权利要求10至17任一项所述的装置,其特征在于,所述源数据库与所述候选数据库为不同类型的数据库。The apparatus according to any one of claims 10 to 17, wherein the source database and the candidate database are databases of different types.
  19. 一种计算设备,其特征在于,所述计算设备包括处理器和存储器;所述处理器执行所述存储器中的指令,使得所述计算设备执行权利要求1至9任一项所述方法中的步骤。A computing device, characterized in that the computing device includes a processor and a memory; the processor executes the instructions in the memory, so that the computing device executes the method in any one of claims 1 to 9. step.
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括指令,所述指令指示计算设备执行权利要求1至9任一项所述方法中的步骤。A computer program product, characterized in that the computer program product includes instructions, the instructions instructing a computing device to perform the steps in the method of any one of claims 1 to 9.
PCT/CN2021/106618 2020-09-22 2021-07-15 Method for assessing database, apparatus, computing device, and computer program product WO2022062593A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011001238.8 2020-09-22
CN202011001238.8A CN114253935A (en) 2020-09-22 2020-09-22 Method and apparatus for evaluating a database, computing device and computer program product

Publications (1)

Publication Number Publication Date
WO2022062593A1 true WO2022062593A1 (en) 2022-03-31

Family

ID=80789539

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/106618 WO2022062593A1 (en) 2020-09-22 2021-07-15 Method for assessing database, apparatus, computing device, and computer program product

Country Status (2)

Country Link
CN (1) CN114253935A (en)
WO (1) WO2022062593A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150363396A1 (en) * 2014-06-14 2015-12-17 Accenture Global Services Limited Assessing database migrations to cloud computing systems
CN108959470A (en) * 2018-06-20 2018-12-07 郑州云海信息技术有限公司 A kind of database data cross-platform migration method and device
US10185727B1 (en) * 2015-12-30 2019-01-22 Amazon Technologies, Inc. Migrating data between databases

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150363396A1 (en) * 2014-06-14 2015-12-17 Accenture Global Services Limited Assessing database migrations to cloud computing systems
US10185727B1 (en) * 2015-12-30 2019-01-22 Amazon Technologies, Inc. Migrating data between databases
CN108959470A (en) * 2018-06-20 2018-12-07 郑州云海信息技术有限公司 A kind of database data cross-platform migration method and device

Also Published As

Publication number Publication date
CN114253935A (en) 2022-03-29

Similar Documents

Publication Publication Date Title
US10515000B2 (en) Systems and methods for performance testing cloud applications from multiple different geographic locations
JP2021057072A (en) Processing data from multiple sources
KR101678131B1 (en) Generating dependency maps from dependency data
US8793378B2 (en) Identifying services and associated capabilities in a networked computing environment
US20190362004A1 (en) Data platform fabric
US20160212202A1 (en) Optimization of Computer System Logical Partition Migrations in a Multiple Computer System Environment
US9449033B2 (en) Intent based automation of data management operations by a data management engine
JP2010524060A (en) Data merging in distributed computing
Poggi et al. ALOJA: A systematic study of hadoop deployment variables to enable automated characterization of cost-effectiveness
US10977082B2 (en) Resource allocation optimization support system and resource allocation optimization support method
US11615076B2 (en) Monolith database to distributed database transformation
JP6269140B2 (en) Access control program, access control method, and access control apparatus
US7447863B2 (en) Storage resource management system, method, and computer for dividing volumes based on priority, necessary capacity and volume characteristics
US20240152444A1 (en) Online query execution using a big data framework
US11379478B2 (en) Optimizing a join operation
WO2022062593A1 (en) Method for assessing database, apparatus, computing device, and computer program product
US20160036632A1 (en) Computer system
Hinkka et al. Assessing big data SQL frameworks for analyzing event logs
WO2022062594A1 (en) Method and apparatus for migrating database, computing device and computer program product
US11893020B2 (en) Enhancing database query processing
KR101378348B1 (en) Basic prototype of hadoop cluster based on private cloud infrastructure
Dell
Dell
JP2022546941A (en) Reducing TEMP size across base tables
Luo et al. WebGlusterFS: A web-based administration tool for GlusterFS with resource assignment for various storage demands

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: 21870971

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: 21870971

Country of ref document: EP

Kind code of ref document: A1