A database design method, device and related equipment

By implementing branch synchronization and branch replication operations in the database design system, the problem of insufficient operation methods between different database branches in the existing system is solved, user operation efficiency and data consistency are improved, and user experience is enhanced.

CN113806327BActive Publication Date: 2025-06-27HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011043839.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-16
Filing Date
2020-09-28
Publication Date
2025-06-27
Estimated Expiration
2040-09-28

AI Technical Summary

Technical Problem

The existing database design system has fewer operating methods between different database branches and cannot meet the needs of project development, especially when the branch synchronization and merging process is prone to merge conflicts.

Method used

Provide a database design method and device, by implementing branch synchronization and branch replication operations in the database design system, it allows users to synchronize data between different branches in the same database model, and copy branches in one database model to another database model, thereby increasing the user's operation and management methods of databases.

Benefits of technology

Through branch synchronization and replica operations, merge conflicts are avoided, the efficiency and consistency of users' data operations between different branches are improved, and the user experience is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806327B_ABST
    Figure CN113806327B_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 provides a first interface to the user, enabling the user to input source information and target information on the first interface; receiving a branch operation request set by the user through the first interface, where the branch operation request includes the source information and target information input by the user, and the branch operation request is any one of branch synchronization or branch replication; performing the operation specified by the branch operation request according to the source information and target information in the branch operation request. By implementing the embodiment of the present application, the database design system can provide synchronization operations between different branches in the same database model and replication operations of databases between different database models, increasing the user's operation and management methods for the database and improving work efficiency and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database design, and in particular, to a database design method, apparatus, and related devices. Background Art

[0002] During the project development process, users can design databases through a database design system. When designing a database through the database design system, users will create one or more branches according to project requirements. For example, a "development branch" for users' project development, a "main branch" for project product release, etc. Each branch includes design-state databases of different versions. The current database design system provides operations on different branches, including creating new branches, deleting used branches, and merge operations between different branches. Currently, there are few operation methods between different database branches, which cannot meet the requirements in project development. Summary of the Invention

[0003] Embodiments of this application disclose a database design method, apparatus, and related devices, which can provide branch synchronization and branch replication operations on databases, increase the user's operation and management methods for databases, and improve the user experience.

[0004] In a first aspect, this application provides a database design method, which is applied to a database design system. The database design system includes at least one design-state database model. Each database model includes at least one branch, and each branch includes at least one database version. The database design method includes: the database design system provides a first interface to the user, enabling the user to set a branch operation request on the first interface, where the branch operation request is any one of a branch synchronization request or a branch replication request, and the branch operation request includes source information and target information; receiving the branch operation request set by the user through the first interface, and the database design system executes the operation specified in the branch operation request according to the source information and target information in the branch operation request.

[0005] By providing synchronization operations between different branches in the same database model and replication operations of databases between different database models, the database design system increases the user's operation and management methods for databases, and improves the user's work efficiency and user experience.

[0006] In a specific implementation manner, the above branch synchronization request is used to indicate that any database version in the first branch in the database model is used to overwrite the database version in the second branch in the same database model; wherein, the first branch is any branch in the database model, and the second branch is a branch different from the first branch; the above branch replication request is used to indicate that the third branch in the first database model is copied into the second database model to form the fourth branch in the second database model, wherein the first database model and the second database model are two different database models.

[0007] Through the above-provided branch synchronization method between different branches in the same database model, it is possible to avoid the merge conflict problem that occurs when different branches in the same database are merged, and the user can select any database version in the first branch to synchronize to the second branch, so that the data represented by the other branch is the same as the data represented by the selected database version. The branch replication method provides a cross-model branch operation method, which can copy the data of the third branch in one database model into the second database model to form the fourth branch. After the fourth branch has the same data as the third branch, the user can perform new development work in the fourth branch without affecting the third branch, and the user's modification operations on the third branch also do not affect the fourth branch.

[0008] In a specific implementation manner, when the branch operation request is a branch synchronization request, the above source information includes the name of the first branch and the version number of the database version used for branch synchronization in the first branch; the above target information includes the name of the second branch.

[0009] In a specific implementation manner, when the branch operation request is a branch replication request, the above source information includes the name of the first database model and the name of the third branch; the above target information includes the name of the second database model.

[0010] In a specific implementation, the database design system performs the operation specified in the branch operation request according to the source information and target information in the branch operation request, including: when the branch operation request is a branch synchronization request, the database design system determines the difference information between the data represented by the first database version and the data represented by the second branch. The first database version is the database version indicated by the version number of the database version in the above source information; the database design system obtains some or all of the above difference information selected by the user as the target difference information, and saves the target difference information to the second branch. Specifically, the database design system may first delete the un-reviewed database version in the second branch, and then create a new database version in the second branch, and save the target difference information to the newly created database version in the second branch; or, the database design system directly replaces the data in the un-reviewed database version in the second branch with the target difference information.

[0011] By storing the difference information in the latest database version of the second branch in the form of difference storage, the database design system can obtain the full amount of data represented by the second branch according to the difference information and the data in other branches in the second branch, and ensure that the data represented by the latest database version of the second branch is the same as the data represented by the first database version in the first branch.

[0012] In a specific implementation, the database design system performs the operation specified in the branch operation request according to the source information and target information in the branch operation request, including: when the branch operation request is a branch replication request, the database design system obtains the full amount of data of the third branch in the first database model according to the name of the first database model and the name of the third branch; copies the full amount of data of the third branch to the second database model to form a fourth branch in the second database model, where the third branch is any branch in the first database model, and the fourth branch is a newly created branch in the second database model when the database design system performs the branch replication operation.

[0013] In a specific implementation, the database design system runs on a cloud platform, and the user is a user who purchases the cloud service of the database design system on the cloud platform. Providing the database design cloud service to the user in the form of cloud service improves the flexibility of database design use and can enhance the user experience.

[0014] In a second aspect, an embodiment of the present application provides a database design device, which is applied to a database design system. The database design system includes at least one design-state database model, each database model includes at least one branch, and each branch includes at least one database version. The device includes:

[0015] A display module for providing a first interface to a user, the first interface being used for the user to set source information and target information, wherein the branch operation request is any one of a branch synchronization request or a branch replication request, and the branch operation request includes source information and target information;

[0016] A receiving module for receiving a branch operation request set by the user through the first interface;

[0017] A processing module for performing an operation specified by the branch operation request according to the source information and target information in the branch operation request.

[0018] In a specific implementation manner, the above-mentioned branch synchronization request is used to indicate that any database version in the first branch in the database model is used to overwrite the database version in the second branch in the same database model; wherein, the first branch is any branch in the database model, and the second branch is a branch different from the first branch; the above-mentioned branch replication request is used to indicate that the third branch in the first database model is copied into the second database model to form the fourth branch in the second database model, wherein the first database model and the second database model are two different database models.

[0019] In a specific implementation manner, when the branch operation request is a branch synchronization request, the above-mentioned source information includes the name of the first branch and the version number of the database version used for branch synchronization in the first branch; the above-mentioned target information includes the name of the second branch.

[0020] In a specific implementation manner, when the branch operation request is a branch replication request, the above-mentioned source information includes the name of the first database model and the name of the third branch; the above-mentioned target information includes the name of the second database model.

[0021] In a specific implementation manner, when the processing module performs an operation specified by the branch operation request according to the source information and target information in the branch operation request, the processing module is specifically used for: when the branch operation request is a branch synchronization request, obtaining the difference information between the data represented by the first database version and the data represented by the second branch, where the first database version is the database version indicated by the version number of the above-mentioned database version; obtaining target difference information and saving the target difference information to the second branch, where the target difference information is part or all of the difference information selected by the user.

[0022] In a specific implementation manner, when the processing module executes the operation specified in the branch operation request according to the source information and the target information in the branch operation request, the processing module is specifically configured to: when the branch operation request is a branch replication request, obtain the full amount of data of the third branch in the first database model according to the name of the first database model and the third branch name; copy the full amount of data of the third branch to the second database model to form a fourth branch in the second database model.

[0023] In a specific implementation manner, the database design system runs on a cloud platform, and the user is a user who purchases the cloud service of the database design system on the cloud platform.

[0024] In a third aspect, an embodiment of the present application provides a computing device, which includes 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 foregoing first aspect or any specific implementation manner of the first aspect.

[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions run on a network device, the method in the foregoing first aspect or any specific implementation manner of the first aspect is executed.

[0026] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When executed by a computing device, the computing device executes the method in the foregoing first aspect or any specific implementation manner of the first aspect. This computer program product can be a software installation package. In the case where the method in the foregoing first aspect or any specific implementation manner of the first aspect needs to be used, this computer program product can be downloaded and executed on the computing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1A is a deployment schematic diagram of a local database design system provided by an embodiment of the present application;

[0029] Figure 1B is a deployment schematic diagram of a cloud database design system provided by an embodiment of the present application;

[0030] Figure 2 is a flowchart of a database design method provided by an embodiment of the present application;

[0031] Figure 3 It is a schematic diagram of a first interface provided by an embodiment of the present application;

[0032] Figure 4A It is a schematic diagram of another first interface provided by an embodiment of the present application;

[0033] Figure 4B It is a schematic diagram of a second interface provided by an embodiment of the present application;

[0034] Figure 4C It is a schematic diagram of a third interface provided by an embodiment of the present application;

[0035] Figure 5 It is a schematic diagram of another first interface provided by an embodiment of the present application;

[0036] Figure 6 It is a schematic diagram of a database design device provided by an embodiment of the present application;

[0037] Figure 7 It is a schematic diagram of the structure of a computing device provided by an embodiment of the present application. Detailed implementation manners

[0038] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0039] A database (DB) is a warehouse that organizes, stores, and manages data according to a data structure, and is a collection of organized and sharable large amounts of data stored in a computer.

[0040] A database design system is a visual tool for database design and management, used to create, use, and maintain a database. A user can create database elements such as design views, stored procedures, functions, sequences, indexes, foreign keys, triggers, etc. including tables and the associated relationships between tables in the database design system, and the database design system can generate a script of the database according to the design. The server generates the database by running the script. When the user needs to modify the data in the database, the user can modify the design data in the database design system. After the user finishes modifying the design data, the database design system can generate a new script according to the modified design data.

[0041] The database design system has the functions of branch and version management. Creating branches is one of the most commonly used database management methods in the database design system. By creating different branches, several tasks in project development can be isolated from each other. When it is necessary to release a version, the data in multiple branches is integrated through branch merging. When designing a database through the database design system, users can create one or more branches in a database model. For example, a "development branch" for users' project development, a "trunk branch" for project product release, etc. Each branch includes one or more database versions. Among them, the database version refers to the database in the design state. The database in the design state refers to the database saved in the database design system during the process of users' project development through the database design system.

[0042] It should be noted that in a branch of the database design system, except for the first database version, other database versions adopt differential storage. That is, the data stored in a database version is the differential information obtained by comparing this database version with the previous one. For example, a branch includes three database versions A1, A2, and A3, and the creation sequence is A1, A2, and A3. If x is the character in A1, then the data represented by A1 is x; in A2, the user adds the characters yz after the character x. Then, in A2, the saved data is not xyz, but two change operations: "add y" and "add z", but the data represented by A2 is xyz; in A3, the user deletes the character z. Then, in A3, the saved data is not xy, but the change operation "delete z", but the data represented by A3 is xy. Since there are only these three database versions in this branch, the data represented by A3 is the data represented by this branch. It should be understood that the data and operation process in the above database version are only used to illustrate the differential storage method and cannot be understood as the actual data stored in the database and the actual operation on the database.

[0043] Branch merging refers to incorporating the modifications to the database in one version into another version in different branches of the same database. The different versions of the same database can be in the same branch or in different branches. Exemplarily, if the first branch is merged into the second branch, the database design system will detect the first branch and the second branch, and determine all the addition, deletion, and modification operations of the first branch relative to the merge point or the branch creation point since the last merge point or the branch creation point, as well as all the addition, deletion, and modification operations of the second branch relative to the merge point or the branch creation point. Then, the modification operations of the first branch to the database will be executed and changed in the second branch, that is, the change operations of the first branch to the database model since the last merge point or the branch creation point will be replicated in the second branch. For example, after the last merge point or the branch creation point, the second branch includes Table 1, but the first branch has performed an operation to delete Table 1. Then, when the first branch is merged into the second branch, Table 1 will be deleted in the latest version of the second branch, and no changes will be made to the first branch.

[0044] It should be noted that merge conflicts may occur during branch merging. For example, two branches have made different modifications to the same object. When performing branch merging, the database design system will perform conflict detection, and then handle the merge conflicts or give conflict warnings according to the preset conflict handling strategy, and let the user choose some conflicts that cannot be automatically processed. For example, according to the modification time, the data with a later modification time is used as the data after branch merging; or a warning is given when a merge conflict occurs to notify the user to resolve the merge conflict.

[0045] The database design system in the embodiments of the present application is an application program for providing a database development environment. The database design system includes at least one component. A component refers to a simple encapsulation of data and methods. In some programming language systems, a component can also be called a part, a control, etc. Based on the role of the component, the components included in the database design system can be divided into two types: front-end components and back-end components.

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

[0047] Based on different deployment methods, database design systems can be divided into local database design systems and cloud database design systems. The front-end components and back-end components of a local database design system are both deployed locally. Here, "locally" also refers to local devices. Local devices include user devices directly under the control of users (such as terminals like laptops), or devices geographically close to the above user devices (such as local computer clusters). In a cloud database design system, at least some components (such as back-end components) are deployed in the cloud. The cloud in the embodiments of this application is the corresponding end to the local, that is, the resource end remotely accessed by local users through the network.

[0048] As Figure 1A shown, Figure 1A Figure 1 is a deployment schematic diagram of a local database design system provided by an embodiment of this application. The above front-end components can run on various terminal devices, such as: mobile phones, laptops, tablets, or personal desktop computers, etc. The above back-end components can run on a computer cluster (including at least one computing device).

[0049] As Figure 1B shown, Figure 1B Figure 2 is a deployment schematic diagram of a cloud database design system provided by an embodiment of this application. The database design system is deployed in a cloud platform. A large number of basic resources provided by cloud service providers are deployed in the cloud platform. For example, computing resources, storage resources, and network resources are deployed in Cloud Platform 1, 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 by the embodiments of this application.

[0050] 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 virtual machine, and the database design system can also be implemented by 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.

[0051] As Figure 1BAs shown, the database design system can be abstracted by a cloud service provider into a cloud service for database design on the cloud platform and provided to users. After a user purchases the database design cloud service on the cloud platform, the cloud platform can use the database design system deployed on the cloud platform to provide the database design cloud service to the user. For example, the cloud platform can provide a graphical user interface to the user who purchases the cloud service and display the graphical user interface on the user's device. The user can perform database design in the graphical user interface. Among them, the ways to purchase the database design cloud service can include: prepaying first and then settling according to the actual usage of the final resources, or settling according to the time of using the cloud service or according to the functions or resources of the purchased cloud service.

[0052] It should be noted that in the embodiments of the present application, the cloud platform can be the cloud platform of the central cloud, the cloud platform of the edge cloud, or the cloud platform including the central cloud and the edge cloud. The embodiments of the present application do not make specific limitations on it. And when the cloud platform is the cloud platform including the central cloud and the edge cloud, the database design system can be partially deployed in the cloud platform of the edge cloud and partially deployed in the cloud platform of the central cloud.

[0053] During the project development process, the user can design a database through the database design system. When the user designs a database through the database design system, one or more branches will be created in the same database model according to the project requirements. For example, a "development branch" for the user's project development, a "trunk branch" for the project product release, etc. Each branch includes design-state databases of different versions. The operations between the design-state databases provided by the current database design system include creating a new branch, deleting an unused branch or deleting a certain version of the database in an existing branch, and merging operations between the design-state databases in different branches, etc. The operation methods between the design-state databases of different branches are currently few and cannot meet the requirements in project development.

[0054] To solve the above problems, the embodiments of the present application provide a database design system and a database design method. As Figure 2 shown, Figure 2 is a schematic flowchart of a database design method provided by the embodiments of the present application. The database design system can provide synchronization operations between design-state databases in different branches of the same database, as well as replication operations of design-state databases between different databases, increasing the user's operation and management methods for the database and improving the user's work efficiency and user experience.

[0055] S201. Provide a first interface to the user and receive a branch operation request set by the user through the first interface.

[0056] In the embodiments of the present application, the branch operation requests in the database model are all operation requests for the designed database in the database design system. The branch operations of the database include branch merging, branch synchronization, and branch forking, etc.

[0057] Among them, branch synchronization means replacing a database version in the second branch of the same database model with any database version provided by the first branch in the database model, so that the data represented by the second branch is the same as the data represented by a database version in the first branch. Herein, the first branch and the second branch are two different branches. Branch synchronization can be used when a user needs to change the solution corresponding to the second branch to the solution corresponding to any database version in the first branch, and replace the data represented by the second branch with the data represented by the database version selected by the user in the first branch. For example, the first branch in the database model includes four database versions A1, A2, A3, and A4, the second branch includes two database versions B1 and B2, and B1 and B2 are database versions that have been audited and cannot be modified anymore. Then the data represented by the second branch. If the user selects to synchronize A3 in the first branch to the second branch, after the database design system creates the database version B3 in the second branch and performs the branch synchronization operation, the data represented by B3 is the same as the data represented by A3 in the first branch. It should be understood that the data in the above database versions and the operation process are only used to illustrate branch synchronization, and cannot be understood as the actual data stored in the database and the actual operation process of the database.

[0058] Branch forking (fork) means copying the third branch in the first database model to the fourth branch in the second database model, which is used to develop new products based on the existing database. Herein, the first database model and the second database model are two different database models, the third branch is any branch in the first database model, and the fourth branch is a newly created branch in the second database model when branch forking is executed. For example, after a user completes the development of the Android version of an application and needs to develop the Symbian system version of the application, the user can fork the third branch in the first database model corresponding to the Android version to the second database model established for the development of the Symbian system version, and create a fourth branch in the second database model to save the data of the third branch. Then the data in the fourth branch is exactly the same as the data in the third branch. However, the fourth branch and the third branch are not in the same database model, so they do not affect each other. In this way, the data of the existing database can be used for the development of new products.

[0059] In a specific implementation manner, the above branch operation request may be a branch synchronization request. The branch synchronization request includes source information and target information. The source information includes the name of the first branch and the version number of the database version. The target information includes the name of the second branch. The version number of the database version indicates the database version used for branch synchronization in the source branch. When a user needs to perform a branch synchronization operation on two database versions in different branches of the same database, the database design system may provide a first interface to the user. The user selects the source information corresponding to the first branch and the target information corresponding to the second branch for the branch synchronization operation through the first interface.

[0060] As Figure 3 shown, Figure 3 is a schematic diagram of a first interface provided by an embodiment of the present application. This first interface is an interface displayed by the database design system on the user terminal for the user to select the first branch and the version number of the database version. When the user needs to perform a branch synchronization operation, the user can first enter the management interface corresponding to the second branch, which means that the user has selected the database model and the second branch for which branch synchronization is required. Then, through the management interface corresponding to the second branch, enter Figure 3 the first interface shown in Figure 3 where it shows that the user selects the main branch in the database model T as the second branch. The first interface includes the names of different branches in the database model and the version information of databases in different versions of each branch. Among them, the version information includes the version number, review status, submitter identifier, and submission time, etc. The review status includes reviewed and unreviewed; the submitter identifier indicates the submitter of the corresponding version. The user can select the first branch and the database version for branch synchronization on the first interface. Figure 3 where it shows that the user selects the development branch as the first branch and uses the database version with version number 2 in the development branch as the first database version for branch synchronization, that is, the user selects to synchronize the database version with version number 2 in the development branch to the main branch. After the user selects the first branch and the first database version on the first interface, the user can trigger (for example, click with the mouse) the synchronization control. The user terminal detects the trigger operation of the user. In response to this trigger operation, the user terminal sends a branch synchronization request to the computer cluster or cloud platform where the database design system is located, so that the database design system obtains the branch synchronization operation task set by the user.

[0061] It should be understood that the above Figure 3 shown interface is only an example, and in actual applications, it may also be other forms of interfaces.

[0062] For example, as Figure 4A shown, Figure 4AIt is a schematic diagram of another first interface provided by an embodiment of the present application. The first interface includes a second branch selection control and a first branch selection control. A user can set target information by triggering (such as by mouse click) the second branch selection control, and set source information by triggering the first branch selection control. After the database design system detects the operation of the user triggering the second branch selection control, in response to this operation, the database design system can display a second interface for setting target information to the user. As Figure 4B shown, the second interface includes the names of different branches in the database model and the version information of databases of different versions in each branch. After the user selects the second branch, by triggering the confirmation control on the second interface, the user returns to the first interface. Then the user can set the source information by triggering the first branch selection control. After the database design system detects the operation of the user triggering the source branch selection control, in response to this operation, the database design system can display a third interface for setting source information to the user. As Figure 4C shown, the third interface includes the names of different branches in the database model and the version information of databases of different versions in each branch. After the user selects the first branch and the first database version, by triggering the confirmation control on the first branch selection interface, the user returns to the first interface. The first interface also includes a synchronization control. After the user selects the first database version and the second branch, the synchronization control can be triggered (such as by mouse click). The user terminal detects the operation of the user triggering the synchronization control, and in response to this operation, the user terminal sends a branch synchronization request to the computer cluster or cloud platform where the database design system is located, so that the database design system obtains the database branch synchronization operation task set by the user.

[0063] As Figure 4B and Figure 4C shown, the database model includes 5 branches, and the branch names are "trunk branch", "development branch", "feature branch 1", "feature branch 2" and "release branch" respectively. Among them, the "trunk branch" is the second branch, the "development branch" is the first branch, the "trunk branch" includes 4 design-state databases, and the "development branch" includes 4 design-state databases that have completed the review. The user selects the database version with version number 4 in the "development branch" as the first database version for branch synchronization. It should be understood that the Figures 4A to 4C interfaces shown above are only examples, and in actual applications, they can also be other forms of interfaces.

[0064] In a specific implementation manner, the above branch operation request can also be a branch replication request. The branch replication request includes source information and target information. Among them, the source information includes the name of the first database model and the name of the third branch, etc., and the target information includes the name of the second database model, etc.

[0065] AsFigure 5 As shown Figure 5 This is another schematic diagram of the first interface provided by the embodiment of the present application. The user can input source information and target information in the first interface shown Figure 5 As shown, in the first interface, the user can input source information and target information. For example, the user can input the name of the first database model in the input box corresponding to the first database model name under the source information, or select the name of the first database model through the drop-down menu. The user can input the name of the third branch in the input box for the branch (version number), or select the name of the third branch through the drop-down menu; the user can input the name of the second database model in the input box corresponding to the database model name under the target information, or select the name of the second database model through the drop-down menu. As Figure 5 shown, the target information in the first interface may also include an input box for the branch (version number). The user can input the name of the fourth branch in the input box for the branch (version number). If the user inputs a branch name in this input box, the database design system will create a fourth branch named after this branch name in the second database model when executing the branch replication request. If the user does not input a branch name in this input box, the database design system will create a fourth branch with a default name in the second database model when executing the branch replication request. The first interface also includes a confirmation control and a cancellation control. After the user selects the source information and target information, the branch replication operation can be triggered through the confirmation control. The user terminal detects the trigger operation of the user. In response to this operation, the user terminal sends a branch replication request to the computer cluster or cloud platform where the database design system is located, so that the database design system obtains the database branch replication operation task set by the user. Optionally, the above source information may also include a version number. The user can select the version of the third branch when selecting the third branch, and replicate a database version in the third branch to the second database model.

[0066] As Figure 5 shown. The user selects to replicate the development branch in database model V1 to the main branch of database model V2. It should be understood that the interface shown above Figure 5 is only an example. The database design system can also provide other forms of interfaces to complete the selection of source information and target information in branch replication. The embodiments of the present application do not make specific limitations.

[0067] 202. Execute the operation specified in the branch operation request according to the source information and target information in the branch operation request.

[0068] In a specific implementation manner, when the branch operation request is a branch synchronization request, if the user passes through the interface shown Figure 3 or the interface shown Figures 4A to 4CFor the interface shown, the second branch, the first branch, and the first database version for branch synchronization in the first branch are selected. Based on the name of the database model in the branch synchronization request and the name of the second branch, the database design system first clears the un-reviewed database versions in the second branch, and then compares the data represented by the latest reviewed second database version in the second branch with the data represented by the first database version in the first branch to obtain difference information. Finally, a new database version is created in the second branch, and the difference information is stored in the new database version. For example, in the above Figure 3 the user selects the database version with version number 2 in the development branch as the first database version. There are 4 database versions in the main branch, with version numbers 1, 2, 3, and 4 respectively. The database versions with version numbers 1, 2, and 3 have been reviewed, and the database version with version number 4 is an un-reviewed version. After the user triggers the synchronization control on the first interface, the database design system deletes the database version with version number 4. Then, it compares the data represented by the database version with version number 3 in the main branch with the data represented by the database version with version number 2 in the development branch to obtain difference information. Finally, a new database version with version number 4 is created in the main branch, and the difference information is stored in the database version with version number 4. In this way, through the difference information and other database versions in the main branch, the full data of the database version with version number 4 can be obtained.

[0069] Exemplarily, the database version with version number 1 in the development branch represents the character 'a', and the string represented by the database version with version number 2 is 'abc'. Then, the change operations "add b" and "add c" are stored in the database version with version number 2. The database version with version number 1 in the main branch represents the character 'a', the string represented by the database version with version number 2 is 'ax', and the string represented by the database version with version number 3 is 'axy'. Then, the change operation "add x" is stored in the database version with version number 2, and the change operation "add y" is stored in the database version with version number 3. After comparing the data represented by the database version with version number 2 in the development branch with the data represented by the database with version number 3 in the main branch, the difference information obtained includes the following 4 change operations: "add b", "add c", "delete x", and "delete y". Then, the database version with version number 4 in the main branch saves the above difference information, but the data represented by the database version with version number 4 in the main branch is 'abc'. It should be understood that the data and operation process in the above database version are only used to illustrate branch synchronization and cannot be understood as the actual data stored in the database and the actual operation process of the database.

[0070] Optionally, when the database design system saves the above difference information, it may also not delete the versions that have not been audited and completed in the second branch. After the database design system determines the difference information, it directly replaces the data stored in the versions that have not been audited and completed in the second branch with the difference information.

[0071] It should be understood that after the database design system obtains the difference information, it can display the difference information to the user, and then the user selects some or all of the difference information in the difference information as the target difference information. Then the database design system obtains the target difference information selected by the user and completes the above branch synchronization operation according to the target difference information. The method for the database design system to complete the branch synchronization operation according to the target difference information is the same as the method for completing the branch synchronization operation according to the above difference information, and will not be introduced in detail here.

[0072] In a specific implementation manner, when the branch operation request is a branch replication request, the database design system searches for the third branch in the first database model specified by the branch replication request according to the source information in the branch replication request, and replicates the full amount of data of the third branch to the fourth branch in the second database model. It should be understood that if the user has created the fourth branch in the second database model before the branch replication, the database design system directly copies the full amount of data of the third branch to the fourth branch; if the user has not created the fourth branch in the second database model before the branch replication, the database design system first creates the fourth branch in the second database model, and then copies the full amount of data of the third branch to the fourth branch.

[0073] The database design system provided by the embodiments of the present application can provide synchronization operations between different branches in the same database model and replication operations of branches between different database models, increasing the user's operation and management methods for the database, and improving the user's work efficiency and user experience.

[0074] The present application provides a database design device, which can be deployed in a cloud platform. As Figure 6 shown, the database design device 600 may include:

[0075] A display module 610, configured to provide a first interface to the user, where the first interface is used for the user to set and submit a branch operation request, where the branch operation includes branch merging, branch synchronization, and branch replication, etc. Among them, branch merging refers to the merging operation between design-state databases in different branches in the same database model; branch synchronization is an overwriting operation, which refers to a database version of a first branch of the same database model overwriting a database version in a second branch; branch replication refers to copying a design-state database of a version in a first database model to a target branch in a second database model;

[0076] A receiving module 620, configured to receive a branch operation request set by a user through the above-mentioned first interface;

[0077] A processing module 630, configured to perform a corresponding branch operation according to the branch operation request.

[0078] Optionally, the database design system runs on a cloud platform, and the user is a user who purchases the cloud service of the database design system for the cloud platform.

[0079] Optionally, the display module 610 is further configured to provide a second interface to the user for providing the result of the execution of the branch operation request to the user.

[0080] Data can be transmitted between the above-mentioned units through a communication path. It should be understood that each module included in the apparatus 600 can be a software module, a hardware module, or a part of a software module and a part of a hardware module.

[0081] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described apparatus and each module can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0082] Since each module in the database design system provided by the embodiments of the present application can be distributedly deployed on multiple computers in the same environment or different environments, therefore, the embodiments of the present application further provide a computing device. In some cases, the computing device can be a computer system, including one or more computers 700. Exemplarily, as Figure 7 shown, each computer 700 includes a memory 701, a processor 702, a communication interface 703, and a bus 704. Among them, the memory 701, the processor 702, and the communication interface 703 are communicatively connected to each other through the bus 704.

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

[0084] The processor 702 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.

[0085] The processor 702 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, some or all of the functions of the database design system of the present application may be completed by the integrated logic circuit in the hardware of the processor 702 or the instructions in the form of software. The above-mentioned processor 702 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, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 701, and the processor 702 reads the information in the memory 701 and combines its hardware to complete some functions of the database design system in the embodiments of the present application.

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

[0087] The bus 704 may include a path for transmitting information between various components of the computer 700 (for example, the memory 701, the processor 702, the communication interface 703).

[0088] A communication path is established between each of the above-mentioned computers 700 through a communication network. Each computer 700 is used for some functions of the database design system. Any one of the computers 700 may be a computer in a cloud platform (for example: a server), or a computer in an edge data center.

[0089] The descriptions of the processes corresponding to the above respective drawings have their own focuses. For parts not detailed in a certain process, reference may be made to the relevant descriptions of other processes.

[0090] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product for providing database design cloud services includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, they wholly or partly generate the method flow or functions according to the embodiments of the present application Figure 2 described above.

[0091] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium stores computer program instructions for providing database design system cloud services.

[0092] The present application also provides a computer-readable storage medium, which may 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 may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as an SSD).

[0093] 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 by the embodiments of the present application.

[0094] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disc, etc.

[0095] In the embodiments of the present application, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. The term "one or more" means one or more, and the term "multiple" means two or more, unless otherwise clearly defined.

[0096] In this application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone. Additionally, in this text, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0097] The above are only optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the concept and principles of this application shall be included within the protection scope of this application.

[0098] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0099] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (such as a solid state disk (SSD)).

Claims

1. A database design method, characterized in that, Applied to a database design system, the database design system includes at least one database model in the design state, each database model includes at least one branch, and each branch includes at least one database version. The method includes: Providing a first interface to the user, the first interface is used for the user to set a branch operation request, wherein the branch operation request is any one of a branch synchronization request or a branch replication request, and the branch operation request includes source information and target information; the branch synchronization request is used to indicate that the database version in the first branch in the database model is used to overwrite the database version in the second branch in the same database model; the branch replication request is used to indicate that the third branch in the first database model is copied to the second database model to form the fourth branch in the second database model; Receiving the branch operation request set by the user through the first interface, and performing the operation specified in the branch operation request according to the source information and target information in the branch operation request.

2. The method according to claim 1, wherein When the branch operation request is a branch synchronization request, the source information includes the name of the first branch and the version number of the database version used for branch synchronization in the first branch; the target information includes the name of the second branch.

3. The method according to claim 1, wherein When the branch operation request is a branch replication request, the source information includes the name of the first database model and the name of the third branch; the target information includes the name of the second database model.

4. The method according to claim 2, wherein Performing the operation specified in the branch operation request according to the source information and target information in the branch operation request includes: When the branch operation request is a branch synchronization request, obtaining the difference information between the data represented by the first database version and the data represented by the second branch, and the first database version is the database version indicated by the version number of the database version; Obtaining target difference information, and saving the target difference information to the second branch, and the target difference information is part or all of the difference information selected by the user.

5. The method according to claim 3, characterized in that, Performing the operation specified in the branch operation request according to the source information and target information in the branch operation request includes: When the branch operation request is a branch replication request, obtaining the full amount of data of the third branch in the first database model according to the name of the first database model and the name of the third branch; Copying the full amount of data of the third branch to the second database model to form the fourth branch in the second database model.

6. The method according to any one of claims 1 to 5, characterized in that The database design system runs on a cloud platform, and the user is a user who purchases the cloud service of the database design system on the cloud platform.

7. A database design device, characterized in that, The device is applied to a database design system, the database design system includes at least one database model in the design state, each database model includes at least one branch, and each branch includes at least one database version. The device includes: A display module for providing a first interface to a user, the first interface being used for the user to set a branch operation request, where the branch operation request is any one of a branch synchronization request or a branch replication request, and the branch operation request includes source information and target information; the branch synchronization request is used to indicate that a database version represented by a first branch in a database model overwrites a database version represented by a second branch in the same database model; the branch replication request is used to indicate that a third branch in a first database model is copied into a second database model to form a fourth branch in the second database model; A receiving module for receiving the branch operation request set by the user through the first interface; A processing module for performing the operation specified in the branch operation request according to the source information and target information in the branch operation request.

8. The device according to claim 7, characterized in that, When the branch operation request is a branch synchronization request, the source information includes the name of the first branch and the version number of the database version for branch synchronization in the first branch; the target information includes the name of the second branch.

9. The device according to claim 7, characterized in that, When the branch operation request is a branch replication request, the source information includes the name of the first database model and the name of the third branch; the target information includes the name of the second database model.

10. The device according to claim 8, characterized in that, The processing module is specifically configured to: When the branch operation request is a branch synchronization request, obtain the difference information between the data represented by the first database version and the data represented by the second branch, where the first database version is the database version indicated by the version number of the database version; Obtain target difference information and save the target difference information to the second branch, where the target difference information is part or all of the difference information selected by the user.

11. The device according to claim 9, characterized in that, The processing module is specifically configured to: When the branch operation request is a branch replication request, obtain the full amount of data of the third branch in the first database model according to the name of the first database model and the name of the third branch; Copy the full amount of data of the third branch into the second database model to form the fourth branch in the second database model.

12. The device according to any one of claims 7 to 11, characterized in that, The database design system runs on a cloud platform, and the user is a user who purchases the cloud service of the database design system on the cloud platform.

13. A computing device, characterized in that, It includes a processor and a memory, the memory is used to store instructions, and the processor is used to execute the instructions. When the processor executes the instructions, it performs the method according to any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when the instructions run on a computing device, they perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Voice answering system and method

    CN101394442A

  • Data integration method and system of heterogeneous relational database based on XML (Extensive Makeup Language)

    CN102081661A