Database design method, device and related equipment

The database design system compares the differences between the design state database and the running state database, generates comparison results and provides them to users, solves the inconsistency problem between the running state database and the design state database, and improves user experience and work efficiency.

CN113806326BActive Publication Date: 2025-09-12HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010544987.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-15
Publication Date
2025-09-12
Estimated Expiration
2040-06-15

AI Technical Summary

Technical Problem

During the database design and operation process, the inconsistency between the operational database and the designed database may cause users to lose control and may lead to database accidents. Existing technologies cannot effectively monitor and adjust them in a timely manner.

Method used

A database design system is provided. By obtaining the comparison tasks set by the user, the system compares the differences between the design database and the currently running database, generates comparison results and provides them to the user. It supports cloud service and local service modes, displays the difference information in the form of charts, and supports multiple result presentation methods.

Benefits of technology

It enables timely discovery of differences between the design state and the running state database, prevents users from losing control of the database, improves the flexibility of database design and user experience, and reduces errors in project development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806326B_ABST
    Figure CN113806326B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a database design method, which is applied to a database design system. The method includes: the database design system obtains a comparison task set by a user; based on the comparison task, compares the differences between the design database in the database design system and the currently running database on the server to obtain a comparison result; and provides the comparison result to the user. By comparing the design database with the currently running database on the server and providing the comparison result to the user, the user can be promptly informed of the differences between the design database and the currently running database, avoiding the situation where the user loses control of the database after the currently running database is modified without being promptly informed. This can also avoid errors caused by the user not being promptly informed of database changes during project development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a database design method, apparatus, and related equipment. Background Art

[0002] During database design, development, and operation, users need to accurately determine whether the database design is being implemented. Specifically, they need to ensure that the database runs as designed. This requires accurate information about whether the running database on the server is consistent with the user's design on the database design system. However, users often modify the database design, and the running database can also be altered by other users' modifications, often leading to inconsistencies between the running database and the designed database. Inconsistencies between the running database and the user-designed database can lead to a loss of control, potentially compromising the running database and causing database failures. Therefore, maintaining a consistent and consistent database design is a pressing issue. Summary of the Invention

[0003] The embodiments of the present application disclose a database design method, apparatus and related equipment, which can compare the currently running database in the server with the designed database, generate comparison results and provide the comparison results to the user.

[0004] In a first aspect, an embodiment of the present application provides a database design method, which is applied to a database design system and includes:

[0005] The database design system obtains a comparison task set by the user, compares the difference between the design state database in the database design system and the currently running database according to the comparison task, obtains a comparison result, and provides the comparison result to the user.

[0006] By comparing the design database with the currently running database in the server and providing the comparison results to the user, the user can promptly know the differences between the design database and the currently running database, avoiding the situation where the user does not know in time after the currently running database is modified and loses control of the database. This can avoid mistakes caused by the user not being able to know the database changes in time during project development.

[0007] In a specific implementation, the above-mentioned database design system runs in a cloud data center. Before the above-mentioned database design system obtains the comparison task set by the user, the method also includes: the database design system provides a database design interface to the user, wherein the user is a user who purchases the database design cloud service; and generates a design state database according to the design view created or modified by the user in the database design interface.

[0008] Providing database design cloud services to users through cloud services increases the flexibility of database design and can enhance user experience.

[0009] In a specific implementation, comparing the structure corresponding to the design state database with the structure corresponding to the currently running database to obtain a comparison result includes:

[0010] The database design system obtains content information of the currently running database from the server where the currently running database is deployed. The content information includes any one or more of the following: information of one or more tables, field information, triggers, foreign keys and index information in the currently running database; compares the content information of the currently running database with the content information of the design database to obtain the comparison result.

[0011] In a specific implementation, after obtaining the content information of the currently running database from the server where the currently running database is deployed, the above method also includes: generating an implementation view corresponding to the currently running database based on the content information of the currently running database; and then providing the user with the implementation view, the design view corresponding to the design state database, and the difference information between the design view and the implementation view.

[0012] Based on the content information of the currently running database, through database reverse engineering technology, the implementation view corresponding to the currently running database can be generated. The content information of the currently running database and the content information of the design state database, as well as the difference information, can be presented to the user more intuitively in the form of charts, thereby improving the user experience.

[0013] In a specific implementation, the above-mentioned obtaining of the comparison task set by the user includes: providing a comparison task table to the user; generating a comparison task based on the comparison information selected or input by the user in the comparison task table, wherein the comparison information includes: the name of the currently running database and the version of the design state database.

[0014] In a specific implementation, the comparison information further includes one or more of the following information: whether the comparison task is executed regularly, time information for executing the comparison task regularly; user information; a specific description of the comparison task; and a method for providing the comparison results.

[0015] In a specific implementation, providing the comparison results to the user includes any one or more of the following methods: presenting the comparison results to the user through an interface; notifying the user of the comparison results via email or instant messaging; or providing the user with a link to view the comparison results. Providing the comparison results to the user in multiple ways allows the user to understand the comparison results in a timely manner and reduce errors in work.

[0016] In a second aspect, an embodiment of the present application provides a database design device, which is applied to a database design system, and includes:

[0017] An acquisition module, configured to acquire a comparison task set by a user, wherein the comparison task is used to instruct to check the difference between the design state database and the currently running database in the database design system;

[0018] Processing module: used for: comparing the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database according to the comparison task, and obtaining a comparison result;

[0019] The comparison result is provided to the user.

[0020] In a specific implementation, the database design system runs in a cloud data center, and the processing module is further configured to:

[0021] Providing a database design interface to the user, wherein the user is a user who purchases a database design cloud service;

[0022] The design state database is generated according to the design view created or modified by the user in the database design interface.

[0023] In a specific implementation, the acquisition module is further configured to: acquire content information of the currently running database from a server where the currently running database is deployed, wherein the content information includes any one or more of the following: information of one or more tables, fields, triggers, foreign keys, and indexes in the currently running database;

[0024] The processing module is specifically configured to compare the content information of the currently running database with the content information of the design state database to obtain the comparison result.

[0025] In a specific implementation, the processing module is further configured to:

[0026] Generate an implementation view corresponding to the currently running database according to the content information of the currently running database;

[0027] The user is provided with the implementation view, the design view corresponding to the design state database, and difference information between the design view and the implementation view.

[0028] In a specific implementation, the acquisition module is specifically configured to: provide the user with a comparison task list;

[0029] The comparison task is generated according to the comparison information selected or input by the user in the comparison task table, wherein the comparison information includes: the name of the currently running database and the version of the design-state database.

[0030] In a specific implementation, the comparison information also includes one or more of the following information: whether to execute the comparison task regularly, time information for executing the comparison task regularly; information about the user; a specific description of the comparison task; and a method for providing the comparison results.

[0031] In a specific implementation, providing the comparison results to the user includes any one or more of the following methods: presenting the comparison results to the user through an interface; notifying the user of the comparison results through email or instant messaging; providing the user with a link to view the comparison results.

[0032] In a third aspect, an embodiment of the present application provides a computing device comprising a processor and a memory; a computer program is stored in the memory; when the processor executes the computer program, the computing device executes the method in the aforementioned first aspect or any specific implementation of the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a network device, the method in the aforementioned first aspect or any specific implementation of the first aspect is executed.

[0034] In a fifth aspect, the present application provides a computer program product, comprising computer instructions. When executed by a computing device, the computing device performs the method of the aforementioned first aspect or any specific implementation of the first aspect. The computer program product may be a software installation package. When the method of the aforementioned first aspect or any specific implementation of the first aspect is required, the computer program product may be downloaded and executed on the computing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0036] Figure 1a This is a deployment diagram of a local design system provided in an embodiment of the present application;

[0037] Figure 1bThis is a deployment diagram of a cloud-based design system provided in an embodiment of the present application;

[0038] Figure 2 This is a flowchart of a database design method provided in an embodiment of the present application;

[0039] Figure 3a This is a schematic diagram of a task management interface provided by an embodiment of the present application;

[0040] Figure 3b This is a schematic diagram of a comparison task table interface provided in an embodiment of the present application;

[0041] Figure 3c This is a schematic diagram of another task management interface provided in an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of a difference comparison interface provided in an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of a notification information provided by an embodiment of the present application;

[0044] Figure 6 is a schematic diagram of a comparison result provided by an embodiment of the present application;

[0045] Figure 7 is a schematic diagram of a database design device provided by an embodiment of the present application;

[0046] Figure 8 It is a structural diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0048] A database (DB) is a warehouse that organizes, stores and manages data according to data structures. It is a large collection of organized and shareable data stored in a computer.

[0049] A table is a structured file used to store specific types of data, such as employee information or a product catalog. Data in a database is typically stored in tables, each with a unique identifier, such as a table name. A table consists of one or more columns, each of which is a field in the table and stores a specific piece of information. For example, in a table named "employee," one column might store the employee's ID and another might store the employee's city.

[0050] A script is an executable file written in a specific descriptive language and formatted to perform certain operations. A database script is a collection of statements used to create a database, modify data within it, and query data within it. A full script contains information about all the data in the database. When a full script is executed on a server, the database corresponding to the script is created on the server.

[0051] A database design system is a visual database design and management tool used to create, use, and maintain a database. Users can create design views in the database design system that include charts and the relationships between charts. The database design system can generate database scripts based on the design views. The server generates a database by running the full script, and then runs the database for database users to use. When a user needs to modify the data in the database, he can modify the design view in the database design system. After the user completes the modification of the design view, the database design system can generate a new full script based on the modified design view. It should be understood that the user in this application refers to the user of the database design system, that is, the designer or developer of the database.

[0052] In the embodiments of the present application, the database corresponding to the design view in the database design system is referred to as the design-state database. When developing a project, users typically first conduct a requirements analysis based on project needs, then create a design view of the design-state database in the database design system. After the design view of the design-state database passes review and testing, the database design system generates a script corresponding to the design-state database based on the design view. The generated script is then sent to the server, which runs the script to generate the database, thereby implementing database deployment.

[0053] It should be noted that one or more databases are running in the server, and each database has a unique database name. In the embodiment of the present application, a database running in the server is used as an example to introduce the database design method provided in the embodiment of the present application, and the database running on the server in the embodiment of the present application is referred to as the currently running database. In addition, during the project development process, users generally save multiple versions of the design state database, that is, the database design system includes multiple versions of the design state database corresponding to the above-mentioned currently running database. The database currently running in the server is only one of these multiple versions of the design state database.

[0054] After the database is deployed to the server, it is often necessary to redesign the currently running database based on user needs and software requirements, that is, to modify the currently running database. For example, it is necessary to add or delete a column of data in a table in the currently running database. When the currently running database needs to be modified, the user usually first modifies the design view of the design state database through the visual interface of the database design system to obtain the design view corresponding to the modified design state database. The database design system automatically generates a script corresponding to the modified database based on the design view of the modified design state database, and then uploads the script to the server. When the script is run by the server, it can create a new database in the server, thereby realizing the modification of the currently running database.

[0055] However, a database usually has multiple users with the permission to modify the database. When the first user modifies the currently running database, the second user may not be aware of the first user's modification to the currently running database. For example, the first user logs in to the server where the currently running database is located and forces the modification of the currently running database by writing instructions, rather than first modifying the design view in the database design system through the database design system, generating a script based on the modified design view, and then driving the database modification based on the script. The second user continues to develop through the database design system based on the currently running database before the modification. In this way, the second user's database design is inconsistent with the actual database, causing the second user to lose control of the database, and the previous development work may be invalidated, reducing work efficiency.

[0056] To address the above-mentioned issues, embodiments of the present application provide a database design system and a database design method. By executing the database design method provided in the database design system provided in the embodiments of the present application, a currently running database on a server can be compared with any version of a designed database in the database design system, and a comparison result can be generated and provided to a user.

[0057] The database design system in the embodiments of the present application can be an application program that provides a database development environment. The database design system includes at least one component, which is a simple encapsulation of data and methods. In some programming languages, components can also be referred to as parts, controls, and so on. Based on their functions, the components included in the database design system can be divided into two types: front-end components and back-end components.

[0058] The front-end component refers to the component that implements interaction with the user, such as the client, which is specifically used to receive data input by the user, display the interface and data requested by the user, etc. The back-end component refers to the component that processes the data, and is specifically used to process the received data according to the set logic, or obtain data from the database for processing, etc. In the embodiment of the present application, the database design system may include at least one of the tools such as a graphical user interface, an integrated code editor, a compiler, and a debugger. The front-end component of the database design system may include components related to the graphical user interface, and the back-end component of the database design system may include components related to the compiler, debugger, etc.

[0059] Based on different deployment methods, the database design system can be divided into a local design system and a cloud design system. The front-end components and back-end components of the local design system are deployed locally. Among them, local is also referred to as local equipment. Local devices include user devices under the direct control of the user (such as user terminals such as laptops), or devices that are geographically close to the above-mentioned user devices (such as local computer clusters). The cloud design system has at least some components (such as back-end components) deployed in the cloud. The cloud in the embodiment of the present application is the end corresponding to the local, that is, the resource end that the local user accesses remotely through the network.

[0060] like Figure 1a As shown, Figure 1a This is a schematic diagram of the deployment of a local design system provided in an embodiment of the present application. The front-end components can be run on various terminal devices, such as mobile phones, laptops, tablet computers, or personal desktop computers. The back-end components can be run on a computer cluster (including at least one computing device).

[0061] like Figure 1b As shown, Figure 1b It is a deployment diagram of a cloud design system provided in an embodiment of the present application. The database design system is deployed in a cloud platform. A large number of basic resources provided by a cloud service provider are deployed in the cloud platform. For example, computing resources, storage resources, and network resources are deployed in the cloud platform, and the computing resources can be a large number of computing devices (such as servers). The database design system can use the basic resources deployed in the cloud platform to implement the database design method provided in an embodiment of the present application. For example, after a user purchases a database design cloud service, the cloud platform creates a database design system instance on the resources provided by the cloud service provider in response to a database design system instance creation operation triggered by the user, and then provides the user with a database design interface, and generates the above-mentioned design state database according to the design view created by the user in the database design interface, or according to the design view after the user modifies the existing design view.

[0062] It should be understood that the database design system can be a hardware system or a software system deployed on a hardware device and / or a virtual machine. The database design system can also be implemented through a combination of hardware and software. When the database design system is a hardware system, it can be a collection of computing devices. When the database design system is a software system, the database design system can be independently deployed on a server or virtual machine in the cloud platform, or the database design system can be distributedly deployed on multiple servers in the cloud platform, or the database design system can be distributedly deployed on multiple virtual machines in the cloud platform, or the database design system can be distributedly deployed on servers and virtual machines in the cloud platform.

[0063] like Figure 1b As shown, the database design system can be abstracted by a cloud service provider on a cloud platform into a database design cloud service and provided to users. After a user purchases the database design cloud service on the cloud platform, the cloud platform can utilize the database design system deployed on the cloud platform to provide the user with the database design cloud service. For example, the cloud platform can provide a graphical user interface to users who purchase the cloud service, display the graphical user interface on the user's user device, and allow the user to perform database design within the graphical user interface. Purchasing the database design cloud service can include pre-charging and then settling based on actual resource usage, or settling based on the duration of cloud service usage or the functions or resources of the purchased cloud service.

[0064] It should be noted that in the embodiments of the present application, the cloud platform can be a central cloud platform, an edge cloud platform, or a cloud platform that includes both a central cloud and an edge cloud, and the embodiments of the present application do not specifically limit this. Furthermore, when the cloud platform is a cloud platform that includes both a central cloud and an edge cloud, the database design system can be partially deployed in the edge cloud platform and partially deployed in the central cloud platform.

[0065] In order to solve the above problems, the embodiment of the present application provides a database design method, which can obtain the content information of the currently running database from the server where the database is deployed, compare it with the content information of the design state database of the specified version in the database design system, obtain the comparison results, and provide the comparison results to the user. Figure 2 As shown, Figure 2 It is a flowchart of a database design method provided in an embodiment of the present application, which includes S201 to S203.

[0066] S201: Obtain a comparison task set by the user.

[0067] The above comparison task indicates to view the difference between the design state database and the currently running database in the database design system.

[0068] In a specific implementation, Figure 3a As shown, when the user needs to set a comparison task, the database design system can provide the user with a task management interface, and the user sets the above comparison task through the task management interface provided by the database design system. The task management interface includes options such as task name, care database, baseline model branch, baseline branch version, and execution cycle. Among them, the care database refers to the currently running database. The baseline model branch and the baseline branch version jointly determine the design state database to be compared with the currently running database. Since the design state database includes one or more branches, for example, the "development branch" for user project development, the "trunk branch" for project product release, etc., each branch includes one or more versions. The baseline model branch refers to the branch to which the design state database belongs; the baseline branch version refers to the version of the design state database in the branch to which it belongs. The execution cycle refers to the interval between two adjacent executions of the comparison task.

[0069] When the user needs to create a new care task, the user triggers the "New Task" button on the task management interface, and the database design system will provide the user with a comparison task table, such as Figure 3b As shown. Figure 3b After comparing the task table shown, configure the above options. Figure 3b As shown, the "Watched Database" option is used to select or enter the name of the database currently running in the server. The "Baseline Branch Version" option is used to select or enter the branch to which the design state database belongs and the version in the branch. If you choose to enable the execution cycle, the database comparison tool can regularly compare the currently running database with the design state database and generate comparison results. The "Notifier" option is used to select or enter the information of the person who receives the comparison results. The "Task Description" option is used to describe the comparison task. For example, the purpose of the comparison task is to compare all the data in the currently running database with the design state database, or only compare the data in some tables. If only the data in some tables are compared, the table name of the table to be compared needs to be entered or selected in the task description.

[0070] For example, Figure 3b As shown in the example, the user selected a comparison between the currently running database named "devops" and the latest reviewed version of the master branch in the baseline branch of the running database, and generated comparison results. The user selected a daily execution period, meaning that the two databases are compared every other day and the comparison results are sent to User A and User B.

[0071] After the user configures the above comparison information in the above comparison task table, click the "Save" button to generate the following Figure 3cThe comparison task shown in the task management interface includes one comparison task. It is understood that the user can also create multiple comparison tasks by triggering the "New Task" button on the task management interface, which will not be repeated here.

[0072] In another specific implementation, the user can directly compare the two databases that need to be compared in the difference comparison interface. Figure 4 As shown in the figure, when the user needs to obtain the difference information between two databases, the user calls the difference comparison interface, which includes options such as "Source Branch (Version Number)", "Target Branch (Version Number)", "Database Name", and "Database Type". Among them, the "Source Branch (Version Number)" option is used to select or enter the branch and version number of the design database to be compared; the "Target Branch (Version Number)" option is used to select or enter the name of the database currently running on the server.

[0073] S202: According to the comparison task, compare the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database to obtain a comparison result.

[0074] If the user follows Figures 3a to 3c The method shown in the figure sets the care task, and the database design system sends a request to the server where the currently running database is located every preset period; if the user follows Figure 4 When performing a database comparison in the difference comparison interface, after the user triggers the "Database Compare" button, the database design system sends a request to the server where the currently running database resides. This request includes the name of the currently running database and is used to obtain the content information of the currently running database on the server. The content information includes the table name of each table in the database, the field name and data type in each table, and the logical relationships between the tables. The content information includes any one or more of the following: information about one or more tables in the currently running database, information about each field in one or more tables, triggers, foreign key information, and index information;

[0075] After receiving the acquisition request, the server sends the content information of the currently running database corresponding to the database name to the database design system according to the database name carried in the acquisition request.

[0076] After the database design system receives the content information of the currently running database, it compares the content information of the currently running database with the content information of the design state database, determines the difference information between the content information of the currently running database and the content information of the design state database, and then generates a comparison result based on the difference information. Among them, the difference information includes the number of tables added or deleted in the currently running database compared to the design state database, the table names of the tables added or deleted in the currently running database compared to the design state database, etc. The comparison result includes the name of the currently running database, the version of the design state database, the generation time of the comparison result, the creator of the comparison task, and the above-mentioned difference information, etc. It should be understood that the embodiment of the present application does not limit the specific method of comparison. For example, the method of comparing the content information of the currently running database with the content information of the design state database can adopt the scanning comparison method commonly used in the industry or some fast comparison algorithms already available in the industry.

[0077] S203: Provide the comparison result to the user.

[0078] In a specific embodiment, if the user passes Figure 3a The task management interface shown is created as Figure 3c For the care task shown, the database design system obtains the content information of the currently running database from the server once every day, compares the content information of the currently running database with the content information of the design database, generates a comparison result, and then sends the comparison result to user A and user B.

[0079] In an embodiment of the present application, the database design system can send the comparison results to user A and user B in a variety of ways. For example, the database design system can display the comparison results to the user through an interface, that is, after obtaining the comparison results, the database design system directly displays the comparison results on the interface provided to the user by the database design system. The database design system can also generate a document file based on the comparison results and send the document file to user A and user B via email or instant messaging. The database design system can also provide the user with a link to view the comparison results. After receiving the link, the user visits the web page pointed to by the link to view the comparison results. The embodiment of the present application does not specifically limit the way in which the database design system provides comparison results to the user.

[0080] like Figure 5 As shown, Figure 5 This is a schematic diagram of a comparison result notification provided in an embodiment of the present application. Figure 6 Take sending the comparison result in the form of a web link as an example. Figure 5In the comparison, the "check time" refers to the creation time of the comparison task or the generation time of the comparison results. The "checker" refers to the creator of the comparison task. Check status includes "check failure" and "check success." "Check failure" means the comparison results show differences between the design database and the currently running database, while "check success" means there are no differences between the design database and the currently running database. The summary information indicates the differences between the design database and the currently running database, such as the number of tables added or deleted in the design database relative to the currently running database. Figure 5 The comparison result shown in the figure shows that 30 tables have been deleted from the design database compared to the currently running database. Figure 5 The web pages pointed to by the web links include Figure 3c The comparison results of the comparison task are shown. The user who receives the link clicks Figure 5 You can click the link in the table to view the comparison results between the currently running database and the design database.

[0081] In another specific embodiment, Figure 6 As shown, Figure 6 is a schematic diagram of another comparison result provided in the embodiment of the present application. Figure 4 After the user completes the settings, the "Database Compare" button is triggered to generate the following difference comparison interface: Figure 6 The comparison results are shown. Figure 6 In the design state database of the database TEST selected by the user, four tables have been deleted and two tables have been added compared to the currently running database. The four deleted tables are "employee", "stu", "class" and "NEW_TABLE4", and the two added tables are "columns_priv" and "db".

[0082] Optionally, in S202 above, after obtaining the content information of the currently running database, the database design system may also generate an implementation view corresponding to the currently running database based on the content information of the currently running database, and then provide the user with the implementation view corresponding to the currently running database, the design view corresponding to the design-state database, and information on the differences between the design view and the implementation view. For example, the design view may be marked with different colors where there are differences from the implementation view, and the comparison results may be displayed to the user by providing the user with the implementation view corresponding to the currently running database, the design view corresponding to the design-state database, and information on the differences between the design view and the implementation view.

[0083] By comparing the design database with the currently running database on the server, the difference information between the two is obtained and a comparison result is generated based on the difference information and provided to the user. This allows users to promptly learn about the differences between the design database and the currently running database, preventing users from losing control of the database if the currently running database is modified without being notified in time. This can also prevent errors caused by users not being notified of database changes in a timely manner during project development.

[0084] This application provides a database design device that can be deployed in a cloud data center. Figure 7 As shown, the database design apparatus 700 may include:

[0085] The acquisition module 710 is used to acquire a comparison task set by the user, where the comparison task is used to instruct to check the differences between the design state database and the currently running database in the database design system.

[0086] Processing module 720, processing module: used for: comparing the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database according to the comparison task, obtaining a comparison result, and providing the comparison result to the user.

[0087] Optionally, the processing module 720 is further used to: provide a database design interface to the user, wherein the user is a user who purchases the database design cloud service; and generate the design state database according to the design view created or modified by the user in the database design interface.

[0088] Optionally, the acquisition module 710 is further configured to: acquire content information of the currently running database from a server where the currently running database is deployed, the content information including any one or more of the following: information of one or more tables, field information, triggers, foreign keys, and index information in the currently running database;

[0089] The processing module 720 is specifically configured to compare the content information of the currently running database with the content information of the design state database to obtain the comparison result.

[0090] Optionally, the processing module 720 is also used to: generate an implementation view corresponding to the currently running database based on the content information of the currently running database; and provide the user with the implementation view, the design view corresponding to the design state database, and the difference information between the design view and the implementation view.

[0091] Optionally, the acquisition module 710 is specifically used to: provide a comparison task table to the user; generate the comparison task according to the comparison information selected or input by the user in the comparison task table, wherein the comparison information includes: the name of the currently running database and the version of the design state database.

[0092] Optionally, the comparison information includes one or more of the following information: whether to execute the comparison task regularly, time information of executing the comparison task regularly; information of the user; a detailed description of the comparison task; and a method of providing the comparison result.

[0093] Optionally, the processing module 720 provides the comparison results to the user, including any one or more of the following methods: presenting the comparison results to the user through an interface; notifying the user of the comparison results through email or instant messaging; providing the user with a link to view the comparison results.

[0094] The above units can transmit data to each other through a communication path. It should be understood that the modules included in the device 700 can be software modules, hardware modules, or partly software modules and partly hardware modules.

[0095] In summary, by comparing the design database with the currently running database on the server, we can obtain difference information between the two databases and generate a comparison result based on this difference information for the user. This allows users to promptly learn about the differences between the design database and the currently running database, preventing users from losing control of their databases if the currently running database is modified without being notified promptly. This also helps prevent errors caused by users not being notified of database changes in a timely manner during project development.

[0096] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the delay guarantee system, delay guarantee device and each module described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0097] Since the various modules in the database design system provided by the embodiment of the present application can be distributedly deployed on multiple computers in the same environment or different environments, the embodiment of the present application also provides a computing device, which can be a computer system including one or more computers 900. For example, Figure 8 As shown, each computer 900 includes a memory 901 , a processor 902 , a communication interface 903 and a bus 904 . The memory 901 , the processor 902 and the communication interface 903 are connected to each other via the bus 904 .

[0098] The memory 901 can be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 901 can store programs. When the program stored in the memory 901 is executed by the processor 902, the processor 902 and the communication interface 903 are used to execute the database design method provided in the embodiment of the present application. The memory 901 can also include software modules and data required for other running processes such as the operating system. The operating system can be LINUX TM , UNIX TM , WINDOWS TM wait.

[0099] The processor 902 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.

[0100] The processor 902 may also be an integrated circuit chip with signal processing capabilities. During implementation, some or all of the functions of the database design system of the present application may be implemented by hardware integrated logic circuits or software instructions in the processor 902. The processor 902 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or the like. The storage medium is located in the memory 901 , and the processor 902 reads the information in the memory 901 and completes part of the functions of the database design system of the embodiment of the present application in combination with its hardware.

[0101] The communication interface 903 uses a transceiver module such as, but not limited to, a transceiver to implement communication between the computer 900 and other devices or communication networks.

[0102] The bus 904 may include a path for transmitting information between various components of the computer 900 (eg, the memory 901 , the processor 902 , and the communication interface 903 ).

[0103] A communication path is established between each of the computers 900 via a communication network. Each computer 900 is used for a portion of the functions of the database design system. Any computer 900 can be a computer in a cloud data center (e.g., a server), a computer in an edge data center, or a terminal computer.

[0104] The descriptions of the processes corresponding to the above figures have different focuses. For parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.

[0105] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product providing the database design cloud service includes one or more computer instructions, which, when loaded and executed on a computer, generate in whole or in part the data according to the embodiments of the present application. Figure 2 The process or function described.

[0106] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium stores computer program instructions for providing a database design cloud service.

[0107] The present application also provides a computer-readable storage medium, which can be a non-transitory readable storage medium. When the instructions in the computer-readable storage medium are executed by a computer, the computer is used to execute the database design method provided by the present application. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., an SSD).

[0108] The present application also provides a computer program product, which includes computer instructions. When executed by a computing device, the computing device executes the database design method provided in an embodiment of the present application.

[0109] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0110] In the embodiments of the present application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "one or more" means one or more, and the term "plurality" means two or more, unless otherwise expressly limited.

[0111] In this application, the term "and / or" simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0112] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A database design method, characterized in that: The method is applied to a database design system and includes: Obtaining a comparison task set by a user, wherein the comparison task is used to instruct to check the differences between the design state database and the currently running database in the database design system, wherein the comparison task includes an execution cycle, wherein the currently running database in the server is only one of multiple versions of the design state database; According to the comparison task, comparing the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database to obtain a comparison result; The comparison result is provided to the user.

2. The method according to claim 1, characterized in that The database design system runs in a cloud data center. Before obtaining the comparison task set by the user, the method further includes: Providing a database design interface to the user, wherein the user is a user who purchases a database design cloud service; The design state database is generated according to the design view created or modified by the user in the database design interface.

3. The method according to claim 1, characterized in that: The comparing the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database to obtain a comparison result includes: Obtaining content information of the currently running database from a server where the currently running database is deployed, the content information including any one or more of the following: table information, field information, triggers, foreign keys, and index information in the currently running database; The content information of the currently running database is compared with the content information of the design state database to obtain the comparison result.

4. The method according to claim 3, characterized in that After obtaining the content information of the currently running database from the server where the currently running database is deployed, the method further includes: Generate an implementation view corresponding to the currently running database according to the content information of the currently running database; Providing the comparison result to the user includes: The user is provided with the implementation view, the design view corresponding to the design state database, and difference information between the design view and the implementation view.

5. The method according to any one of claims 1 to 4, characterized in that The comparison task of obtaining user settings includes: providing a comparison task list to the user; The comparison task is generated according to the comparison information selected or input by the user in the comparison task table, wherein the comparison information includes: the name of the currently running database and the version of the design-state database.

6. The method according to claim 5, characterized in that The comparison information also includes one or more of the following information: whether to execute the comparison task regularly, time information of executing the comparison task regularly; information of the user; a detailed description of the comparison task; and a method of providing the comparison result.

7. The method according to any one of claims 1 to 4, characterized in that Providing the comparison result to the user includes any one or more of the following methods: presenting the comparison result to the user through an interface; notifying the user of the comparison result through email or instant messaging; providing the user with a link to view the comparison result.

8. A database design device, characterized in that: The device is applied to a database design system, and comprises: an acquisition module, configured to acquire a comparison task set by a user, wherein the comparison task is used to instruct to check the differences between the design state database and the currently running database in the database design system, wherein the comparison task includes an execution cycle, wherein the currently running database in the server is only one of multiple versions of the design state database; Processing module: used for: comparing the difference between the structure corresponding to the design state database and the structure corresponding to the currently running database according to the comparison task, obtaining a comparison result; and providing the comparison result to the user.

9. The device according to claim 8, characterized in that The database design system runs in a cloud data center, and the processing module is further used to: Providing a database design interface to the user, wherein the user is a user who purchases a database design cloud service; The design state database is generated according to the design view created or modified by the user in the database design interface.

10. The device according to claim 8, characterized in that The acquisition module is further configured to: acquire content information of the currently running database from a server where the currently running database is deployed, wherein the content information includes any one or more of the following: table information, field information, triggers, foreign keys, and index information in the currently running database; The processing module is specifically configured to compare the content information of the currently running database with the content information of the design state database to obtain the comparison result.

11. The device according to claim 10, characterized in that The processing module is further configured to: Generate an implementation view corresponding to the currently running database according to the content information of the currently running database; The user is provided with the implementation view, the design view corresponding to the design state database, and difference information between the design view and the implementation view.

12. The device according to any one of claims 8 to 11, characterized in that The acquisition module is specifically used for: providing a comparison task list to the user; The comparison task is generated according to the comparison information selected or input by the user in the comparison task table, wherein the comparison information includes: the name of the currently running database and the version of the design-state database.

13. The device according to claim 12, characterized in that The comparison information also includes one or more of the following information: whether to execute the comparison task regularly, time information of executing the comparison task regularly; information of the user; a detailed description of the comparison task; and a method of providing the comparison result.

14. The device according to any one of claims 8 to 11, characterized in that Providing the comparison result to the user includes any one or more of the following methods: presenting the comparison result to the user through an interface; notifying the user of the comparison result through email or instant messaging; providing the user with a link to view the comparison result.

15. A computing device, characterized in that The computing device includes a processor and a memory; The memory stores a computer program; When the processor executes the computer program, the computing device performs the method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions. When the instructions are executed on a computing device, the computing device performs the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for processing configuration information

    CN104243515A

  • Structure comparison method and apparatus for databases

    CN106484739A