WO2021078176A1 - 存储过程的运行方法、装置、数据库系统及存储介质 - Google Patents
存储过程的运行方法、装置、数据库系统及存储介质 Download PDFInfo
- Publication number
- WO2021078176A1 WO2021078176A1 PCT/CN2020/122640 CN2020122640W WO2021078176A1 WO 2021078176 A1 WO2021078176 A1 WO 2021078176A1 CN 2020122640 W CN2020122640 W CN 2020122640W WO 2021078176 A1 WO2021078176 A1 WO 2021078176A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sql
- stored procedure
- engine
- processing engine
- request message
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
- G06F16/2443—Stored procedures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/256—Integrating or interfacing systems involving database management systems in federated or virtual databases
Definitions
- This application relates to the field of databases, for example, to a method, device, database system, and storage medium for operating a stored procedure.
- Stored Procedure is a set of Structured Query Language (SQL) statements that can complete specific functions stored in a database system, including SQL statements and process control statements.
- SQL Structured Query Language
- different engines need to be accessed separately, which will lead to restrictions on the application, that is, the execution of SQL in the application and the execution of the stored procedure require access to the distributed database Different parts.
- the SQL processing engine is tightly coupled with the execution of the stored procedure, which will cause one of the SQL processing engine and the stored procedure engine to malfunction and cause the entire function to malfunction.
- the SQL processing engine needs to be highly reliable and highly available, and the instability of the SQL processing engine cannot be caused by adding the distributed stored procedure function.
- the present application provides an operating method, device, database system and storage medium of a stored procedure, which can realize the operation of a distributed stored procedure in a distributed database while ensuring the stability of the SQL processing engine.
- a method for running a stored procedure including:
- the structured query language SQL processing engine sends a stored procedure execution request message to the stored procedure engine
- the SQL processing engine repeatedly executes multiple SQL execution request messages sent by the stored procedure engine, where each step executed corresponds to a SQL execution request message;
- the SQL processing engine receives the stored procedure execution response message sent by the stored procedure engine.
- the embodiment of the present application provides a method for operating a stored procedure, including:
- the stored procedure engine receives the stored procedure execution request message sent by the structured query language SQL processing engine;
- the stored procedure engine constructs and sends multiple SQL execution request messages to the SQL processing engine multiple times, where each step of constructing and sending corresponds to a SQL execution request message;
- the stored procedure engine sends a stored procedure execution response message to the SQL processing engine.
- a SQL processing engine including a processor, and the processor is configured to implement the method on the SQL processing engine side when the computer program is executed.
- a stored procedure engine which includes a processor, and the processor is configured to implement the above-mentioned method on the stored procedure engine side when the computer program is executed.
- the database system includes: the above-mentioned stored procedure engine and the above-mentioned structured query language SQL processing engine.
- a computer-readable storage medium which stores a computer program, and when the computer program is executed by a processor, the operation method of the above-mentioned storage process is realized.
- FIG. 1 is a schematic structural diagram of a database system provided by an embodiment
- FIG. 2 is a schematic flowchart of a method for operating a stored procedure according to an embodiment
- FIG. 3 is a schematic flowchart of another method for operating a stored procedure according to an embodiment
- FIG. 4 is a schematic diagram of interaction of a method for running a stored procedure provided by an embodiment
- FIG. 5 is an interactive schematic diagram of another method for running a stored procedure provided by an embodiment
- FIG. 6 is an interactive schematic diagram of yet another method for running a stored procedure provided by an embodiment
- FIG. 7 is a schematic structural diagram of a device for running a stored procedure according to an embodiment
- FIG. 8 is a schematic structural diagram of another storage process running device provided by an embodiment
- FIG. 9 is a schematic structural diagram of a SQL processing engine provided by an embodiment
- FIG. 10 is a schematic structural diagram of a stored procedure engine provided by an embodiment.
- a stored procedure is a set of SQL statements that can complete a specific function stored in the database system.
- the stored procedure can include SQL statements (a SQL statement is usually an expression, which can include at least one sub-expression) and a flow control statement (A flow control statement can constitute a flow control statement block, and the flow control statement block can include multiple SQL statements).
- the SQL processing engine which will lead to restrictions on the application, that is, the execution of SQL in the application and the execution of stored procedures require access to different components in the distributed database.
- the SQL processing engine is tightly coupled with the execution of the stored procedure, which will cause one of the SQL processing engine and the stored procedure engine to malfunction and cause the entire function to malfunction.
- the SQL processing engine needs to be highly reliable and highly available, and the instability of the SQL processing engine cannot be caused by adding the distributed stored procedure function.
- Fig. 1 is a schematic structural diagram of a database system provided by an embodiment.
- the database system includes a stored procedure engine and a SQL processing engine.
- the stored procedure engine is used to run stored procedures, has the function of controlling the flow of the stored procedures, and belongs to the stored procedure execution engine module of the distributed database; and
- the SQL processing engine is used to execute SQL statements in stored procedures, has the ability to execute SQL, and belongs to the SQL execution module of the distributed database.
- the SQL processing engine provides users with an access point, receives user requests, and implements a single access point mode (that is, the application program accesses this access point to execute the SQL and stored procedures requested by the user without customizing the application program).
- the SQL processing engine is also connected to n data storage nodes (Database, DB).
- a method for running a stored procedure that can be run in the aforementioned database system is provided, which can realize the running of a distributed stored procedure in a distributed database while ensuring the stability of the SQL processing engine.
- system and "network” in this application are often used interchangeably in this application.
- Each of the following embodiments of the present application can be executed separately, and multiple embodiments can also be combined with each other for execution, and the embodiments of the present application do not specifically limit this.
- Fig. 2 is a schematic flowchart of a method for running a stored procedure provided by an embodiment. As shown in Fig. 2, the method provided in this embodiment is applicable to a SQL processing engine, and the method includes the following steps:
- the SQL processing engine sends a stored procedure execution request message to the stored procedure engine.
- the SQL processing engine receives the request message input by the user.
- the request message input by the user may include at least one of an SQL execution request message and a stored procedure execution request message. If the request message input by the user is a SQL execution request message, the SQL processing engine directly executes the SQL execution request message; if the request message input by the user is a stored procedure execution request message, the SQL processing engine continues to perform step S110.
- the SQL processing engine can identify whether the request message input by the user is an SQL execution request message or a stored procedure execution request message by parsing the request message input by the user.
- the SQL processing engine executes multiple SQL execution request messages sent by the stored procedure engine multiple times, and each executed step corresponds to one SQL execution request message.
- step S120 may include the following steps:
- Step 1a) The SQL processing engine receives the SQL execution request message sent by the stored procedure engine.
- Step 1b The SQL processing engine processes the SQL execution request message.
- Step 1c) The SQL processing engine sends a SQL execution response message to the stored procedure engine.
- Step 1d The SQL processing engine receives the SQL result set request message sent by the stored procedure engine.
- Step 1e) The SQL processing engine sends an SQL result set response message to the stored procedure engine according to the SQL result set request message, and the SQL result set response message carries the SQL execution result.
- Step 1f The SQL processing engine receives the SQL result release instruction message sent by the stored procedure engine.
- Step 1g The SQL processing engine releases the SQL result set according to the SQL result release instruction message.
- the SQL processing engine returns to perform step 1a) until the stored procedure engine no longer sends SQL execution request messages.
- the SQL processing engine if an error occurs when the SQL processing engine executes the SQL execution request message sent by the stored procedure engine, the SQL processing engine sends an error prompt message to the stored procedure engine.
- the SQL processing engine receives a stored procedure execution response message sent by the stored procedure engine.
- the SQL processing engine after the SQL processing engine receives the stored procedure execution response message sent by the stored procedure engine, the SQL processing engine feeds back the final stored procedure execution result to the user.
- FIG. 3 is a schematic flowchart of another method for running a stored procedure provided by an embodiment. As shown in FIG. 3, the method provided by this embodiment is applicable to a stored procedure engine, and the method includes the following steps.
- the stored procedure engine receives the stored procedure execution request message sent by the SQL processing engine.
- the stored procedure engine constructs and sends multiple SQL execution request messages to the SQL processing engine multiple times, and each step of constructing and sending corresponds to one SQL execution request message.
- step S220 may include the following steps:
- Step 2a The stored procedure engine constructs the SQL execution request message according to the stored procedure execution request message.
- Step 2b) The stored procedure engine sends a SQL execution request message to the SQL processing engine.
- Step 2c The stored procedure engine receives the SQL execution response message sent by the SQL processing engine.
- Step 2d The stored procedure engine sends the SQL result set request message to the SQL processing engine.
- Step 2e) The stored procedure engine receives the SQL result set response message sent by the SQL processing engine, and the SQL result set response message carries the SQL execution result.
- Step 2f) The stored procedure engine sends a SQL result release instruction message to the SQL processing engine.
- the stored procedure engine returns to perform step 2a) until the stored procedure engine no longer constructs the SQL execution request message.
- the stored procedure engine sends a stored procedure execution response message to the SQL processing engine.
- the stored procedure engine if the stored procedure engine makes an error while executing the stored procedure, the stored procedure engine writes the error information into the stored procedure execution response message.
- FIG. 4 is an interactive schematic diagram of a method for running a stored procedure provided by an embodiment. As shown in FIG. 4, the method includes the following steps:
- the SQL processing engine sends a stored procedure execution request message to the stored procedure engine.
- the SQL processing engine receives the request message input by the user.
- the request message input by the user may include at least one of an SQL execution request message and a stored procedure execution request message. If the request message input by the user is an SQL execution request message, the SQL processing engine directly executes the SQL execution request message; if the request message input by the user is a stored procedure execution request message, the SQL processing engine continues to perform step S310.
- the SQL processing engine can identify whether the request message input by the user is an SQL execution request message or a stored procedure execution request message by parsing the request message input by the user.
- the stored procedure execution request message includes a CALL statement and parameter information.
- the parameter information includes at least one of parameter output information, parameter input information, and parameter input information.
- the stored procedure engine receives the stored procedure execution request message sent by the SQL processing engine.
- the stored procedure engine constructs an SQL execution request message according to the stored procedure execution request message.
- the stored procedure engine After the stored procedure engine receives the stored procedure execution request message, it calls the internal processing procedure to execute the stored procedure requested in the stored procedure execution request message.
- the stored procedure engine When the SQL instruction is encountered during the execution of the stored procedure, the stored procedure engine will be based on The SQL instruction constructs a complete SQL statement (that is, the SQL execution request message), and then sends it to the SQL processing engine for execution, and waits for the SQL processing engine to return the SQL execution response message.
- the stored procedure engine sends an SQL execution request message to the SQL processing engine.
- the SQL processing engine receives the SQL execution request message sent by the stored procedure engine.
- the SQL processing engine processes the SQL execution request message.
- the SQL processing engine sends an SQL execution response message to the stored procedure engine.
- the stored procedure engine receives the SQL execution response message sent by the SQL processing engine.
- the stored procedure engine After the stored procedure engine receives the SQL execution response message returned by the SQL processing engine, it continues to execute the stored procedure from the waiting point until it encounters the next SQL instruction. When the next SQL instruction is encountered, the execution of steps S312-S317 is returned until the execution of the stored procedure is completed.
- the stored procedure engine when the stored procedure engine needs the execution result of SQL, it may further include the following steps S318-S324.
- S318 The stored procedure engine sends the SQL result set request message to the SQL processing engine.
- the SQL processing engine receives the SQL result set request message sent by the stored procedure engine.
- the SQL processing engine sends an SQL result set response message to the stored procedure engine according to the SQL result set request message, and the SQL result set response message carries the SQL execution result.
- the stored procedure engine receives the SQL result set response message sent by the SQL processing engine.
- S322 The stored procedure engine sends a SQL result release instruction message to the SQL processing engine.
- the SQL processing engine receives the SQL result release instruction message sent by the stored procedure engine.
- the SQL processing engine releases the SQL result set according to the SQL result release instruction message.
- the stored procedure engine sends a stored procedure execution response message to the SQL processing engine.
- the stored procedure engine After the stored procedure engine executes a complete stored procedure, the stored procedure engine sends a stored procedure execution response message to the SQL processing engine.
- the stored procedure execution response message includes the output parameter information.
- the SQL processing engine receives a stored procedure execution response message sent by the stored procedure engine.
- the SQL processing engine after the SQL processing engine receives the stored procedure execution response message sent by the stored procedure engine, the SQL processing engine feeds back the final stored procedure execution result to the user.
- the SQL processing engine executes each SQL statement dynamically generated by the stored procedure engine to realize the distributed execution of the entire stored procedure.
- Figure 5 is an interactive schematic diagram of another stored procedure running method provided by an embodiment.
- the difference from the running method of the stored procedure shown in Figure 4 is that the SQL processing engine shown in Figure 5 executes the SQL execution request message. If an error occurs, the SQL processing engine can send an error message to the stored procedure engine instead of directly prompting the user that an error has occurred. Whether the stored procedure can continue to be executed needs to be determined by the processing procedure in the stored procedure engine, because the definition of the stored procedure may include the definition of error handling.
- FIG. 6 is an interactive schematic diagram of another method for running a stored procedure provided by an embodiment.
- the difference from the method for running a stored procedure shown in FIG. 4 is that the stored procedure engine shown in FIG. 6 makes an error when executing the stored procedure.
- the stored procedure engine can write error information into the stored procedure execution response message.
- the SQL processing engine and the stored procedure engine can be isolated from each other.
- one of the SQL processing engine and the stored procedure engine fails, it will not cause the other to fail, and it will not affect the SQL processing engine to process other services of the user. Ensure the stability of the SQL processing engine.
- FIG. 7 is a schematic structural diagram of a device for running a stored procedure provided by an embodiment.
- the device for running a stored procedure can be configured in a SQL processing engine. As shown in FIG. 7, it includes a sending module 10, a processing module 11, and a receiving module. 12.
- the sending module 10 is configured to send a stored procedure execution request message to the stored procedure engine.
- the processing module 11 is configured to execute multiple SQL execution request messages sent by the stored procedure engine multiple times, and each executed step corresponds to one SQL execution request message.
- the receiving module 12 is configured to receive a stored procedure execution response message sent by the stored procedure engine.
- the operating device of the stored procedure provided in this embodiment is configured to implement the operating method of the stored procedure of the foregoing embodiment, and the implementation principle and technical effect of the operating device of the stored procedure provided in this embodiment are similar to the implementation principle and technical effect of the operating method of the foregoing stored procedure. No longer.
- the receiving module 12 is also set to receive SQL execution request messages sent by the stored procedure engine; the processing module 11 is set to process SQL execution request messages received by the receiving module 12; the sending module 10 is also set to send the stored procedure engine Send SQL execution response message; until the stored procedure engine no longer sends SQL execution request message.
- the receiving module 12 is further configured to receive the SQL result set request message sent by the stored procedure engine; the sending module 10 is further configured to send the SQL result set response message to the stored procedure engine according to the SQL result set request message,
- the SQL result set response message carries the execution result of the SQL.
- the receiving module 12 is further configured to receive the SQL result release instruction message sent by the stored procedure engine; the processing module 11 is also configured to release the SQL result set according to the SQL result release instruction message.
- the sending module 10 is further configured to send an error prompt message to the stored procedure engine when the processing module 11 executes the SQL execution request message sent by the stored procedure engine and an error occurs.
- the receiving module 12 is further configured to obtain the stored procedure execution request message before the sending module 10 sends the stored procedure execution request message to the stored procedure engine.
- FIG. 8 is a schematic structural diagram of another storage process running device provided by an embodiment.
- the storage process running device can be configured in the storage process engine. As shown in FIG. 8, it includes a receiving module 20, a processing module 21, and a sending module. Module 22.
- the receiving module 20 is configured to receive a stored procedure execution request message sent by the structured query language SQL processing engine.
- the processing module 21 is configured to construct the SQL execution request message multiple times.
- the sending module 22 is configured to send a SQL execution request message to the SQL processing engine; and send a stored procedure execution response message to the SQL processing engine.
- the operating device of the stored procedure provided in this embodiment is configured to implement the operating method of the stored procedure of the foregoing embodiment, and the implementation principle and technical effect of the operating device of the stored procedure provided in this embodiment are similar to the implementation principle and technical effect of the operating method of the foregoing stored procedure. No longer.
- the processing module 21 is configured to construct an SQL execution request message according to the stored procedure execution request message; the sending module 22 is configured to send the SQL execution request message constructed by the processing module 21 to the SQL processing engine; the receiving module 20 also It is set to receive the SQL execution response message sent by the SQL processing engine; until the processing module 21 no longer constructs the SQL execution request message.
- the sending module 22 is further configured to send a SQL result set request message to the SQL processing engine; the receiving module 20 is further configured to receive a SQL result set response message sent by the SQL processing engine, and the SQL result set response message carries SQL.
- the results of the implementation are further configured to send a SQL result set request message to the SQL processing engine; the receiving module 20 is further configured to receive a SQL result set response message sent by the SQL processing engine, and the SQL result set response message carries SQL.
- the sending module 22 is further configured to send a SQL result release instruction message to the SQL processing engine.
- the processing module 21 is further configured to write error information into the stored procedure execution response message when the processing module 21 executes the stored procedure and an error occurs.
- FIG. 9 is a schematic structural diagram of a SQL processing engine provided by an embodiment.
- the SQL processing engine includes a processor 30, a memory 31, and a communication interface 32; the number of processors 30 in the SQL processing engine may be One or more, one processor 30 is taken as an example in FIG. 9; the processor 30, the memory 31, and the communication interface 32 in the SQL processing engine may be connected by a bus or other methods.
- a bus connection is taken as an example.
- the bus represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
- the memory 31 can be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the methods in the embodiments of the present application.
- the processor 30 executes at least one functional application and data processing of the SQL processing engine by running the software programs, instructions, and modules stored in the memory 31, that is, realizes the operation method of the above-mentioned stored procedure.
- the memory 31 may include a program storage area and a data storage area.
- the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the SQL processing engine and the like.
- the memory 31 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
- the memory 31 may include a memory remotely provided with respect to the processor 30, and these remote memories may be connected to the SQL processing engine through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
- the communication interface 32 can be configured to receive and send data.
- FIG. 10 is a schematic structural diagram of a stored procedure engine provided by an embodiment.
- the stored procedure engine includes a processor 40, a memory 41, and a communication interface 42; the number of processors 40 in the stored procedure engine may be One or more, one processor 40 is taken as an example in FIG. 10; the processor 40, the memory 41, and the communication interface 42 in the storage process engine may be connected by a bus or other methods.
- a bus connection is taken as an example.
- the bus represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures.
- the memory 41 can be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the methods in the embodiments of the present application.
- the processor 40 executes at least one functional application and data processing of the stored procedure engine by running the software programs, instructions, and modules stored in the memory 41, that is, realizes the above-mentioned operating method of the stored procedure.
- the memory 41 may include a storage program area and a storage data area.
- the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of a stored process engine, and the like.
- the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
- the memory 41 may include a memory remotely provided with respect to the processor 40, and these remote memories may be connected to the stored process engine through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
- the communication interface 42 can be configured to receive and send data.
- the embodiments of the present application also provide a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and the computer program implements the method provided in any embodiment of the present application when the computer program is executed by a processor.
- the computer storage media in the embodiments of the present application may adopt 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.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
- Computer-readable storage media include (non-exhaustive list): electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (Read-Only Memory) , ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory, optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage Components, magnetic storage devices, or any suitable combination of the above.
- the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
- the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and the computer-readable program code is carried in the data signal. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
- the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
- the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
- suitable medium including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
- the computer program code used to perform the operations of the present disclosure can be written in one or more programming languages or a combination of multiple programming languages.
- the programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, Ruby, Go also includes conventional procedural programming languages-such as "C" language or similar programming languages.
- the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network-including Local Area Network (LAN) or Wide Area Network (WAN)-or it can be connected to an external computer (for example, use an Internet service provider to connect via the Internet).
- LAN Local Area Network
- WAN Wide Area Network
- the various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
- some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.
- Computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or written in any combination of one or more programming languages Source code or object code.
- ISA Instruction Set Architecture
- the block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions.
- the computer program can be stored on the memory.
- the memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical storage devices and systems (digital multi-function optical discs) (Digital Video Disc, DVD) or compact disc (Compact Disc, CD), etc.
- Computer-readable media may include non-transitory storage media.
- the data processor can be of any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSP), application specific integrated circuits (ASICs) ), programmable logic devices (Field-Programmable Gate Array, FPGA), and processors based on multi-core processor architecture.
- DSP digital signal processors
- ASICs application specific integrated circuits
- FPGA programmable logic devices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (15)
- 一种存储过程的运行方法,包括:结构化查询语言SQL处理引擎向存储过程引擎发送存储过程执行请求消息;所述SQL处理引擎多次执行所述存储过程引擎发送的多个SQL执行请求消息,其中,每次执行的步骤对应一个SQL执行请求消息;所述SQL处理引擎接收所述存储过程引擎发送的存储过程执行响应消息。
- 根据权利要求1所述的方法,其中,所述SQL处理引擎每次执行所述存储过程引擎发送的SQL执行请求消息,包括:所述SQL处理引擎接收所述存储过程引擎发送的SQL执行请求消息;所述SQL处理引擎处理所述存储过程引擎发送的SQL执行请求消息;所述SQL处理引擎向所述存储过程引擎发送SQL执行响应消息。
- 根据权利要求2所述的方法,在所述SQL处理引擎返回接收所述存储过程引擎发送的下一个SQL执行请求消息前,还包括:所述SQL处理引擎接收所述存储过程引擎发送的SQL结果集请求消息;所述SQL处理引擎根据所述SQL结果集请求消息,向所述存储过程引擎发送SQL结果集响应消息,所述SQL结果集响应消息携带SQL的执行结果。
- 根据权利要求3所述的方法,在所述SQL处理引擎根据所述SQL结果集请求消息,向所述存储过程引擎发送SQL结果集响应消息后,还包括:所述SQL处理引擎接收所述存储过程引擎发送的SQL结果释放指示消息;所述SQL处理引擎根据所述SQL结果释放指示消息,释放SQL结果集。
- 根据权利要求1所述的方法,还包括:在所述SQL处理引擎执行所述存储过程引擎发送的SQL执行请求消息并出错的情况下,所述SQL处理引擎向所述存储过程引擎发送错误提示消息。
- 根据权利要求1所述的方法,在所述SQL处理引擎向存储过程引擎发送存储过程执行请求消息前,还包括:所述SQL处理引擎获取所述存储过程执行请求消息。
- 一种存储过程的运行方法,包括:存储过程引擎接收结构化查询语言SQL处理引擎发送的存储过程执行请求消息;所述存储过程引擎多次构造并向所述SQL处理引擎发送多个SQL执行请求 消息,其中,每次构造并发送的步骤对应一个SQL执行请求消息;所述存储过程引擎向所述SQL处理引擎发送存储过程执行响应消息。
- 根据权利要求7所述的方法,其中,所述存储过程引擎每次构造并向所述SQL处理引擎发送SQL执行请求消息,包括:所述存储过程引擎根据所述存储过程执行请求消息构造SQL执行请求消息;所述存储过程引擎向所述SQL处理引擎发送所述存储过程引擎构造的SQL执行请求消息;所述存储过程引擎接收所述SQL处理引擎发送的SQL执行响应消息。
- 根据权利要求8所述的方法,在所述存储过程引擎返回根据所述存储过程执行请求消息构造下一个SQL执行请求消息前,还包括:所述存储过程引擎向所述SQL处理引擎发送SQL结果集请求消息;所述存储过程引擎接收所述SQL处理引擎发送的SQL结果集响应消息,所述SQL结果集响应消息携带SQL的执行结果。
- 根据权利要求9所述的方法,其特征在于,在所述存储过程引擎接收所述SQL处理引擎发送的SQL结果集响应消息后,还包括:所述存储过程引擎向所述SQL处理引擎发送SQL结果释放指示消息。
- 根据权利要求7所述的方法,还包括:在所述存储过程引擎执行存储过程并出错的情况下,所述存储过程引擎将错误信息写入所述存储过程执行响应消息中。
- 一种结构化查询语言SQL处理引擎,包括:处理器,所述处理器设置为在执行计算机程序时实现如权利要求1-6中任一所述的存储过程的运行方法。
- 一种存储过程引擎,包括:处理器,所述处理器设置为在执行计算机程序时实现如权利要求7-11中任一所述的存储过程的运行方法。
- 一种数据库系统,包括:如权利要求13所述的存储过程引擎和如权利要求12所述的结构化查询语言SQL处理引擎。
- 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-11中任一所述的存储过程的运行方法。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP20878988.3A EP4044043A4 (en) | 2019-10-25 | 2020-10-22 | Storage process running method and apparatus, database system, and storage medium |
| JP2022521107A JP7427775B2 (ja) | 2019-10-25 | 2020-10-22 | ストアドプロシージャの実行方法、装置、データベースシステム及び記憶媒体 |
| US17/765,947 US20220374423A1 (en) | 2019-10-25 | 2020-10-22 | Running method and device for stored procedure, database system and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911025993.7 | 2019-10-25 | ||
| CN201911025993.7A CN112711602B (zh) | 2019-10-25 | 2019-10-25 | 一种存储过程的运行方法、装置,数据库系统及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021078176A1 true WO2021078176A1 (zh) | 2021-04-29 |
Family
ID=75540980
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/122640 Ceased WO2021078176A1 (zh) | 2019-10-25 | 2020-10-22 | 存储过程的运行方法、装置、数据库系统及存储介质 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US20220374423A1 (zh) |
| EP (1) | EP4044043A4 (zh) |
| JP (1) | JP7427775B2 (zh) |
| CN (1) | CN112711602B (zh) |
| WO (1) | WO2021078176A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7392040B1 (ja) | 2022-05-30 | 2023-12-05 | 三菱電機Itソリューションズ株式会社 | 中継装置、中継方法、中継プログラム及びデータベースシステム |
| CN116150269A (zh) * | 2022-12-30 | 2023-05-23 | 金篆信科有限责任公司 | 一种分布式数据库中自定义函数的实现系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020116376A1 (en) * | 1997-02-26 | 2002-08-22 | Hitachi, Ltd. | Routine executing method in database system |
| US20070294234A1 (en) * | 2004-05-05 | 2007-12-20 | International Business Machines Corporation | Dynamic database access via standard query language and abstraction technology |
| CN103064875A (zh) * | 2012-10-30 | 2013-04-24 | 中国标准化研究院 | 一种服务化空间数据分布式查询方法 |
| CN103092970A (zh) * | 2013-01-24 | 2013-05-08 | 华为技术有限公司 | 一种数据库操作方法及设备 |
| CN108874837A (zh) * | 2017-05-16 | 2018-11-23 | 北京京东尚科信息技术有限公司 | 数据库分库方法、装置、中间件及存储介质和电子设备 |
Family Cites Families (22)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07244601A (ja) * | 1994-03-04 | 1995-09-19 | Nippon Telegr & Teleph Corp <Ntt> | 関係データベースのアクセス方法および装置 |
| JP3808941B2 (ja) * | 1996-07-22 | 2006-08-16 | 株式会社日立製作所 | 並列データベースシステム通信回数削減方法 |
| JP2002032247A (ja) * | 2000-05-11 | 2002-01-31 | Keiichi Kogure | 処理設定テーブルにより入出力装置とデータベースのデータ処理を一元的に制御する方法ならび装置 |
| JP2004062566A (ja) * | 2002-07-30 | 2004-02-26 | Jmnet Inc | データベースシステム及びそれを構成するマスターノード装置及びプログラム |
| EP1546930B1 (en) * | 2002-09-18 | 2015-10-21 | IBM International Group BV | Programmable streaming data processor for database appliance having multiple processing unit groups |
| JP2004287926A (ja) * | 2003-03-24 | 2004-10-14 | Ricoh Co Ltd | データベース検索方法、データベース管理サーバ装置、及び汎用ストアドプロシージャ |
| US7225202B2 (en) * | 2004-03-18 | 2007-05-29 | International Business Machines Corporation | Method and apparatus for generating query and response statements at runtime from generic requests |
| US7266561B2 (en) * | 2004-03-18 | 2007-09-04 | International Business Machines Corporation | Method and apparatus for splitting and merging request and response data at runtime |
| US7908286B2 (en) * | 2004-12-08 | 2011-03-15 | Oracle International Corporation | Techniques for providing XQuery access using web services |
| US8056141B2 (en) * | 2006-09-13 | 2011-11-08 | Imperva, Inc. | Method for monitoring stored procedures |
| US8260761B2 (en) * | 2006-10-20 | 2012-09-04 | Ianywhere Solutions, Inc. | Detecting performance degrading design and algorithm issues in database applications |
| JP2010097285A (ja) * | 2008-10-14 | 2010-04-30 | Fujitsu Ltd | システム分析支援プログラム、システム分析支援装置、およびシステム分析支援方法 |
| US10255152B2 (en) * | 2011-02-18 | 2019-04-09 | Entit Software Llc | Generating test data |
| US20140095508A1 (en) * | 2012-10-01 | 2014-04-03 | International Business Machines | Efficient selection of queries matching a record using a cache |
| US9128990B2 (en) * | 2013-03-15 | 2015-09-08 | Microsoft Technology Licensing, Llc | Executing stored procedures at parallel databases |
| US10019297B2 (en) * | 2013-04-03 | 2018-07-10 | Salesforce.Com, Inc. | Systems and methods for implementing bulk handling in asynchronous processing |
| US9823995B2 (en) * | 2014-08-28 | 2017-11-21 | Sap Se | Structured query language debugger |
| GB201517416D0 (en) * | 2015-10-02 | 2015-11-18 | Ibm | Task-execution in a DBMS using stored procedures |
| CN107798025B (zh) * | 2016-09-05 | 2020-06-02 | 华为技术有限公司 | 存储过程的运行、编译方法、装置和数据库系统 |
| CN110121704B (zh) * | 2016-12-30 | 2021-09-21 | 华为技术有限公司 | 一种用于存储过程的执行方法、设备以及系统 |
| US10685019B2 (en) * | 2017-04-14 | 2020-06-16 | Salesforce.Com, Inc. | Secure query interface |
| KR102511927B1 (ko) * | 2018-01-18 | 2023-03-21 | 한국전자통신연구원 | Jit 컴파일 기반 데이터베이스 시스템, 이의 질의 처리 방법 및 이의 저장 프로시저 최적화 방법 |
-
2019
- 2019-10-25 CN CN201911025993.7A patent/CN112711602B/zh active Active
-
2020
- 2020-10-22 EP EP20878988.3A patent/EP4044043A4/en not_active Ceased
- 2020-10-22 JP JP2022521107A patent/JP7427775B2/ja active Active
- 2020-10-22 WO PCT/CN2020/122640 patent/WO2021078176A1/zh not_active Ceased
- 2020-10-22 US US17/765,947 patent/US20220374423A1/en not_active Abandoned
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020116376A1 (en) * | 1997-02-26 | 2002-08-22 | Hitachi, Ltd. | Routine executing method in database system |
| US20070294234A1 (en) * | 2004-05-05 | 2007-12-20 | International Business Machines Corporation | Dynamic database access via standard query language and abstraction technology |
| CN103064875A (zh) * | 2012-10-30 | 2013-04-24 | 中国标准化研究院 | 一种服务化空间数据分布式查询方法 |
| CN103092970A (zh) * | 2013-01-24 | 2013-05-08 | 华为技术有限公司 | 一种数据库操作方法及设备 |
| CN108874837A (zh) * | 2017-05-16 | 2018-11-23 | 北京京东尚科信息技术有限公司 | 数据库分库方法、装置、中间件及存储介质和电子设备 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4044043A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| JP7427775B2 (ja) | 2024-02-05 |
| JP2022551454A (ja) | 2022-12-09 |
| CN112711602A (zh) | 2021-04-27 |
| US20220374423A1 (en) | 2022-11-24 |
| EP4044043A4 (en) | 2023-11-15 |
| CN112711602B (zh) | 2023-04-28 |
| EP4044043A1 (en) | 2022-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10552348B2 (en) | USB device access method, apparatus and system, a terminal, and a server | |
| CN108845863B (zh) | 用于虚拟机与宿主机的通信方法、装置和系统 | |
| US10983815B1 (en) | System and method for implementing a generic parser module | |
| WO2019001074A1 (zh) | 一种远程过程调用的方法、装置及计算机设备 | |
| CN111984849A (zh) | 一种信息查询方法、装置、设备及介质 | |
| CN114826749A (zh) | 一种接口访问控制方法、装置、介质 | |
| CN116028455A (zh) | 一种数据处理方法、装置、存储介质及电子设备 | |
| WO2021013247A1 (zh) | 一种运行小程序的方法、设备和计算机存储介质 | |
| CN109729121A (zh) | 一种云存储系统及用于云存储系统中实现自定义数据处理的方法 | |
| WO2021078176A1 (zh) | 存储过程的运行方法、装置、数据库系统及存储介质 | |
| CN113791792B (zh) | 应用调用信息的获取方法、设备以及存储介质 | |
| CN111694620A (zh) | 第三方业务的交互方法、装置、设备及计算机存储介质 | |
| CN111770236B (zh) | 一种对话处理方法、装置、系统、服务器和存储介质 | |
| CN111596864A (zh) | 一种数据延时删除的方法、装置、服务器及存储介质 | |
| CN114637969A (zh) | 目标对象的鉴权方法及装置 | |
| CN116561013B (zh) | 基于目标服务框架的测试方法、装置、电子设备和介质 | |
| WO2020220272A1 (zh) | 更改资源状态的方法、系统、终端及存储介质 | |
| CN109068170B (zh) | 一种弹幕消息的存储方法、装置、终端和存储介质 | |
| CN118612272A (zh) | 一种车载图像传输方法、装置、电子设备和存储介质 | |
| CN110096543A (zh) | 应用程序的数据操作方法、装置、服务器和介质 | |
| CN114490104B (zh) | Android系统模块中的信息转发方法、装置、设备及介质 | |
| WO2025039250A1 (zh) | 一种轻量级的pl/sql语言调试器实现方法 | |
| CN113703989B (zh) | 基于Android系统的消息处理方法、装置、设备和存储介质 | |
| CN116366724A (zh) | 业务流程的处理方法、装置、计算机设备、存储介质 | |
| US20250383845A1 (en) | Method and system for construction of application programming interfaces |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20878988 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2022521107 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2020878988 Country of ref document: EP Effective date: 20220510 |
|
| WWW | Wipo information: withdrawn in national office |
Ref document number: 2020878988 Country of ref document: EP |