Dynamic Function Invocation in Database Management Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The development and registration of user-defined functions in database management systems (DBMS) are challenging due to the need for static registration with query engines, leading to additional effort, inconsistent results, and unsatisfactory performance, especially when dealing with multiple functions.
Innovation Solution
A dynamic function invocation apparatus and method that allows for the dynamic loading and invocation of pre-coded functions, such as Java functions, directly in SQL queries without wrapping them into user-defined functions or registering them with the query engine, using a hardware-implemented dynamic function invocation module.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If user-defined functions are statically registered with the query engine, then the functions can be invoked in SQL queries, but the development effort increases and registration becomes complex especially when dealing with multiple functions
Solution Approach 1:
The patent extracts the function registration step from the invocation process by allowing direct invocation of library functions without wrapping them into user-defined functions. The query engine directly calls functions from external libraries using fully qualified names, eliminating the need for static registration and simplifying the development process.
Solution Approach 2:
The patent creates a universal mechanism for function invocation that works with any library function without requiring separate wrapping and registration steps for each function. The system provides a standardized syntax (schema.library_name.function_name) that can invoke any function from any library, making the process consistent and scalable across multiple functions.
2Adaptability or versatility
If multiple user-defined functions are registered and wrapped, then more functionality is available in SQL queries, but the development effort and time increase significantly
Solution Approach 1:
The patent performs preliminary organization of functions into libraries with standardized naming conventions and schemas before they are needed. Functions are pre-compiled and stored in external libraries, so when they are invoked in SQL queries, they can be directly accessed without on-demand wrapping or registration, significantly reducing development time.
Solution Approach 2:
The patent uses fully qualified function names (schema.library_name.function_name) that act as copies or references to the actual function implementations. Instead of creating new user-defined function wrappers, the system uses these name references to directly invoke the original library functions, eliminating repetitive wrapping work.
3Ease of operation
If functions are wrapped into user-defined functions for invocation, then they can be used in SQL queries, but resource usage increases and performance decreases
Solution Approach 1:
The patent extracts the function invocation from the user-defined function wrapping layer and calls the library functions directly. This eliminates the intermediate wrapping and unboxing operations, reducing overhead and improving performance while maintaining the ability to invoke functions in SQL queries.
Data Source
AI summary
According to an example, dynamic function invocation may include ascertaining a query for a database management system (DBMS). Dynamic function invocation may further include implementing a dynamic function as a meta user defined function to invoke a plurality of different coded functions including a coded function that is to be invoked by the query to perform an operation related to the DBMS, and executing the dynamic function by the query to load and invoke the coded function to perform the operation related to the DBMS.


