Base User-Defined Functions for Database Query Engines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing user-defined functions (UDFs) for database management systems can be cumbersome and hard to maintain, especially when wrapping multiple operators, as it is not scalable for large libraries of functions.

Innovation Solution

The base user-defined function (BUDF) approach encapsulates query engine interactions, providing a base class that can be specialized by developers to create reusable and scalable UDFs, simplifying the development process by hiding database read/write interfaces and allowing for automatic generation of function signatures.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If traditional UDF development approach is used to wrap multiple operators, then functionality can be extended, but development becomes cumbersome and hard to maintain

Engineering Contradiction:
Improvefunctionality extensionVSAvoiddevelopment complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the UDF development process by separating the base class (providing common functionality and query engine interactions) from specialized operations (specific analytics functions). This segmentation allows developers to extend functionality by implementing only the specific operation without dealing with the complex base infrastructure, thus reducing development complexity while maintaining versatility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The base class acts as an intermediary between the query engine and specialized analytics operations. It provides a standardized interface and handles common operations, allowing specialized functions to be added without directly interacting with the complex query engine internals. This intermediary layer simplifies the development process while enabling extensive functionality extension.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If multiple operators are wrapped individually into UDFs, then specific functions can be implemented, but scalability is poor for large libraries of functions

Engineering Contradiction:
Improvefunction implementation capabilityVSAvoidscalability
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The base class is designed to be universal, providing common functionality that can be reused across multiple specialized operations. Instead of creating separate UDFs for each operator, a single base class implementation serves multiple specialized analytics functions, dramatically improving scalability while maintaining the ability to implement diverse functions.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The base class performs preliminary actions by pre-implementing common operations and query engine interactions that are needed by all specialized functions. This preliminary setup eliminates the need to repeat these operations for each new function, enabling rapid scaling of the function library without proportional increases in development effort.

Inventive Principle:
Principle #10Preliminary action

3Manufacturing precision

If direct interfacing with DBMS APIs is required for each UDF, then precise control can be achieved, but the process becomes tedious and not maintainable

Engineering Contradiction:
Improvecontrol precisionVSAvoidease of development
Core Design Contradiction:
Manufacturing precisionVSEase of manufacture

Solution Approach 1:

The base class serves as an intermediary that encapsulates direct DBMS API interactions. It provides a simplified interface that maintains precise control over query engine operations while shielding developers from the complexity of direct API interfacing. This allows precise control to be achieved through the standardized base class interface without the tedium of direct API calls.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The base class implements self-service by automatically handling common operations and query engine interactions that would otherwise require manual API interfacing. Developers can achieve precise control by simply implementing their specific operations, as the base class automatically manages the complex interfacing details, making the process maintainable and easier to develop.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10789235B2Base user defined functions
Publication Date: 2020.09.29 ROCKET SOFTWARE
  • US10789235B2 patent drawing
  • US10789235B2 patent drawing
  • US10789235B2 patent drawing

AI summary

Methods, devices, and techniques for base user defined functions in a database management system are discussed herein. For example, in one aspect, a query request is received from a computer device. The query request may include a query operator representing a specialized user defined function (SUDF). The SUDF may then be executed. Executing the SUDF may include executing a base operation of a base user defined function (BUDF). The base operation may interact with an application programming interface (API) of the query engine to obtain a tuple stored in the database. Executing the SUDF may further include executing a specialized operation that processes the tuple according to an analytics function. The specialized operation may generate a result. Then, a query result may be returned to the computer device. The query result can include the result.