CN110716915A - Method and device for operating database, electronic equipment and storage medium - Google Patents

Method and device for operating database, electronic equipment and storage medium Download PDF

Info

Publication number
CN110716915A
CN110716915A CN201910823220.7A CN201910823220A CN110716915A CN 110716915 A CN110716915 A CN 110716915A CN 201910823220 A CN201910823220 A CN 201910823220A CN 110716915 A CN110716915 A CN 110716915A
Authority
CN
China
Prior art keywords
database
user terminal
configuration parameters
target database
authority
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.)
Pending
Application number
CN201910823220.7A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910823220.7A priority Critical patent/CN110716915A/en
Publication of CN110716915A publication Critical patent/CN110716915A/en
Pending 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/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention discloses a method and a device for operating a database, electronic equipment and a storage medium, and relates to the field of cloud deployment, wherein the method comprises the following steps: acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password; determining a target database based on the database connection strings in the configuration parameters; determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters; if the user terminal has the authority to operate the target database, connecting the target database; acquiring a database operation instruction sent by the user terminal; performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result; and returning the operation result to the user terminal. The method improves the efficiency of operating the database.

Description

Method and device for operating database, electronic equipment and storage medium
Technical Field
The present invention relates to the field of cloud deployment, and in particular, to a method and an apparatus for operating a database, an electronic device, and a storage medium.
Background
In the present day that the internet technology is highly developed, all information exists depending on data, which means that various internet technologies are required to be performed around the data, and the massive data is generally stored in a database. Therefore, how to operate the database efficiently has important significance.
In many cases, the user terminal is not allowed to directly operate on the database due to security concerns of the database. The user terminal can be connected to a specific terminal only through a remote desktop, and the specific terminal directly operates the database by controlling the specific terminal. In many cases, the connection between the user terminal and the specific terminal is unstable, and once the user terminal is disconnected from the specific terminal in the middle of operation and the user terminal is reconnected with the specific terminal, the operation on the database is started from the beginning; moreover, since the specific terminals corresponding to different databases are different, if the user terminal needs to operate a plurality of databases, the process of connecting and controlling the specific terminal needs to be repeated, which is inefficient.
Disclosure of Invention
Based on this, in order to solve the technical problem of how to solve the inefficiency faced by the user terminal in the remote operation of the database in the related art from the technical aspect, the present disclosure provides a method, an apparatus, an electronic device and a storage medium for operating the database.
In a first aspect, a method for operating a database is provided, including:
acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password;
determining a target database based on the database connection strings in the configuration parameters;
determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters;
if the user terminal has the authority to operate the target database, connecting the target database;
acquiring a database operation instruction sent by a user terminal;
performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result;
and returning the operation result to the user terminal.
In an exemplary embodiment of the present disclosure, acquiring configuration parameters uploaded by a user terminal includes:
and acquiring configuration parameters uploaded by the user terminals through a unified interface, wherein the unified interface is opened to each user terminal by a service platform, and the user receives the configuration parameters uploaded by the user terminals.
In an exemplary embodiment of the present disclosure, determining a target database based on the database connection string in the configuration parameters includes:
extracting a database identifier contained in a database connection string in the configuration parameters;
and determining the database corresponding to the database identifier as the target database.
In an exemplary embodiment of the present disclosure, determining whether the user terminal has a right to operate the target database based on the account and the password in the configuration parameters includes:
acquiring the identity of the user based on the account and the password in the configuration parameters;
comparing the identity identification with a preset authority configuration table to determine the database operation authority of the user terminal, wherein the configuration table stores each user identification and the database operation authority distributed to the corresponding user terminal;
and if the database operation authority of the user terminal supports the user terminal to operate the target database, determining that the user terminal has the authority to operate the target database.
In an exemplary embodiment of the present disclosure, connecting the target database includes:
and connecting the target database by calling a drive package corresponding to the target database, wherein the drive package is integrated in a service platform in advance.
In an exemplary embodiment of the present disclosure, acquiring a database operation instruction sent by a user terminal includes:
displaying an operation instruction input box on a display interface of the user terminal;
and acquiring a database operation instruction sent by the user terminal through the operation instruction input box.
In an exemplary embodiment of the present disclosure, before returning the operation result to the user terminal, the method includes:
and temporarily storing the operation result so that the operation result can be returned to the user terminal after the connection with the user terminal is reestablished under the condition that the connection with the user terminal is abnormal.
According to a second aspect of the present disclosure, there is provided an apparatus for operating a database, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring configuration parameters uploaded by a user terminal, and the configuration parameters comprise a database connection string, an account and a password;
the first determining module is used for determining a target database based on the database connection strings in the configuration parameters;
the second determining module is used for determining whether the user terminal has the authority to be connected with the target database or not based on the account and the password in the configuration parameters;
the connection module is used for connecting the target database if the user terminal has the authority to connect the target database;
the second acquisition module is used for acquiring a database operation instruction sent by the user terminal;
the operation module is used for carrying out corresponding operation on the target database based on the database operation instruction and acquiring an operation result;
and the return module is used for returning the operation result to the user terminal.
According to a third aspect of the present disclosure, there is provided an electronic device for operating a database, comprising:
a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to implement the above-described method.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method described above.
According to the method, a service platform is established, the platform can establish high-speed stable connection with a user terminal, and corresponding operation is carried out on a target database according to configuration parameters uploaded by the user terminal from a unified front-end interface; and the operation result of each time can be temporarily stored, even if the user terminal is disconnected with the user terminal in the midway, the user terminal can continue the operation process from the operation interruption position after the reconnection, the operation process does not need to be restarted from the beginning, and the efficiency of operating the database is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 shows a flow diagram of operating a database according to an example embodiment of the present disclosure.
FIG. 2 illustrates an apparatus block diagram of an operation database according to an example embodiment of the present disclosure.
Fig. 3 shows a detailed flowchart for determining a target database based on the database connection strings in the configuration parameters according to an example embodiment of the present disclosure.
Fig. 4 is a detailed flowchart illustrating determining whether the user terminal has a right to operate the target database based on the account and the password in the configuration parameters according to an example embodiment of the present disclosure.
Fig. 5 shows a detailed flowchart for acquiring a database operation instruction sent by a user terminal according to an example embodiment of the present disclosure.
FIG. 6 illustrates a system architecture diagram of an operations database according to an example embodiment of the present disclosure.
FIG. 7 illustrates an electronic device diagram of operating a database according to an example embodiment of the present disclosure.
FIG. 8 illustrates a computer-readable storage medium diagram of an operations database according to an example embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
An object of the present disclosure is to improve the efficiency of operating a database from a technical aspect. A method of operating a database according to one embodiment of the present disclosure includes: acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password; determining a target database based on the database connection strings in the configuration parameters; determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters; if the user terminal has the authority to operate the target database, connecting the target database; acquiring a database operation instruction sent by the user terminal; performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result; and returning the operation result to the user terminal. According to the method, a service platform is established, the platform can establish high-speed stable connection with a user terminal, and corresponding operation is carried out on a target database according to configuration parameters uploaded by the user terminal from a unified front-end interface; and the operation result of each time can be temporarily stored, even if the user terminal is disconnected with the user terminal in the midway, the user terminal can continue the operation process from the operation interruption position after the reconnection, the operation process does not need to be restarted from the beginning, and the efficiency of operating the database is improved.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
FIG. 1 shows a flow diagram of operating a database according to an example embodiment of the present disclosure:
step S100: acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password;
step S110: determining a target database based on the database connection strings in the configuration parameters;
step S120: determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters;
step S130: if the user terminal has the authority to operate the target database, connecting the target database;
step S140: acquiring a database operation instruction sent by the user terminal;
step S150: performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result;
step S160: and returning the operation result to the user terminal.
The implementation subject of the embodiment of the present disclosure is a service platform capable of implementing the method for operating a database. After the platform acquires the configuration parameters from the user terminal establishing the connection, whether the user terminal has the authority to operate the target database or not is determined from the configuration parameters. If the user terminal has the authority to operate the target database, the service platform replaces the user terminal to perform corresponding operation on the target database according to the configuration parameters, and finally returns an operation result to the user terminal.
Hereinafter, each step of the above-described operation database in the present exemplary embodiment will be explained and explained in detail with reference to the drawings.
In step S100, configuration parameters uploaded by the user terminal are obtained, where the configuration parameters include a database connection string, an account, and a password.
The database connection string is a database connection character string used for establishing connection with a database, and comprises a database identifier.
In an embodiment, obtaining configuration parameters uploaded by a user terminal includes: and acquiring configuration parameters uploaded by the user terminal through a unified interface, wherein the unified interface is opened to each user terminal by a service platform and is used for receiving the configuration parameters uploaded by the user terminal.
In this embodiment, the service platform provides a uniform parameter configuration interface to each user terminal at the front end, so that the user terminal can upload configuration parameters to the platform through the interface. The configuration parameters comprise a database connection string, an account number and a password. The database connection string specifies the type or the identification of a target database to be connected with the user terminal; the account and password are used to enable the platform to verify the identity of the user terminal.
The embodiment has the advantages that each user terminal can configure the parameters through the uniform interface, so that the service platform can receive the configuration parameters in the uniform format, and the efficiency of processing the configuration parameters by the service platform is improved.
In step S110, a target database is determined based on the database connection string in the configuration parameters.
The target database refers to a database operated by a user terminal target.
In one embodiment, as shown in fig. 3, step S110 includes:
step S1101: extracting a database identifier contained in a database connection string in the configuration parameters;
step S1102: and determining the database corresponding to the database identifier as the target database.
The database identification refers to information capable of uniquely identifying the database, for example, a unique number of the database.
In an embodiment, the service platform receives the configuration parameters uploaded by the user terminal, extracts a database identifier from a database connection string in the configuration parameters, and the database corresponding to the database identifier is a database for operating the user terminal target. The service platform compares the database identification with a preset database identification table, finds a corresponding database, and determines the database as a target database. The database identification table describes the addresses of the databases corresponding to the database identifications, so that the service platform can determine the corresponding databases according to the database identifications through the database identification table.
This embodiment has the advantage that the target database can be determined quickly by means of the database identification contained in the database connection string.
In step S120, it is determined whether the user terminal has the right to operate the target database based on the account and the password in the configuration parameters.
In one embodiment, as shown in fig. 4, step S120 includes:
step S1201: acquiring the identity of the user based on the account and the password in the configuration parameters;
step S1202: comparing the identity identification with a preset authority configuration table to determine the database operation authority of the user terminal, wherein the configuration table stores each user identification and the database operation authority distributed to the corresponding user terminal;
step S1203: and if the database operation authority of the user terminal supports the user terminal to operate the target database, determining that the user terminal has the authority to operate the target database.
The identification refers to information capable of uniquely identifying the user, for example, an ID of the user.
In one embodiment, before providing the database operation service to the user terminal, the service platform needs to determine whether the user terminal has the right to operate the target database. Firstly, the service platform acquires the identity of the user, for example, the ID of the user, through the account and the password in the configuration parameters. And then comparing the identity of the user with a preset authority configuration table to determine the database operation authority of the user terminal. And if the database operation authority of the user terminal supports the user terminal to operate the target database, determining that the user terminal has the authority to operate the target database. For example, the number of the target database is 001, and the database operation authority of the user terminal is as follows: the database with the number of 001-005 can be operated, so that the user terminal is determined to have the authority to operate the target database.
The process of operating the target database is described below.
In step S130, if the user terminal has the right to operate the target database, the target database is connected.
After determining that the user terminal has the authority to operate the target database, the service platform firstly establishes connection with the target database in order to replace the user terminal to operate the target database.
In one embodiment, connecting the target database includes:
and connecting the target database by calling a drive package corresponding to the target database, wherein the drive package is integrated in a service platform in advance.
In one embodiment, a driver package capable of driving each database is integrated into the service platform. When the service platform needs to be connected with a specific database, the specific database can be connected only by calling and running the drive package corresponding to the specific database.
In step S140, a database operation instruction sent by the user terminal is acquired.
In one embodiment, as shown in fig. 5, step S140 includes:
step S1401: displaying an operation instruction input box on a display interface of the user terminal;
step S1402: and acquiring a database operation instruction sent by the user terminal through the operation instruction input box.
In an embodiment, after the service platform establishes a connection with the target database, in order to operate the target database, an operation instruction needs to be obtained from the user terminal. The service platform displays an operation instruction input box on the display interface of the user terminal, so that a user can input a database operation instruction in the operation instruction input box of the user terminal.
The embodiment has the advantage that after the database operation instruction is received from the user terminal, the service platform and the database operation instruction perform corresponding operation on the target database, so that in the operation process of the target database, even if the connection between the user terminal and the service platform is interrupted, the operation on the target database cannot be influenced.
In step S150, based on the database operation instruction, corresponding operation is performed on the target database, and an operation result is obtained.
The operation result refers to a result returned from the database corresponding to the database operation instruction, for example, a specific field, a response code.
In an embodiment, the service platform receives a database operation instruction, and performs corresponding operation on the target database according to the specific content of the database operation instruction. For example, the addition, deletion, search and modification of specific data in the target database. And receiving the returned operation result from the target database.
In step S160, the operation result is returned to the user terminal.
In an embodiment, before returning the operation result to the user terminal, the method includes:
and temporarily storing the operation result so that the operation result can be returned to the user terminal after the connection with the user terminal is reestablished under the condition that the connection with the user terminal is abnormal.
Due to the connection between the user terminal and the service platform, a connection abnormality may occur, for example, due to channel fluctuation, and the connection between the user terminal and the service platform is interrupted. In this case, in order to enable the user terminal to continue the operation process after the connection is reestablished, the service platform temporarily stores the operation result for a predetermined time (for example, 10min) each time it acquires the operation result from the target database. If the user terminal and the service platform are connected again within the preset time, the service platform sends the operation result to the user terminal, so that the user terminal can continue the operation process according to the operation result.
The embodiment has the advantages that the reconnected user terminal can continue the operation process under the condition of midway disconnection with the user terminal without carrying out all operation processes again, and the efficiency of operating the database is improved.
In an embodiment, as shown in fig. 2, there is provided an apparatus for operating a database, which specifically includes:
a first obtaining module 210, configured to obtain configuration parameters uploaded by a user terminal, where the configuration parameters include a database connection string, an account, and a password;
a first determining module 220, configured to determine a target database based on the database connection string in the configuration parameters;
a second determining module 230, configured to determine whether the user terminal has an authority to operate the target database based on the account and the password in the configuration parameters;
a connection module 240, configured to connect the target database if the user terminal has a right to operate the target database;
a second obtaining module 250, configured to obtain a database operation instruction sent by the user terminal;
an operation module 260, configured to perform corresponding operation on the target database based on the database operation instruction, and obtain an operation result;
a returning module 270, configured to return the operation result to the user terminal.
The implementation process of the functions and actions of each module in the device is specifically detailed in the implementation process of the corresponding step in the method for operating the database, and is not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
FIG. 6 illustrates a system architecture diagram of an operations database according to an example embodiment of the present disclosure. The system architecture includes: user terminal 310, service platform 320, database 330.
In one embodiment, a user terminal 310 requests the service platform 320 to operate on a database 330 and upload configuration parameters through the front-end interface of the service platform. The service platform 320 authenticates the authority of the user terminal 310 based on the configuration parameters. After determining that the user terminal 310 has the right to connect to the database 330, receiving a database operation instruction sent by the user terminal 310, and performing corresponding operation on the database 330 according to the database operation instruction. Obtains the operation result from the database 330 and returns the operation result to the user terminal 310.
From the above description of the system architecture, those skilled in the art will readily understand that the system architecture described herein can implement the functions of the various modules in the apparatus for operating a database shown in fig. 2.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 400 according to this embodiment of the invention is described below with reference to fig. 7. The electronic device 400 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, electronic device 400 is embodied in the form of a general purpose computing device. The components of electronic device 400 may include, but are not limited to: the at least one processing unit 410, the at least one memory unit 420, and a bus 430 that couples various system components including the memory unit 420 and the processing unit 410.
Wherein the storage unit stores program code that is executable by the processing unit 410 to cause the processing unit 410 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 410 may perform step S100 as shown in fig. 1: acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password; step S110: determining a target database based on the database connection strings in the configuration parameters; step S120: determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters; step S130: if the user terminal has the authority to operate the target database, connecting the target database; step S140: acquiring a database operation instruction sent by the user terminal; step S150: performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result; step S160: and returning the operation result to the user terminal.
The storage unit 420 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)4201 and/or a cache memory unit 4202, and may further include a read only memory unit (ROM) 4203.
The storage unit 420 may also include a program/utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 430 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 400 may also communicate with one or more external devices 500 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 400 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 450. Also, the electronic device 400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 460. As shown, the network adapter 460 communicates with the other modules of the electronic device 400 over the bus 430. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 8, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of operating a database, the method comprising:
acquiring configuration parameters uploaded by a user terminal, wherein the configuration parameters comprise a database connection string, an account and a password;
determining a target database based on the database connection strings in the configuration parameters;
determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters;
if the user terminal has the authority to operate the target database, connecting the target database;
acquiring a database operation instruction sent by the user terminal;
performing corresponding operation on the target database based on the database operation instruction, and acquiring an operation result;
and returning the operation result to the user terminal.
2. The method of claim 1, wherein the obtaining the configuration parameters uploaded by the user terminal comprises:
and acquiring configuration parameters uploaded by the user terminals through a unified interface, wherein the unified interface is opened to each user terminal by a service platform and is used for receiving the configuration parameters uploaded by the user terminals.
3. The method of claim 1, wherein determining a target database based on the database connection string in the configuration parameters comprises:
extracting a database identifier contained in a database connection string in the configuration parameters;
and determining the database corresponding to the database identifier as the target database.
4. The method of claim 1, wherein the determining whether the user terminal has permission to operate the target database based on the account and the password in the configuration parameters comprises:
acquiring the identity of the user based on the account and the password in the configuration parameters;
comparing the identity identification with a preset authority configuration table to determine the database operation authority of the user terminal, wherein the configuration table stores each user identification and the database operation authority distributed to the corresponding user terminal;
and if the database operation authority of the user terminal supports the user terminal to operate the target database, determining that the user terminal has the authority to operate the target database.
5. The method of claim 1, wherein said connecting said target database comprises:
and connecting the target database by calling a drive package corresponding to the target database, wherein the drive package is integrated in a service platform in advance.
6. The method of claim 1, wherein the obtaining the database operation instruction sent by the user terminal comprises:
displaying an operation instruction input box on a display interface of the user terminal;
and acquiring a database operation instruction sent by the user terminal through the operation instruction input box.
7. The method of claim 1, wherein before returning the operation result to the ue, the method comprises:
and temporarily storing the operation result so that the operation result can be returned to the user terminal after the connection with the user terminal is reestablished under the condition that the connection with the user terminal is abnormal.
8. An apparatus for operating a database, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring configuration parameters uploaded by a user terminal, and the configuration parameters comprise a database connection string, an account and a password;
the first determining module is used for determining a target database based on the database connection strings in the configuration parameters;
the second determining module is used for determining whether the user terminal has the authority to operate the target database or not based on the account and the password in the configuration parameters;
the connection module is used for connecting the target database if the user terminal has the authority to operate the target database;
the second acquisition module is used for acquiring a database operation instruction sent by the user terminal;
the operation module is used for carrying out corresponding operation on the target database based on the database operation instruction and acquiring an operation result;
and the return module is used for returning the operation result to the user terminal.
9. An electronic device for operating a database, comprising:
a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to perform the method of any of claims 1-7.
10. A computer-readable storage medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN201910823220.7A 2019-09-02 2019-09-02 Method and device for operating database, electronic equipment and storage medium Pending CN110716915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910823220.7A CN110716915A (en) 2019-09-02 2019-09-02 Method and device for operating database, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910823220.7A CN110716915A (en) 2019-09-02 2019-09-02 Method and device for operating database, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110716915A true CN110716915A (en) 2020-01-21

Family

ID=69209686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910823220.7A Pending CN110716915A (en) 2019-09-02 2019-09-02 Method and device for operating database, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110716915A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095343A1 (en) * 2013-09-27 2015-04-02 Oracle International Corporation Cloud database connection multiplexing
CN104951481A (en) * 2014-03-31 2015-09-30 中国移动通信集团云南有限公司 Method and device for managing database connection
CN109344653A (en) * 2018-10-16 2019-02-15 顺丰科技有限公司 A kind of method, apparatus, system, equipment and storage medium connecting database
US20200226300A1 (en) * 2017-10-03 2020-07-16 Hewlett-Packard Development Company, L.P. Identifier of a client device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095343A1 (en) * 2013-09-27 2015-04-02 Oracle International Corporation Cloud database connection multiplexing
CN104951481A (en) * 2014-03-31 2015-09-30 中国移动通信集团云南有限公司 Method and device for managing database connection
US20200226300A1 (en) * 2017-10-03 2020-07-16 Hewlett-Packard Development Company, L.P. Identifier of a client device
CN109344653A (en) * 2018-10-16 2019-02-15 顺丰科技有限公司 A kind of method, apparatus, system, equipment and storage medium connecting database

Similar Documents

Publication Publication Date Title
CN109766082B (en) Method and device for application program page jump
CN110580244A (en) file processing method and device, server and storage medium
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN111324441A (en) Operating environment switching method and device, computer equipment and storage medium
EP4095686A2 (en) Method for switching skin of mini-program page, and electronic device
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN109460363B (en) Automatic testing method and device, electronic equipment and computer readable medium
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN109726039B (en) Method and apparatus for managing virtual machines
US10061686B2 (en) Method, electronic apparatus, system, and storage medium for automated testing of application user interface
CN110716915A (en) Method and device for operating database, electronic equipment and storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN109740027B (en) Data exchange method, device, server and storage medium
CN114237684A (en) Component management system, method, device, electronic device and storage medium
CN112288396A (en) Multi-system user attribute information management method and device and electronic equipment
JP2016009225A (en) Database management device, database management method, program, and recording medium
CN112711572A (en) Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN112328272B (en) Algorithm upgrading method, device, equipment and storage medium
EP4080915B1 (en) Connection method and apparatus, electronic device, storage medium and program product
CN109639686B (en) Distributed webpage filtering method and device, electronic equipment and storage medium
CN111460273B (en) Information pushing method and device
CN109388536B (en) Data collection method and device
CN115705387A (en) File generation method and device, terminal equipment and computer medium
CN113760921A (en) Method and device for creating dictionary value
CN117708220A (en) Internet of things equipment information display method based on cloud technology and cloud management platform

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