Database modularity with pluggable guest languages
By introducing a multilingual engine and data definition language, the problem of database systems being difficult to support multiple programming languages has been solved, seamless collaboration and permission management in a multilingual environment has been achieved, and the scalability and security of the database system have been improved.
Patent Information
- Application Number
- CN202080060981.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-30
- Filing Date
- 2020-08-12
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2040-08-12
AI Technical Summary
Existing database systems have difficulty supporting multiple programming languages, leading to library interference and failures. In addition, permission management is complex, making it difficult to implement source code deployment and access control in a multi-language environment.
By introducing the Multi-Language Engine (MLE), a unified API is provided to manage modules and virtual environments of different programming languages, supporting collaboration between multiple languages. Guest programming languages are deployed to the database management system (DBMS) through data definition language (DDL) statements to implement registration and access control of guest modules.
It achieves seamless collaboration between different programming languages, simplifies source code deployment and management, improves the scalability and security of the database system, and supports permission management in multi-language environments.
Smart Images

Figure CN114341831B_ABST
Abstract
Claims
1. A method comprising: Executes data definition language (DDL) statements, where: The executing the DDL statements causes one or more files providing an implementation of the guest programming language to be copied or uploaded into a database management system (DBMS), and The one or more files include at least one selected from the group consisting of: a parser for the guest programming language and a grammar for the guest programming language; Execute Data Manipulation Language (DML) statements, including executing: calls to the guest programming language in the DBMS, and At least one selected from the group consisting of: Futamura projection, just-in-time compilation (JIT) of a subroutine after calling the subroutine, and generation of speculative code with one or more deoptimization points.
2. The method according to claim 1, wherein: The binding comprises binding the name of the guest programming language to the implementation of the guest programming language in a database dictionary of the DBMS.
3. The method of claim 1, wherein the guest programming language in the DBMS call comprises calling at least one selected from the group consisting of: a stored procedure, and a user-defined function (UDF) defined in a database dictionary of the DBMS.
4. The method according to claim 1, wherein: The method further includes receiving a DDL statement from a remote client computer; Automatically executing the DDL statements includes uploading the one or more files from the remote client computer to the DBMS.
5. A method comprising: Executing a single data definition language (DDL) statement to define multiple subroutines for a guest programming language in a database management system (DBMS); executing a second DDL statement to register a particular subroutine among the plurality of subroutines as a user-defined function (UDF) or a stored procedure in the DBMS, wherein the second DDL statement to register the particular subroutine includes a designation of a user account to switch to during a later call of the particular subroutine; A data manipulation language (DML) statement is executed to call the specific subroutine in the DBMS.
6. The method according to claim 5, wherein: The single DDL statement defining the plurality of subroutines for a guest programming language includes a name of the guest programming language; Executing the single DDL statement to define the plurality of subroutines includes resolving names of the guest programming language in a database dictionary of the DBMS.
7. The method according to claim 5, wherein: said single DDL statement defining said plurality of subroutines comprises a name of a new guest module; Executing the single DDL statement to define the plurality of subroutines includes: generating the new visitor module; as well as In the database dictionary of the DBMS, the name is bound to the new guest module.
8. The method of claim 7, further comprising executing a data control language (DCL) statement to grant access to the new guest module.
9. The method of claim 5, further comprising executing a third single DDL statement to replace the plurality of subroutines of the guest programming language in the DBMS.
10. The method according to claim 5, wherein: The user accounts include a user account that executes the single DDL statement to define the plurality of subroutines.
11. The method of claim 5, wherein the second DDL statement registering the specific subroutine includes, for the specific subroutine, at least one selected from the group consisting of: an indication of idempotence and an indication of thread safety.
12. The method of claim 11, wherein: The second DDL statement for registering the specific subroutine includes an argument direction for the specific subroutine, and the argument direction includes at least OUT; The guest programming language does not natively support the argument direction.
13. The method of claim 11, wherein registering the specific subroutine comprises generating a mapping from argument types of the specific subroutine to data types native to the DML.
14. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, result in performing the steps of any one of claims 1-4.
15. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, result in performing the steps of any one of claims 5-13.
16. A system comprising: one or more processors; as well as A memory storing instructions that, when executed by the one or more processors, result in the execution of the steps of any one of claims 1-13.
17. A computer program product comprising instructions which, when executed by one or more processors of a computer, result in the execution of the steps of any one of claims 1 to 13.
Citation Information
Patent Citations
Method for managing external routines in a database management system
US20080270455A1
Service virtual machine
US20140282549A1