Management and backup method based on multiple databases
By providing a multi-database-based management and backup method, the problem of lack of unified database management tools in the prior art is solved, and unified access and operation of multiple databases is realized, which improves user efficiency and database security.
Patent Information
- Application Number
- CN202311331810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
AI Technical Summary
The existing technology lacks a comprehensive database management tool that can effectively integrate multiple different types of databases, resulting in developers and database managers needing to frequently enable and switch multiple database visualization tools, affecting operational efficiency and causing waste of resources.
Provides a multi-database-based management and backup method, which allows you to access data sources of different types of databases in the data source configuration, fill in data source information, start the activation button to test the access status, and write and execute SQL statements on the SQL editor page. This method supports multiple database types, such as MySQL, SQLserver, Oracle, Redis, and hive, and integrates Inception tools to realize the functions of auditing, backup and rollback statements.
This method supports unified access and operation of multiple databases, improves user usage efficiency, simplifies database management process, enhances database security, and provides detailed record and permission management functions of SQL statements.
Smart Images

Figure CN119829542A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and more specifically, to a management and backup method based on multiple databases. Background Art
[0002] In the field of software development and database management, relevant personnel often involve the use of multiple databases. However, there is no comprehensive database management tool on the market that can effectively integrate multiple different types of databases. Software developers or database managers need to open multiple database visualization tools, or use command lines to switch multiple systems to ensure access to and use of different databases. At the same time, in terms of data backup and data rollback, there is no database visualization tool on the market that implements or integrates related functions.
[0003] In the current software development and database management field, developers and database managers need to open database management tools or use command lines to access different databases. If multiple different databases are involved in the same project, multiple database management tools or command line windows need to be opened. This operation greatly affects the operating efficiency of relevant personnel and also causes a waste of resources to a certain extent. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a multi-database management and backup method for improving the efficiency of actual development in view of the deficiencies of the above technical solutions.
[0005] The present invention provides a management and backup method based on multiple databases, the method comprising the following steps:
[0006] S1, create a data source of a different type of database in the data source configuration and fill in the data source information to be connected;
[0007] S2, start the activation button to test the access status of the current data source information, and determine whether the current data source information is normally accessed, and display its access result;
[0008] S3, select the data source and access result that need to be operated according to the access status of the current data source information. After selection, a SQL editor page will appear. Write the SQL statement to be executed in the SQL editor page. After writing, select the written SQL statement and execute the selected SQL. After execution, the execution result is displayed below the SQL editor.
[0009] In the multi-database management and backup method described in the present invention; in the step S1, the different types of databases include MySQL, SQLserver, Oracle, Redis, and hive, and the data source information includes data source type, IP, user name, password, and port number.
[0010] In the multi-database management and backup method described in the present invention, the access result in step S2 includes the database and the failure reason.
[0011] In the multi-database management and backup method described in the present invention; in the step S2, if the access is successful, the activation button is set to the on state, and the database under the data source is read at the same time, and the database is displayed in a list form. If the access fails, the connection failure and the reason for the failure are displayed.
[0012] The embodiment of the present invention further provides a management and backup method based on multiple databases, the method comprising the following steps:
[0013] S1, create a data source of a different type of database in the data source configuration and fill in the data source information to be connected;
[0014] S2, start the activation button to test the access status of the current data source information, and determine whether the current data source information is normally accessed, and display its access result;
[0015] S3, select the SQL change module, fill in the SQL change information to be executed on the SQL change release page, and after the SQL change information is filled in, synchronize the information to the reviewer and wait for the reviewer to review it. The reviewer views the submitted SQL change information on the page and determines whether to execute or discard the operation;
[0016] S4, judging whether backup is required based on the submitted SQL change information, if necessary, performing backup and generating backup rollback SQL, if not, not generating;
[0017] S5. If you need to query the generated backup rollback SQL, fill in the executed data source information in the SQL change backup menu, and you can query the SQL statement, execution time, number of affected rows and generated rollback statement of the SQL backup executed under this database.
[0018] In the multi-database management and backup method described in the present invention; in the step S1, the different types of databases include MySQL, SQLserver, Oracle, Redis, and hive, and the data source information includes data source type, IP, user name, password, and port number.
[0019] In the multi-database management and backup method described in the present invention, the access result in step S2 includes the database and the failure reason.
[0020] In the multi-database management and backup method described in the present invention; in the step S2, if the access is successful, the activation button is set to the on state, and the database under the data source is read at the same time, and the database is displayed in a list form. If the access fails, the connection failure and the reason for the failure are displayed.
[0021] In the multi-database management and backup method described in the present invention; in the step S3, the SQL change information includes the SQL name executed this time, the executed data source, the executed database, whether to back up, and the name of the reviewer who submitted this information. If it is an abandoned operation, the process is terminated here. If it is a passed operation, the SQL is executed.
[0022] In the multi-database management and backup method described in the present invention; in step S5, if it is necessary to query the generated backup rollback SQL, then in the SQL change backup menu, fill in the executed database IP, database name and port number, and you can query the SQL statement, execution time, number of affected rows and generated rollback statement of the SQL backup executed under this database.
[0023] The multi-database management and backup method of the present invention supports access to multiple different types of databases, can integrate different database operations and database information, realize unified access, can perform unified operations, and integrates the inception tool to improve the review, backup, and rollback statement generation processes, greatly improving the efficiency of actual development, so as to achieve the purpose of improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flow chart of an embodiment of a method for managing and backing up multiple databases according to the present invention;
[0025] Figure 2 It is a flow chart of another embodiment of the management and backup method based on multiple databases of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] like Figure 1-2 FIG. 1 is a flow chart of an embodiment of a management and backup method based on multiple databases of the present invention. A management and backup method based on multiple databases is provided, comprising the following steps:
[0029] In step S1, a data source of a different type of database is created in the data source configuration for access, and the accessed data source information is filled in;
[0030] In step S2, the activation button is started to test the access status of the current data source information, and whether the current data source information is normally accessed is determined, and the access result is displayed;
[0031] In step S3, the data source and access result that need to be operated are selected according to the access status of the current data source information. After selection, an SQL editor page appears. The SQL statement to be executed is written in the SQL editor page. After writing, the written SQL statement is selected and the selected SQL is executed. After execution, the execution result is displayed below the SQL editor; the execution result after execution will be displayed below the SQL editor for the convenience of users to view.
[0032] In one embodiment, in step S1, the different types of databases include MySQL, SQLserver, Oracle, Redis, and hive, and the data source information includes data source type, IP, user name, password, and port number.
[0033] In one embodiment, the access result in step S2 includes a database and a failure reason.
[0034] In one embodiment, if the access is successful in step S2, the activation button is set to the on state, and the database under the data source is read and displayed in a list form. If the access fails, the connection failure and the reason for the failure are displayed.
[0035] The embodiment of the present invention further provides a management and backup method based on multiple databases, the method comprising the following steps:
[0036] In step S1, a data source of a different type of database is created in the data source configuration for access, and the accessed data source information is filled in;
[0037] In step S2, the activation button is started to test the access status of the current data source information, and whether the current data source information is normally accessed is determined, and the access result is displayed;
[0038] In step S3, the SQL change module is selected, and the SQL change information to be executed is filled in the SQL change release page. After the SQL change information is filled in, the information is synchronized to the reviewer and waits for the reviewer to review. The reviewer views the submitted SQL change information on the page and determines whether to execute or discard the operation;
[0039] In step S4, it is determined whether backup is required based on the submitted SQL change information. If backup is required, backup is performed and backup rollback SQL is generated. If backup is not required, no backup is generated.
[0040] In step S5, if you need to query the generated backup rollback SQL, fill in the executed data source information in the SQL change backup menu, and you can query the SQL statement, execution time, number of affected rows and generated rollback statement of the SQL backup executed in this database.
[0041] In one embodiment, in step S3, the SQL change information includes the name of the SQL executed this time, the data source executed, the database executed, whether to back up, and the name of the reviewer who submitted this information. If it is an abandoned operation, the process is terminated here. If it is a passed operation, the SQL is executed.
[0042] In one embodiment, if it is necessary to query the generated backup rollback SQL in step S5, fill in the executed database IP, database name and port number in the SQL change backup menu, and you can query the SQL statements, execution time, number of affected rows and generated rollback statements of the SQL backup executed under this database.
[0043] Specifically, this application can unify the connection of different database tools: by using JDBC technology, the access to different databases, the acquisition and modification of data, and the settings at the database table level are encapsulated into interfaces, and through unified calls by tools, it is possible to access multiple different types of databases on the same tool and perform related data operations. Implement SQL statement detection and data backup and rollback: The Inception tool can be integrated, and the audit, execution, backup, and rollback statement generation functions in this tool can be redeveloped and combined with the database operations integrated in this tool.
[0044] The specific code is as follows:
[0045]
[0046]
[0047]
[0048] The beneficial effects of a multi-database management and backup method provided by an embodiment of the present invention are at least:
[0049] 1. It can access different types of databases, including MySQL, SQLserver, Oracle, Redis, and hive. It unifies the use of database management tools, eliminates the need to frequently switch tools, and improves user efficiency.
[0050] 2. Supports data changes to the database through SQL operations or document editing, which is convenient for users to operate on the visual interface. It also has table name prompt function and SQL keyword prompt function, which is convenient for users to input SQL without logging into the server and relying on DOS command operations, thereby improving operational efficiency.
[0051] 3. You can manage different data sources in the tool and access and query the data under different data sources. This unifies the use of tools and improves user efficiency.
[0052] 4. You can view the details of the executed SQL, including SQL content, operation type, execution status, execution result, operator and operation time. This makes it convenient for database administrators to manage user operations, facilitate data recovery and accountability, and ensure data security.
[0053] 5. Configure database operation permissions for different users, including query permissions, data modification permissions, table structure operation permissions, and export permissions. There is also an unauthorized operation interception to avoid the risk of uncontrollable data source permissions, prevent data and library table structures from being modified without reason, and enhance database security.
[0054] 6. Record different operations in the tool, including the successful SQL information, unauthorized operations, erroneous operations, etc. It is convenient for users to track database operations and recover abnormalities, ensure the stability of the database and the security of the user database, and protect the database. It is also convenient for administrators and users to view the usage of the platform.
[0055] 7. For the WEB version of the tool, you don’t need to download it. Once you have an available connection and account password, you can log in from any device at any time.
[0056] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0057] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0058] Therefore, the above is only a preferred specific implementation mode of the present invention, and the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. The protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A management and backup method based on multiple databases, characterized in that: The method comprises the following steps: S1, create a data source of a different type of database in the data source configuration and fill in the data source information to be connected; S2, start the activation button to test the access status of the current data source information, and determine whether the current data source information is normally accessed, and display its access result; S3, select the data source and access result that need to be operated according to the access status of the current data source information. After selection, a SQL editor page will appear. Write the SQL statement to be executed in the SQL editor page. After writing, select the written SQL statement and execute the selected SQL. After execution, the execution result is displayed below the SQL editor.
2. The multi-database management and backup method according to claim 1, characterized in that: In step S1, the different types of databases include MySQL, SQLserver, Oracle, Redis, and hive, and the data source information includes data source type, IP, user name, password, and port number.
3. The multi-database management and backup method according to claim 2, characterized in that: In step S2, the access result includes the database and the failure reason.
4. The multi-database management and backup method according to claim 3 is characterized in that: In step S2, if the access is successful, the activation button is set to the on state, and the database under the data source is read and displayed in a list form. If the access fails, the connection failure and the reason for the failure are displayed.
5. A management and backup method based on multiple databases, characterized in that: The method comprises the following steps: S1, create a data source of a different type of database in the data source configuration and fill in the data source information to be connected; S2, start the activation button to test the access status of the current data source information, and determine whether the current data source information is normally accessed, and display its access result; S3, select the SQL change module, fill in the SQL change information to be executed on the SQL change release page, and after the SQL change information is filled in, synchronize the information to the reviewer and wait for the reviewer to review it. The reviewer views the submitted SQL change information on the page and determines whether to execute or discard the operation; S4, judging whether backup is required based on the submitted SQL change information, if necessary, performing backup and generating backup rollback SQL, if not, not generating; S5. If you need to query the generated backup rollback SQL, fill in the executed data source information in the SQL change backup menu, and you can query the SQL statement, execution time, number of affected rows and generated rollback statement of the SQL backup executed under this database.
6. The multi-database management and backup method according to claim 5, characterized in that: In step S1, the different types of databases include MySQL, SQLserver, Oracle, Redis, and hive, and the data source information includes data source type, IP, user name, password, and port number.
7. The multi-database management and backup method according to claim 6, characterized in that: In step S2, the access result includes the database and the failure reason.
8. The multi-database management and backup method according to claim 7, characterized in that: In step S2, if the access is successful, the activation button is set to the on state, and the database under the data source is read and displayed in a list form. If the access fails, the connection failure and the reason for the failure are displayed.
9. The multi-database management and backup method according to claim 6, characterized in that: In step S3, the SQL change information includes the name of the SQL executed this time, the data source executed, the database executed, whether to back up, and the name of the reviewer who submitted this information. If it is an abandoned operation, the process is terminated here. If it is a passed operation, the SQL is executed.
10. The multi-database management and backup method according to claim 9, characterized in that: If you need to query the generated backup rollback SQL in step S5, fill in the executed database IP, database name and port number in the SQL change backup menu, and you can query the SQL statement, execution time, number of affected rows and generated rollback statement of the SQL backup executed under this database.