CN110674118A - Database management method, database management device, server and computer-readable storage medium - Google Patents

Database management method, database management device, server and computer-readable storage medium Download PDF

Info

Publication number
CN110674118A
CN110674118A CN201910918370.6A CN201910918370A CN110674118A CN 110674118 A CN110674118 A CN 110674118A CN 201910918370 A CN201910918370 A CN 201910918370A CN 110674118 A CN110674118 A CN 110674118A
Authority
CN
China
Prior art keywords
database
statement
server
sql statement
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201910918370.6A
Other languages
Chinese (zh)
Inventor
倪建良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201910918370.6A priority Critical patent/CN110674118A/en
Publication of CN110674118A publication Critical patent/CN110674118A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a database management method, a device, a server and a computer readable storage medium, wherein the method is used for the server and comprises the following steps: configuring a plurality of database instances according to a plurality of database types; loading a database in each database instance; and receiving database operation statements which are online on the terminal and face a target database, responding to the database operation statements, and executing the database operation statements in the target database, wherein the target database is any one database loaded by a plurality of database instances. In the database management scheme provided by the embodiment of the invention, a plurality of database instances are generated in the server, and the database data is loaded in the database instances, so that the server can provide the operation functions of the data in different databases for the terminal. At the moment, a user does not need to log in data in a black screen login mode, data access in a plurality of databases can be achieved by accessing the databases, the operation complexity of the databases is simplified, and the operation efficiency of the databases is improved.

Description

Database management method, database management device, server and computer-readable storage medium
Technical Field
Embodiments of the present invention relate to database technologies, and in particular, to a database management method, an apparatus, a server, and a computer-readable storage medium.
Background
With the development of database technology, tools for network WEB access management of databases are increasingly applied to large-scale enterprise management.
Currently, in an operation room for daily data update and the like, an engineer such as a database administrator (DBA) needs to log in a database in a black screen for login operation. When multiple database accesses are involved, a database administrator needs to log in each database and perform operations through blank screen login. Technical requirements for database operators are high, each database needs to be logged in a black screen, and the operation efficiency of the database is low.
Disclosure of Invention
The invention provides a database management method, a database management device, a server and a computer readable storage medium, which are used for simplifying the operation complexity of a database and improving the operation efficiency of the database.
In a first aspect, an embodiment of the present invention provides a database management method, applied to a server, including:
configuring a plurality of database instances according to a plurality of database types;
loading a database in each database instance;
and receiving database operation statements which are online on the terminal and face a target database, responding to the database operation statements, and executing the database operation statements in the target database, wherein the target database is any one database loaded by a plurality of database instances.
In a second aspect, an embodiment of the present invention further provides a database management apparatus, applied to a server, including:
the database instance configuration module is used for configuring a plurality of database instances in the server according to a plurality of database types;
the database loading module is used for loading the database in each database instance;
the operation statement receiving module is used for receiving database operation statements which are online and face a target database;
and the operation statement response module is used for responding to the database operation statement and executing the database operation statement in the target database.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the database management method as shown in the first aspect.
In a fourth aspect, the embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the database management method as shown in the first aspect.
According to the database management scheme provided by the embodiment of the invention, a server configures a plurality of database instances according to a plurality of database types; loading a database in each database instance; and receiving database operation statements which are online on the terminal and face a target database, responding to the database operation statements, and executing the database operation statements in the target database, wherein the target database is any one database loaded by a plurality of database instances. Compared with the prior database manager needing to have the database professional ability, the database management scheme provided by the embodiment of the invention has the advantages that a plurality of database examples are generated in the server, the database data are loaded in the database examples, and the server can provide the operation functions of the data in different databases for the terminal. At the moment, a user does not need to log in data in a black screen login mode, data access in a plurality of databases can be achieved by accessing the databases, the operation complexity of the databases is simplified, and the operation efficiency of the databases is improved.
Drawings
FIG. 1 is a flow chart of a database management method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a database management method according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a database management method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a database management apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a database management method according to an embodiment of the present invention, where this embodiment is applicable to a case where a user accesses a database in a server through a terminal, and the method may be executed by the server, and specifically includes the following steps:
step 110, configuring a plurality of database instances according to a plurality of database types.
The database types include a MySQL database, a Redis database, a Mongo database or an HBase database. One or more database instances are established in the server for each database type. MySQL is an open source relational database management system (RDBMS) that uses the database management language, Structured Query Language (SQL), for database management. The Redis database is an open-source database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent, is of a log type and Key-Value, and can provide API of multiple languages. The MongoDB database is a database based on distributed file storage. Written in the C + + language. It is intended to provide an extensible high performance data storage solution for WEB applications. The HBase database is a distributed, column-oriented open source database.
Illustratively, the database instance is also referred to as HOST (HOST) instance, and when the database instance is configured, the IP address, port number, HOST name, and cluster name of the data can be configured. Optionally, a read-write role (such as read-only, write-only, or read-write, etc.), whether to monitor, whether to backup a machine, whether to perform multiple copies, whether to perform load balancing, etc. may also be configured. The user can access the server through the terminal, and configure each database instance in the server.
Step 120, load the database in each database instance.
For the database instance created in step 110, data is loaded in the database instance to form a database.
The database may be stored in the server in the form of a data table. When loading the database, the name of the database, the access account and the account password may be configured. Further, information of the database applicant, cluster information, service platform information and the like can be configured. Through the configuration, not only can the data in the database be determined, but also different access rights can be configured for the database.
And step 130, receiving an online database operation statement facing the target database from the terminal, and executing the database operation statement in the target database in response to the database operation statement, wherein the target database is any one database loaded by a plurality of database instances.
The server externally discloses a network address so that the terminal can access the server based on the network address. The developer finishes writing data operation sentences on the terminal, inputs information such as database information and database operation sentence scripts in the system, and sends the information to the server through Web Ontology Language (OWL) information. And after analyzing the OWL information, the server determines a database which the terminal requests to access and a database operation statement script executed by the database according to the database information. And after responding to the OWL information, the server sends the feedback data to the terminal.
According to the database management method provided by the embodiment of the invention, a server configures a plurality of database instances according to a plurality of database types; loading a database in each database instance; and receiving database operation statements which are online on the terminal and face a target database, responding to the database operation statements, and executing the database operation statements in the target database, wherein the target database is any one database loaded by a plurality of database instances. Compared with the prior database management personnel who need to have the professional ability of the database, the database management method provided by the embodiment of the invention has the advantages that different databases are respectively accessed through a black screen login mode, a plurality of database examples are generated in the server, the database data are loaded in the database examples, and the server can provide the operation functions of the data in the different databases for the terminal. At the moment, a user does not need to log in data in a black screen login mode, data access in a plurality of databases can be achieved by accessing the databases, the operation complexity of the databases is simplified, and the operation efficiency of the databases is improved.
Example two
Fig. 2 is a schematic flow chart of a database management method according to a second embodiment of the present invention, and as a further description of the second embodiment, an operation statement of a database according to the second embodiment of the present invention is a structured query language SQL statement of a MySQL database, where the SQL statement is used to edit or query data of the MySQL database, and at this time, the method may be implemented in the following manner:
step 210, configuring a plurality of database instances according to a plurality of database types.
Step 220, load the database in each database instance.
Step 230, receiving a database operation statement facing a target database on the terminal, and detecting the SQL statement; the target database is any one database loaded by a plurality of database instances.
The query and edit operations can be performed on the MySQL database using SQL statements. And performing query operation without changing the data in the database, and if performing editing operation, changing the data in the MySQL database. In order to ensure the safety of the data editing operation, the SQL statement may be detected when responding to the SQL statement, and if the detection is unsuccessful, it indicates that the SQL statement has a problem, and then the execution of the SQL statement is temporarily cancelled. And if the SQL statement detection is successful, responding to the SQL statement. The detection of the SQL statement may include security detection besides syntax detection, for example, whether the data modified by the SQL statement is protected data or whether the effect generated by the SQL statement affects the overall data content of the MySQL database.
Illustratively, a developer completes writing of a data operation statement on a terminal, enters information such as database information, a database operation statement script and an execution description in a system, and sends the information to a server through Web ontology language (OWL) information. And after analyzing the OWL information, the server determines a database which the terminal requests to access and a database operation statement script executed by the database according to the database information. And after responding to the OWL information, the server sends the feedback data to the terminal.
And step 240, when the detection is successful, executing the SQL statement in the target database.
Wherein. The target database may be a MySQL database. And if the detection is successful, the server responds to the SQL statement and executes the SQL statement in the MySQL database.
Optionally, step 230, detecting the SQL statement may be implemented in the following manner:
step 231, precompilation of SQL statements.
And dividing a storage space for precompiling the SQL statement. Precompilation refers to compiling the SQL statements in a memory space, rather than applying the SQL statements directly to the database.
Step 232, checking the syntax of the SQL statement according to the precompiled SQL statement.
And after the SQL statement is precompiled, processing elements of the database are obtained, and the processing elements are detected to complete the syntax detection of the SQL statement.
Step 233, if the syntax is correct, execute the SQL statement and estimate the number of lines of influence.
And if the SQL statement has no syntax problem, estimating the number of the lines influenced by the SQL statement according to the content of the SQL statement.
In one implementation, receiving a preset time sent by a user through a terminal;
if the grammar is correct, when the preset time is reached, the SQL sentence passing the detection is executed, and the execution result and the estimated number of the lines of influence are fed back to the terminal.
Further, the OWL information may further include preset time, where the preset time is execution time of the SQL statement set by the developer. When the system time of the server reaches the preset time, if the SQL statement conforms to the grammar requirement and the safety requirement, the SQL statement can be executed at the preset time. And furthermore, developers can quickly set the execution time of the SQL sentences in the MySQL database through the terminal, and the usability is improved.
And step 234, if the grammar is wrong, feeding error information back to the terminal.
If the SQL sentence is subjected to grammar detection, if the SQL sentence is found to have grammar errors, such as grammar logic errors, symbol applicability errors or variable name errors, error information is generated and sent to the terminal, so that a developer can obtain the reason why the SQL sentence is not responded by the server according to the input SQL sentence through the error information displayed by the terminal, the SQL sentence is quickly adjusted, and the data processing efficiency is improved.
Further, after detecting the SQL statement, the method further includes: if the detection result is unsuccessful, the work order system is informed to generate an examination and approval work order; the work order system informs the responsible person to examine and approve; if the person in charge passes the examination and approval, the DBA carries out examination and approval on the SQL statement; when the database administrator DBA passes the approval, the SQL statement is executed.
When the SQL statement detection is unsuccessful, it may be due to an erroneous determination of the correct SQL statement at the time of the machine automation detection. In order to further recheck the SQL sentences which are not successfully detected, the server sends a notice to the work order system, so that the work order system generates an examination and approval work order. And the examination and approval work order is used for requesting a responsible person to manually check the SQL sentences which are not successfully detected. And the responsible person manually approves the SQL sentence, if the conclusion that the approval is passed is obtained, the database administrator DBA carries out secondary approval on the SQL sentence, and if the database administrator also judges that the SQL sentence is correct, the server executes the SQL sentence. The SQL sentences can be rechecked through two times of manual judgment, and the correct SQL sentences are prevented from being cancelled and executed. Meanwhile, SQL sentences lower than danger can be screened out in a manual checking mode, and further follow-up improvement on the database, supervision of related users and the like are facilitated.
Furthermore, an automatic operation and maintenance tool (acceptance tool) can be used for performing rollback operation on the SQL statement, so that rollback SQL support is provided for the failure condition.
The database management method provided by the embodiment of the invention can detect the SQL sentences (syntax detection and safety detection) when developers use the SQL sentences to process the MySQL database, and when the detection is successful, the SQL sentences are responded, so that the safety of the database is improved.
EXAMPLE III
Fig. 3 is a schematic flowchart of a database management method according to a third embodiment of the present invention, which is used to further explain the above embodiment, and includes:
step 310, configuring a plurality of database instances according to a plurality of database types.
Step 320, load the database in each database instance.
And step 330, sending a database operation interface with a plurality of database tabs to the terminal.
Wherein the plurality of database tabs includes tabs of at least one of the following databases: redis database, Mongo database, or HBase database.
The server generates access interfaces of a plurality of database tabs, and developers can access the database operation interface with the plurality of database tabs after accessing the server through the terminal. Each database operation interface provides a query operation of the database.
Step 340, after the user selects the target database tab at the terminal, the user inputs the query statement of the database in the database tab.
After a user selects one database tab according to requirements, a query statement is input in an input box provided in the database tab.
And 350, querying the database data represented by the target database option according to the query statement, and feeding back a query result.
After receiving the query statement, the server queries the corresponding target database according to the corresponding query statement.
Step 360, receiving a database operation statement facing a target database on line of the terminal, and detecting the SQL statement; the target database is any one database loaded by a plurality of database instances.
And step 370, when the detection is successful, executing the SQL statement in the target database.
The database management device provided by the embodiment of the invention can provide a query function of a Redis database, a Mongo database or an HBase database for developers, simplify the operation of the developers and improve the query efficiency of the databases.
The database management method provided by the embodiment can realize centralized management of multiple database instances, and one platform can realize access of multiple databases. The online database web is automated, an automation technology is used for avoiding online risks, and manual auditing (server approval, DBA approval and the like) and automatic auditing (grammar detection and safety detection) strategies are supported. For a user, the instance of the database and the configuration details of the database do not need to be concerned, and the online database is simpler and more efficient to change and query through the page. All online database changes are managed in a platform centralization mode, and SQL safety audit is achieved.
Example four
Fig. 4 is a schematic structural diagram of a database management apparatus according to a fourth embodiment of the present invention, which is applied to a server and includes a database instance configuration module 41, a database loading module 42, and an operation statement receiving module 43, where:
a database instance configuration module 41, configured to configure a plurality of database instances according to a plurality of database types;
a database loading module 42 for loading a database in each database instance;
an operation statement receiving module 43, configured to receive an online database operation statement facing a target database, where the target database is any one database loaded in multiple database instances;
and the operation statement response module is used for responding to the database operation statement and executing the database operation statement in the target database.
Further, the database operation statement is a structured query language SQL statement of the MySQL database, the SQL statement is used to edit or query data of the MySQL database, and the operation statement response module is used to:
detecting the SQL statement;
when the detection is successful, the SQL statement is executed in the target database.
Further, the operation statement response module is configured to:
precompiling SQL sentences;
checking the syntax of the SQL statement according to the precompiled SQL statement;
if the grammar is correct, executing the SQL statement and estimating the number of the influenced lines;
and if the grammar is wrong, feeding error information back to the terminal.
Further, the system also comprises an approval module used for:
if the detection result is unsuccessful, the work order system is informed to generate an examination and approval work order;
the work order system informs the responsible person to examine and approve;
if the person in charge passes the examination and approval, the DBA carries out examination and approval on the SQL statement;
when the database administrator DBA passes the approval, the SQL statement is executed.
Further, the operation statement response module is configured to:
receiving preset time sent by a user through a terminal;
if the grammar is correct, when the preset time is reached, the SQL sentence passing the detection is executed, and the execution result and the estimated number of the lines of influence are fed back to the terminal.
Further, the operation statement response module is further configured to:
sending a database operation interface with a plurality of database tabs to a terminal;
after a user selects a target database tab at a terminal, inputting a query statement of a database in the database tab;
and querying the database data represented by the target database option according to the query statement, and feeding back a query result.
Further, the plurality of database tabs includes at least one of the following database tabs: redis database, Mongo database, or HBase database.
In the database management apparatus provided in the embodiment of the present invention, the database instance configuration module 41 configures a plurality of database instances according to a plurality of database types; the database loading module 42 loads the database in each database instance; the operation statement receiving module 43 receives a database operation statement facing a target database on line in a terminal, and executes the database operation statement in the target database in response to the database operation statement, where the target database is any one database loaded in a plurality of database instances. Compared with the prior database management personnel who need to have the professional ability of the database, the database management device provided by the embodiment of the invention has the advantages that different databases are respectively accessed through a black screen login mode, a plurality of database examples are generated in the server, the database data are loaded in the database examples, and the server can provide the operation functions of the data in the different databases for the terminal. At the moment, a user does not need to log in data in a black screen login mode, data access in a plurality of databases can be achieved by accessing the databases, the operation complexity of the databases is simplified, and the operation efficiency of the databases is improved.
The database management device provided by the embodiment of the invention can execute the database management method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a server according to a fifth embodiment of the present invention, and as shown in fig. 5, the server includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of the processors 50 in the server may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 51, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the database management method in the embodiment of the present invention (for example, the database instance configuration module 41, the database loading module 42, and the operation statement receiving module 43). The processor 50 executes various functional applications of the server and data processing by executing software programs, instructions, and modules stored in the memory 51, that is, implements the above-described database management method.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the server. The output device 53 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, where the program is used to execute the database management method shown in the foregoing embodiment when executed by a processor, and the method includes:
configuring a plurality of database instances according to a plurality of database types;
loading a database in each database instance;
and receiving database operation statements which are online on the terminal and face a target database, responding to the database operation statements, and executing the database operation statements in the target database, wherein the target database is any one database loaded by a plurality of database instances.
Further, the database operation statement is a structured query language SQL statement of a MySQL database, the SQL statement is used to edit or query data of the MySQL database, and in response to the database operation statement, the database operation statement is executed in the target database, including:
detecting the SQL statement;
when the detection is successful, the SQL statement is executed in the target database.
Further, detecting the SQL statement includes:
precompiling SQL sentences;
checking the syntax of the SQL statement according to the precompiled SQL statement;
if the grammar is correct, executing the SQL statement and estimating the number of the influenced lines;
and if the grammar is wrong, feeding error information back to the terminal.
Further, after detecting the SQL statement, the method further includes:
if the detection result is unsuccessful, the work order system is informed to generate an examination and approval work order;
the work order system informs the responsible person to examine and approve;
if the person in charge passes the examination and approval, the DBA carries out examination and approval on the SQL statement;
when the database administrator DBA passes the approval, the SQL statement is executed.
Further, if the syntax is correct, the SQL statement is executed to estimate the number of lines of influence, which includes:
receiving preset time sent by a user through a terminal;
if the grammar is correct, when the preset time is reached, the SQL sentence passing the detection is executed, and the execution result and the estimated number of the lines of influence are fed back to the terminal.
Further, after loading the database in each database instance, the method further includes:
sending a database operation interface with a plurality of database tabs to a terminal;
after a user selects a target database tab at a terminal, inputting a query statement of a database in the database tab;
and querying the database data represented by the target database option according to the query statement, and feeding back a query result.
Further, the plurality of database tabs includes at least one of the following database tabs: redis database, Mongo database, or HBase database.
Of course, the computer-readable storage medium provided by the embodiments of the present invention has computer-executable instructions that are not limited to the above method operations, and may also perform related operations in the database management method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the database management apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A database management method is applied to a server and comprises the following steps:
configuring a plurality of database instances according to a plurality of database types;
loading a database in each database instance;
receiving an online database operation statement facing a target database on a terminal, and responding to the database operation statement to execute the database operation statement in the target database, wherein the target database is any one database loaded in the multiple database instances.
2. The database management method according to claim 1, wherein the database operation statement is a structured query language SQL statement of a MySQL database, the SQL statement being used to edit or query data of the MySQL database, and the executing the database operation statement in the target database in response to the database operation statement comprises:
detecting the SQL statement;
and when the detection is successful, executing the SQL statement in the target database.
3. The database management method according to claim 2, wherein said detecting said SQL statement comprises:
precompiling the SQL statement;
checking the syntax of the SQL statement according to the precompiled SQL statement;
if the syntax is correct, executing the SQL statement and estimating the number of the influenced lines;
and if the grammar is wrong, feeding error information back to the terminal.
4. The database management method according to claim 2, further comprising, after detecting the SQL statement:
if the detection result is unsuccessful, the work order system is informed to generate an examination and approval work order;
the work order system informs the responsible person to examine and approve;
if the person in charge passes the examination and approval, a database administrator DBA examines and approves the SQL statement;
and when the DBA passes the approval, executing the SQL statement.
5. The database management method of claim 3, wherein executing the SQL statement to predict the number of rows affected if the syntax is correct comprises:
receiving preset time sent by a user through a terminal;
and if the grammar is correct, when the preset time is up, executing the SQL sentence passing the detection, and feeding back the execution result and the estimated number of the lines of influence to the terminal.
6. The database management method of claim 1, further comprising, after loading the database in each database instance:
sending a database operation interface with a plurality of database tabs to a terminal;
after a user selects a target database tab at a terminal, inputting a query statement of a database in the database tab;
and querying the database data represented by the target database option according to the query statement, and feeding back a query result.
7. The database management method of claim 6, wherein the plurality of database tabs comprises at least one database tab of: redis database, Mongo database, or HBase database.
8. A database management apparatus, applied to a server, comprising:
the database instance configuration module is used for configuring a plurality of database instances according to a plurality of database types;
the database loading module is used for loading the database in each database instance;
an operation statement receiving module, configured to receive an online database operation statement for a target database, where the target database is any one database loaded in the multiple database instances;
and the operation statement response module is used for responding to the database operation statement and executing the database operation statement in the target database.
9. A server, characterized in that the server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the database management method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a database management method according to any one of claims 1 to 7.
CN201910918370.6A 2019-09-26 2019-09-26 Database management method, database management device, server and computer-readable storage medium Withdrawn CN110674118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910918370.6A CN110674118A (en) 2019-09-26 2019-09-26 Database management method, database management device, server and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910918370.6A CN110674118A (en) 2019-09-26 2019-09-26 Database management method, database management device, server and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN110674118A true CN110674118A (en) 2020-01-10

Family

ID=69079353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910918370.6A Withdrawn CN110674118A (en) 2019-09-26 2019-09-26 Database management method, database management device, server and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110674118A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651431A (en) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 Database service oriented management flow standardization method
CN111897872A (en) * 2020-07-03 2020-11-06 杭州浮云网络科技有限公司 Large-scale MSSQL management method, system and computer equipment based on service center
CN112269776A (en) * 2020-11-18 2021-01-26 四川长虹电器股份有限公司 Database operation and maintenance management platform
CN112286911A (en) * 2020-12-15 2021-01-29 中移(苏州)软件技术有限公司 Database management method and device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651431A (en) * 2020-06-09 2020-09-11 中国雄安集团数字城市科技有限公司 Database service oriented management flow standardization method
CN111897872A (en) * 2020-07-03 2020-11-06 杭州浮云网络科技有限公司 Large-scale MSSQL management method, system and computer equipment based on service center
CN112269776A (en) * 2020-11-18 2021-01-26 四川长虹电器股份有限公司 Database operation and maintenance management platform
CN112286911A (en) * 2020-12-15 2021-01-29 中移(苏州)软件技术有限公司 Database management method and device, equipment and storage medium
CN112286911B (en) * 2020-12-15 2021-06-04 中移(苏州)软件技术有限公司 Database management method and device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110674118A (en) Database management method, database management device, server and computer-readable storage medium
US11163731B1 (en) Autobuild log anomaly detection methods and systems
KR102268355B1 (en) Cloud deployment infrastructure validation engine
US20230418637A1 (en) Cloud native virtual machine runtime protection
US20210160249A1 (en) Systems and methods for role-based computer security configurations
US9122804B2 (en) Logic validation and deployment
US10296440B2 (en) Multi-tenant aware debugging methods and systems
CN110188573B (en) Partition authorization method, partition authorization device, partition authorization equipment and computer readable storage medium
WO2023123943A1 (en) Interface automation testing method and apparatus, and medium, device and program
US20200371902A1 (en) Systems and methods for software regression detection
CN110942155A (en) Research method of machine learning engine
US11868481B2 (en) Method for discovering vulnerabilities of operating system access control mechanism based on model checking
US20190050210A1 (en) System and method for providing cloud operating system verifications for a domain-specific language for cloud services infrastructure
CN110674161A (en) Method, system, storage medium and SQL operation platform for online SQL
US20200293502A1 (en) Systems and methods for database management system (dbms) discovery
US20210406004A1 (en) System and method for implementing a code audit tool
CN110063042A (en) A kind of response method and its terminal of database failure
US20220101274A1 (en) Automated Control Of Distributed Computing Devices
US10102107B2 (en) Source code migration tool
US9959162B2 (en) Automated remote network target computing device issue resolution
US11294666B1 (en) Data structures for managing configuration versions of cloud-based applications
CN107229977A (en) A kind of automatic reinforcement means of Host Security baseline and system
US20210344701A1 (en) System and method for detection promotion
US20230025740A1 (en) Assessing data security of a managed database deployed in the cloud using a secured sandbox environment
US11748686B1 (en) Automated onboarding service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200110