CN110716960A - Database query method, device, equipment and storage medium - Google Patents

Database query method, device, equipment and storage medium Download PDF

Info

Publication number
CN110716960A
CN110716960A CN201911007577.4A CN201911007577A CN110716960A CN 110716960 A CN110716960 A CN 110716960A CN 201911007577 A CN201911007577 A CN 201911007577A CN 110716960 A CN110716960 A CN 110716960A
Authority
CN
China
Prior art keywords
database
connection pool
connection
user side
target database
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.)
Granted
Application number
CN201911007577.4A
Other languages
Chinese (zh)
Other versions
CN110716960B (en
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201911007577.4A priority Critical patent/CN110716960B/en
Publication of CN110716960A publication Critical patent/CN110716960A/en
Application granted granted Critical
Publication of CN110716960B publication Critical patent/CN110716960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24558Binary matching operations
    • G06F16/2456Join operations
    • 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/245Query processing
    • G06F16/2452Query translation

Abstract

The embodiment of the invention discloses a database query method, a database query device, database query equipment and a storage medium. Wherein, the method comprises the following steps: acquiring a target database selected by a user from the databases to be queried in the connection pool; and establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in a connection pool, so that the user side inquires the target database based on the established communication connection. According to the embodiment of the invention, the target database is selected from the databases to be inquired in the connection pool, so that the cache space for storing the selected target database is provided, and the pertinence of database selection is improved; and the communication connection between the user side and the target database is established through the connection pool, so that the query efficiency of the database is improved.

Description

Database query method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the internet technology, in particular to a database query method, a database query device, database query equipment and a storage medium.
Background
With the development of computers and information technology, the use of databases for data storage of different services has become a necessary trend and has been widely used.
In the prior art, when a database is queried and used, the database is usually manually screened according to actual requirements or screened by compiling codes, and then a large amount of data is queried in different operations by compiling the codes.
However, when the existing database Query method is used for querying a database, a professional programmer is usually required to inject SQL (Structured Query Language) statements into the database for implementation, and a large amount of databases simultaneously open resources, which causes waste of storage space, and the specialties of writing codes and Query statements are strong, which requires a large amount of time and effort, and the database Query method has poor operability and low data Query efficiency.
Disclosure of Invention
The embodiment of the invention provides a database query method, a database query device and a storage medium, wherein the target database is selected from databases to be queried in a connection pool, and communication connection between a user side and the target database is established according to a selection result, so that the target database selection is targeted, and the data query efficiency is improved.
In a first aspect, an embodiment of the present invention provides a database query method, where the method includes:
acquiring a target database selected by a user from the databases to be queried in the connection pool;
and establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in a connection pool, so that the user side inquires the target database based on the established communication connection.
Optionally, before obtaining the target database selected by the user from the databases to be queried in the connection pool, the method further includes:
responding to a connection request of any database to be connected in a connection pool, and verifying configuration information of the database to be connected in the connection pool;
and if the verification is passed, distributing a communication channel for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool so as to take the database to be connected as the database to be inquired of the connection pool.
Optionally, the checking the configuration information of the database to be connected in the connection pool includes:
and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
Optionally, the method further includes:
and in response to an addition request comprising the configuration information of any database, adding the configuration information of the database into the connection pool so as to use the database as a to-be-connected database of the connection pool.
Optionally, after establishing the communication connection between the user side and the target database, the method further includes:
responding to an association request for any query operation in a target database, and recording the query operation information; wherein, the query operation information at least comprises the query operation result;
and if the query operation is detected to be executed again on the target database, displaying the query operation information.
In a second aspect, an embodiment of the present invention further provides a database query apparatus, where the apparatus includes:
the target database acquisition module is used for acquiring a target database selected by a user from the databases to be inquired in the connection pool;
and the target database query module is used for establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in the connection pool, so that the user side queries the target database based on the established communication connection.
Optionally, the apparatus further comprises:
the database to be connected checking module is used for responding to a connection request of any database to be connected in a connection pool and checking the configuration information of the database to be connected in the connection pool;
and the communication channel distribution module is used for distributing communication channels for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool if the verification is passed so as to take the database to be connected as the database to be inquired of the connection pool.
Optionally, the to-be-connected database checking module is specifically configured to:
and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the database query method according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the database query method according to any of the embodiments of the present invention.
The embodiment of the invention selects the target database from the databases to be queried in the connection pool, and establishes the communication connection between the user terminal and the target database according to the selection result, thereby solving the problem of data query through a complex program language in the prior art, realizing the pertinence of target database selection and the operability of database query, and improving the efficiency of data query.
Drawings
Fig. 1 is a schematic flowchart of a database query method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a database connection configuration interface according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an operation interface for database query according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a database query method according to a second embodiment of the present invention;
fig. 5 is a block diagram of a database query device according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device in the fourth 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 schematic flow chart of a database query method according to an embodiment of the present invention, which is applicable to a database query operation, and the method can be executed by a database query device. As shown in fig. 1, the method specifically includes the following steps:
and step 110, acquiring a target database selected by a user from the databases to be inquired in the connection pool.
The user inputs information such as a personal account number, a password or an authentication code and the like on the computer equipment to log in a visual interface of the user side, and the computer equipment can be equipment such as a computer and the like. Connection pooling is a buffer pooling technique for creating and managing connections in which connection configurations of a database to be queried are stored. The database to be queried is a database of which a communication channel exists in the connection pool, and the target database is any database to be queried in the connection pool. The user selects a target database from the database to be queried, the server obtains a selection instruction of the user, selects a communication channel corresponding to the target database from the distributed communication channels in the connection pool, and connects the communication channel to the user side to realize the operation of the target database.
Optionally, before obtaining the target database selected by the user from the databases to be queried in the connection pool, the method further includes: responding to a connection request for any database to be connected in the connection pool, and verifying the configuration information of the database to be connected in the connection pool; and if the verification is passed, distributing a communication channel for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool so as to use the database to be connected as the database to be inquired of the connection pool.
Specifically, the configuration information of the database to be connected is stored in the connection pool, but the database to be connected is not connected with the communication channel of the user side, the user sends a connection instruction of the database to be connected to the server on the visual interface of the user side, the server responds to the connection request of the user side, connection between the user side and the connection pool is established, and the configuration information of the database to be connected in the connection pool is compared with the configuration information of the legal database in the server for verification. If the verification is passed, the server sends a sign of successful verification to the database to be connected in the connection pool, and a communication channel of the database to be connected is distributed to the user side in the connection pool through the connection between the user side and the connection pool, and the database to be connected which is successfully verified in the connection pool is the database to be inquired; if the verification fails, the server sends a verification failure mark to the database to be connected in the connection pool, and the user side cannot distribute a communication channel with the database to be connected. And after the databases to be connected are verified through the connection pool, sequentially selecting target databases from the successfully verified databases to be inquired. The communication channel from the connection pool to the target database is unique, and when multiple users use the same target database, each user is connected with the unique communication channel of the target data through the connection pool, so that the situation that each user establishes a communication channel for the target database is avoided, the resource space is saved, and the query efficiency of the database is improved.
Optionally, the checking the configuration information of the database to be connected in the connection pool includes: and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
Specifically, a user selects any database to be connected on a visual interface of a user side for connection inspection, whether a legal database matched with configuration information of the database to be connected exists in a server or not is determined, and if yes, the database to be connected is verified successfully; if not, the to-be-connected database fails to be checked. The configuration information of the database may include: database connection addresses, ports, remarks, database names, etc. Through pre-verification, the user is reminded of knowing whether the configuration information of the target database is correct, errors are avoided when the user formally inquires, the reason of the errors is clear for the user, the inquiry efficiency is improved, and the user experience is improved.
Optionally, in response to an addition request including configuration information of any database, adding the configuration information of the database to the connection pool to use the database as a to-be-connected database of the connection pool.
Specifically, a user sends an adding request of configuration information of a database to a server through a visual interface of a user side, the server responds to the adding request of the user, the user adds the configuration information of the database to a connection pool, and the added database is a database to be connected. All databases to be inquired by the user can be recorded, the range of database inquiry of the user is narrowed, and the subsequent verification of the user is more targeted.
For example, fig. 2 is a schematic diagram of a database connection configuration interface according to a first embodiment of the present invention. The user clicks a 'newly added' control on the interface, and adds configuration information of the database to be connected, wherein the configuration information can be that the database connection address is 192.168.56.11, the port is 1880, the remark is test information, and the name is a certain sql database. The user can add a plurality of databases to be connected, and after the user adds all the databases to be connected, the user can select one of the databases to be connected, click the 'test' control on the interface, and perform connection verification of the configuration information on the databases to be connected. If the configuration information of the database to be connected is matched with the configuration information of the legal database of the server, the verification is successful, the server sends a sign of successful verification to the database to be connected, the database to be connected is the database to be inquired, communication channels are distributed for the user side and the database to be inquired in the connection pool through the connection between the user side and the connection pool, and the user can select a target database from the data center to be inquired to carry out sequential inquiry operation.
And 120, establishing communication connection between the user side and the target database through communication channels which are distributed to the user side and the target database in advance in the connection pool, and enabling the user side to inquire the target database based on the established communication connection.
The server obtains an instruction of a user for selecting a target database from the database to be queried, searches communication channels between the connection pool and the target database from the communication channels between the connection pool and the database to be queried to establish communication connection, and enables the user to query the target database based on the established communication connection. The user can select the data table in the target database to perform data query, sorting, merging and the like. For example, fig. 3 is a schematic diagram of a database query operation interface in the first embodiment of the present invention. The user can perform operations such as single operation action and multi-operation action on the data table in the target database through the visual interface. The server obtains an input operation of a user on the visual interface, for example, the user performs a data sorting operation on a selected data table, the server forms an SQL variable for the input operation of the user, the SQL variable is a key for executing a corresponding input operation, and the key for the data sorting operation may be an Order by, a query object, a sorting sequence, and the like.
The server translates the SQL variables into encapsulated SQL language structures that the database can recognize. The packaged SQL language structure can be divided into four parts, the first part is a data definition language, common keywords of the data definition language include create, drop and alter, and the common keywords are directed at the operation of a database logic structure; the second part is a data operation language, and commonly used keywords are insert, update and delete, and specific data change is aimed at; the third part is data query language, common keywords comprise select query statement, and specific data screening and filtering are aimed at; the fourth part is data management language, the common keywords have grant (assigned authority), and the authority management of specific data is aimed at. The packaged SQL language structure can construct a visual graph and display the visual graph in a visual interface, so that a universal standard SQL language structure is convenient to use. And the user side and the target database are transmitted and delivered through the packaged SQL language structure, the target database returns the result of successful execution to the user side and displays the result on the visual interface, and if the packaged SQL language structure is not successfully executed, the result is fed back to the visual interface and prompt information of failed execution is generated. For example, the language structure of a correct encapsulated SQL is:
select count(*)from S003.WA_SOURCE_Z002_9998where(“101200Z”=’13992777199’or”220040B”=’13992777199’)and H010014between’1534521600’and’1535126400’。
according to the technical scheme of the embodiment, the target database is selected from the databases to be inquired in the connection pool by the user, so that the target database is selected in a targeted manner, the operation is convenient, and codes do not need to be compiled; the communication connection between the user side and the target database is established through the communication channel which is distributed to the user side and the target database in advance in the connection pool, the connection pool provides a cache space for connecting the user side and the target database, the situation that the user needs to reestablish the communication connection channel when connecting the target database every time is avoided, waste of the storage space is reduced, and operability and query efficiency of data query are improved.
Example two
Fig. 4 is a flowchart illustrating a database query method according to a second embodiment of the present invention, which is further optimized based on the first embodiment and can be executed by a database query device. As shown in fig. 4, the database query method provided in this embodiment specifically includes the following steps:
and step 410, acquiring a target database selected by a user from the databases to be queried in the connection pool.
The method comprises the steps of adding a database to be connected into a connection pool from a user side, checking configuration information of the database to be connected, taking the database to be connected which passes the checking as a database to be inquired, distributing a communication channel between the user side and the database to be inquired through the connection pool, and selecting a target database to be inquired from the database to be inquired.
Step 420, establishing a communication connection between the user side and the target database through a communication channel pre-allocated to the user side and the target database in the connection pool, so that the user side queries the target database based on the established communication connection.
After the user selects the target database at the user side, the connection pool selects the target database from the communication channels of the database to be queried and the user side to establish communication connection with the communication channel of the user side, and the user side queries the target database based on the communication connection established by the connection pool.
Step 430, responding to the association request of any query operation in the target database, and recording the query operation information; wherein, the query operation information at least comprises the query operation result; and if the query operation is detected to be executed again on the target database, displaying the query operation information.
After the user opens the query operation interface of the target database at the user side, the user performs data query and other operations on the data table of the target database. And the server calculates or confirms the data in the data table according to the query operation of the user, so as to obtain a query operation result. The user can associate the specific query operation and the query result on the data table, and memorize the query operation information of the user. The query operation information may include a query operation input by a user, a query operation result, and an operation object, and the operation object may be any data table. The server receives the association request of the user, stores the query operation result corresponding to the query operation in the operated data table, and directly calls the query operation result to be displayed on the visual interface without recalculation if the user wants to review the query operation result in the data table.
For example, the server performs an operation of adding the data of the first column and the data of the second column in the data table 1 by the user side, where the data of the first column is 10 and 20, the data of the second column is 15 and 15, the server receives an addition request of the user side for the data of the first column and the data of the second column, and calculates to obtain data results after the data of the two columns are added, and the results are 25 and 35. The user end sends out the association request of the operation and the operation result, the server receives the association request of the user end, and the added results of the first column and the second column of the data table are stored as 25 and 35. If the user wants to check the result of the addition of the first column and the second column of the data table again after performing a series of other query operations on the data table, the server receives an operation request of the user for the addition of the first column and the second column of the data table, and directly displays the results 25 and 35 on the interface without recalculation, thereby saving the query operation time of the user and improving the query operation efficiency of the data.
According to the embodiment of the invention, the target database selected by the user from the databases to be queried in the connection pool is obtained, and then the communication connection between the user side and the target database is established through the connection pool, so that the user queries the target database. The targeted selection of the target database is realized, and the operability of data query is improved. By associating the query operation of the user on the specific data table with the query operation result, the computing time of the server for the repeated query operation is saved, and the efficiency of data query is improved.
EXAMPLE III
Fig. 5 is a block diagram of a database query apparatus according to a third embodiment of the present invention, which is capable of executing a database query method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 5, the apparatus specifically includes:
a target database obtaining module 501, configured to obtain a target database selected by a user from databases to be queried in a connection pool;
the target database query module 502 is configured to establish a communication connection between the user side and the target database through a communication channel pre-allocated to the user side and the target database in the connection pool, so that the user side queries the target database based on the established communication connection.
Optionally, the apparatus further comprises:
the database to be connected checking module is used for responding to a connection request of any database to be connected in the connection pool and checking the configuration information of the database to be connected in the connection pool;
and the communication channel distribution module is used for distributing communication channels for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool if the verification is passed so as to take the database to be connected as the database to be inquired of the connection pool.
Optionally, the to-be-connected database checking module is specifically configured to:
and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
Optionally, the apparatus further comprises:
and the database to be connected adding module is used for responding to an adding request comprising the configuration information of any database, adding the configuration information of the database into the connection pool, and taking the database as the database to be connected of the connection pool.
Optionally, the apparatus further comprises:
the query operation association module is used for responding to an association request of any query operation in the target database and recording the query operation information; wherein, the query operation information at least comprises the query operation result;
and the query operation information display module is used for displaying the query operation information if the query operation is detected to be executed again on the target database.
The embodiment of the invention determines the target database according to the selection operation of the user from the database to be inquired in the connection pool, establishes the communication connection between the user side and the target database through the communication channel which is pre-distributed for the user side and the target database in the connection pool, provides the cache space for connecting the user side and the target database by the connection pool, realizes the targeted selection of the target database, is convenient to operate, avoids the situation that the user reestablishes the communication connection channel when connecting the target database every time, reduces the waste of storage space, and improves the efficiency of data inquiry.
Example four
Fig. 6 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary computer device 600 suitable for use in implementing embodiments of the invention. The computer device 600 shown in fig. 6 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 6, computer device 600 is in the form of a general purpose computing device. The components of computer device 600 may include, but are not limited to: one or more processors or processing units 601, a system memory 602, and a bus 603 that couples various system components including the system memory 602 and the processing unit 601.
Bus 603 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 600 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 600 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 602 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)604 and/or cache memory 605. The computer device 600 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 606 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 603 by one or more data media interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 608 having a set (at least one) of program modules 607 may be stored, for example, in memory 602, such program modules 607 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
The computer device 600 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), with one or more devices that enable a user to interact with the computer device 600, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 611. Moreover, the computer device 600 may also 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 612. As shown, a network adapter 612 communicates with the other modules of the computer device 600 via the bus 603. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 600, 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.
The processing unit 601 executes various functional applications and data processing by running the program stored in the system memory 602, for example, implementing the database query method provided by the embodiment of the present invention, including:
acquiring a target database selected by a user from the databases to be queried in the connection pool;
and establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in the connection pool, and enabling the user side to inquire the target database based on the established communication connection.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for querying a database according to the fifth embodiment of the present invention is implemented, where the method includes:
acquiring a target database selected by a user from the databases to be queried in the connection pool;
and establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in the connection pool, and enabling the user side to inquire the target database based on the established communication connection.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer 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 computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer 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.
A computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer 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.
Computer 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, Smalltalk, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or computer device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 query method, comprising:
acquiring a target database selected by a user from the databases to be queried in the connection pool;
and establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in a connection pool, so that the user side inquires the target database based on the established communication connection.
2. The method according to claim 1, before obtaining the target database selected by the user from the databases to be queried in the connection pool, further comprising:
responding to a connection request of any database to be connected in a connection pool, and verifying configuration information of the database to be connected in the connection pool;
and if the verification is passed, distributing a communication channel for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool so as to take the database to be connected as the database to be inquired of the connection pool.
3. The method according to claim 2, wherein checking the configuration information of the database to be connected in the connection pool comprises:
and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
4. The method of claim 1, further comprising:
and in response to an addition request comprising the configuration information of any database, adding the configuration information of the database into the connection pool so as to use the database as a to-be-connected database of the connection pool.
5. The method of claim 1, further comprising, after establishing the communication connection between the user terminal and the target database:
responding to an association request for any query operation in a target database, and recording the query operation information; wherein, the query operation information at least comprises the query operation result;
and if the query operation is detected to be executed again on the target database, displaying the query operation information.
6. A database query device, comprising:
the target database acquisition module is used for acquiring a target database selected by a user from the databases to be inquired in the connection pool;
and the target database query module is used for establishing communication connection between the user side and the target database through a communication channel which is distributed to the user side and the target database in advance in the connection pool, so that the user side queries the target database based on the established communication connection.
7. The apparatus of claim 6, further comprising:
the database to be connected checking module is used for responding to a connection request of any database to be connected in a connection pool and checking the configuration information of the database to be connected in the connection pool;
and the communication channel distribution module is used for distributing communication channels for the user side and the database to be connected in the connection pool through the connection between the user side and the connection pool if the verification is passed so as to take the database to be connected as the database to be inquired of the connection pool.
8. The apparatus according to claim 7, wherein the to-be-connected database verification module is specifically configured to:
and matching the configuration information of the database to be connected in the connection pool with the configuration information of the legal database in the server to obtain a verification result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the database query method of any one of claims 1-5 when executing the program.
10. A storage medium containing computer-executable instructions for performing the database query method of any one of claims 1-5 when executed by a computer processor.
CN201911007577.4A 2019-10-22 2019-10-22 Database query method, device, equipment and storage medium Active CN110716960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911007577.4A CN110716960B (en) 2019-10-22 2019-10-22 Database query method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911007577.4A CN110716960B (en) 2019-10-22 2019-10-22 Database query method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110716960A true CN110716960A (en) 2020-01-21
CN110716960B CN110716960B (en) 2022-07-15

Family

ID=69214006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911007577.4A Active CN110716960B (en) 2019-10-22 2019-10-22 Database query method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110716960B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898910A (en) * 2020-07-30 2020-11-06 上海新朋程信息科技有限公司 Data acquisition method
CN112860705A (en) * 2021-03-09 2021-05-28 上海华客信息科技有限公司 Database connection configuration information management method, system, device and storage medium
CN114416774A (en) * 2022-01-05 2022-04-29 深圳萨摩耶数字科技有限公司 Cross-platform multi-data-source data fetching method and device, electronic equipment and storage medium

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070198684A1 (en) * 2006-02-22 2007-08-23 Kazunori Mizushima Method and system for data processing with connection pool for the same
US20080104613A1 (en) * 2006-10-27 2008-05-01 Purdue Pharma L.P. Adverse event data capture software, systems and methodologies
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method
CN102859521A (en) * 2010-04-30 2013-01-02 国际商业机器公司 Centralized control of database applications
CN102982141A (en) * 2012-11-20 2013-03-20 北京搜狐新媒体信息技术有限公司 Method and device for realizing distributed database agent
CN103064960A (en) * 2012-12-31 2013-04-24 华为技术有限公司 Method and equipment for database query
US8484242B1 (en) * 2010-08-24 2013-07-09 ScalArc, Inc. Method and system for transparent database connection pooling and query queuing
US8543554B1 (en) * 2010-08-10 2013-09-24 ScalArc Inc. Method and system for transparent database query caching
US20160034582A1 (en) * 2013-06-29 2016-02-04 Huawei Technologies Co., Ltd. Computing device and method for executing database operation command
US20160182401A1 (en) * 2014-12-19 2016-06-23 International Business Machines Corporation Connection pool management
CN107357831A (en) * 2017-06-21 2017-11-17 信雅达系统工程股份有限公司 Configurable flow instance data distribution formula storage method and system
CN107423303A (en) * 2016-05-24 2017-12-01 北京京东尚科信息技术有限公司 The method and system of data syn-chronization
CN108733720A (en) * 2017-04-24 2018-11-02 北京京东尚科信息技术有限公司 The on-line testing method and check system of the SQL query of multiple database type
CN109522321A (en) * 2018-11-15 2019-03-26 北京锐安科技有限公司 A kind of data base query method, device, server and storage medium
CN109766362A (en) * 2018-12-28 2019-05-17 北京字节跳动网络技术有限公司 Data processing method and device
CN110019350A (en) * 2017-07-28 2019-07-16 北京京东尚科信息技术有限公司 Data query method and apparatus based on configuration information
CN110191428A (en) * 2019-05-27 2019-08-30 北京鸿联九五信息产业有限公司 A kind of data distributing method based on intelligent cloud platform

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070198684A1 (en) * 2006-02-22 2007-08-23 Kazunori Mizushima Method and system for data processing with connection pool for the same
US20080104613A1 (en) * 2006-10-27 2008-05-01 Purdue Pharma L.P. Adverse event data capture software, systems and methodologies
CN102117309A (en) * 2010-01-06 2011-07-06 卓望数码技术(深圳)有限公司 Data caching system and data query method
CN102859521A (en) * 2010-04-30 2013-01-02 国际商业机器公司 Centralized control of database applications
US8543554B1 (en) * 2010-08-10 2013-09-24 ScalArc Inc. Method and system for transparent database query caching
US8484242B1 (en) * 2010-08-24 2013-07-09 ScalArc, Inc. Method and system for transparent database connection pooling and query queuing
CN102982141A (en) * 2012-11-20 2013-03-20 北京搜狐新媒体信息技术有限公司 Method and device for realizing distributed database agent
CN103064960A (en) * 2012-12-31 2013-04-24 华为技术有限公司 Method and equipment for database query
US20160034582A1 (en) * 2013-06-29 2016-02-04 Huawei Technologies Co., Ltd. Computing device and method for executing database operation command
US20160182401A1 (en) * 2014-12-19 2016-06-23 International Business Machines Corporation Connection pool management
CN107423303A (en) * 2016-05-24 2017-12-01 北京京东尚科信息技术有限公司 The method and system of data syn-chronization
CN108733720A (en) * 2017-04-24 2018-11-02 北京京东尚科信息技术有限公司 The on-line testing method and check system of the SQL query of multiple database type
CN107357831A (en) * 2017-06-21 2017-11-17 信雅达系统工程股份有限公司 Configurable flow instance data distribution formula storage method and system
CN110019350A (en) * 2017-07-28 2019-07-16 北京京东尚科信息技术有限公司 Data query method and apparatus based on configuration information
CN109522321A (en) * 2018-11-15 2019-03-26 北京锐安科技有限公司 A kind of data base query method, device, server and storage medium
CN109766362A (en) * 2018-12-28 2019-05-17 北京字节跳动网络技术有限公司 Data processing method and device
CN110191428A (en) * 2019-05-27 2019-08-30 北京鸿联九五信息产业有限公司 A kind of data distributing method based on intelligent cloud platform

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MACIUCA, ANDREI ET AL.: "Optimizing Database Access Using Connection Pooling In Mysql Server And Apache Tomcat", 《UNIVERSITY POLITEHNICA OF BUCHAREST, SCIENTIFIC BULLETIN, SERIES C: ELECTRICAL ENGINEERING AND COMPUTER SCIENCE》 *
QI KUN-PENG: "Technology of database connection in JSP in constructing the information Web", 《CONTROL ENGINEERING CHINA》 *
黄文等: "基于J2EE的数据库连接服务", 《电子科技大学学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898910A (en) * 2020-07-30 2020-11-06 上海新朋程信息科技有限公司 Data acquisition method
CN112860705A (en) * 2021-03-09 2021-05-28 上海华客信息科技有限公司 Database connection configuration information management method, system, device and storage medium
CN114416774A (en) * 2022-01-05 2022-04-29 深圳萨摩耶数字科技有限公司 Cross-platform multi-data-source data fetching method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110716960B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN108519967B (en) Chart visualization method and device, terminal and storage medium
CN110716960B (en) Database query method, device, equipment and storage medium
US20140053073A1 (en) Automated, controlled distribution and execution of commands and scripts
US11222016B2 (en) Dynamic combination of processes for sub-queries
CN108319575B (en) Page component checking method, device, server and storage medium
CN110428319B (en) Data comparison platform, method, equipment and storage medium
CN110704476A (en) Data processing method, device, equipment and storage medium
CN111680313B (en) Data processing method, device, equipment and storage medium
CN114528044B (en) Interface calling method, device, equipment and medium
CN111949693A (en) Data processing device, data processing method, storage medium and electronic equipment
CN112860798B (en) Data processing method and device, electronic equipment and storage medium
CN109241100B (en) Query method, device, equipment and storage medium
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN110502506B (en) Data processing method, device, equipment and storage medium
CN113760947A (en) Data center, data processing method, device, equipment and storage medium
CN111586177B (en) Cluster session loss prevention method and system
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN114281803A (en) Data migration method, device, equipment, medium and program product
CN107181802B (en) Intelligent hardware control method and device, server and storage medium
CN112799760A (en) Form rendering method and device
US20200379874A1 (en) Deframeworking for static program analysis
US9208046B2 (en) Method and system for optimizing testing efforts in system of systems testing
CN111464429B (en) WeChat applet multi-item compatible sharing method, system, storage medium and equipment
CN110515954B (en) Data processing method, device, equipment and storage medium
CN114238391A (en) Data paging query method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant