Generic SQL Table Functions for Diverse Data Sources

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing SQL table functions require fixed input and output operators to be specified by database developers, limiting their flexibility and necessitating separate implementations for each data source and type, making them impractical for handling diverse data sets.

Innovation Solution

The introduction of generic SQL table functions that allow for flexible input and output operators to be declared, with the system determining specific data types at compile time, enabling customization and application to various data sources and types without extending the database language.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If fixed input and output operators are specified for SQL table functions, then the functions have clear data type definitions, but their flexibility and adaptability to diverse data sources are limited

Engineering Contradiction:
Improveflexibility of table functionsVSAvoidnumber of separate implementations
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements generic input operators and generic output operators that can handle multiple data types and data sources universally. The generic input operator can process hierarchical data, relational data, and other data types through a unified interface, while the generic output operator can generate various output formats (tables, views, etc.) from a single function body, eliminating the need for separate implementations for each data source type.

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

Solution Approach 2:

The patent allows the data type parameters of input and output operators to be determined at compile time based on the specific data sources provided. This enables the same table function to adapt to different data types by changing its parameters rather than requiring separate function definitions for each data type scenario.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If separate implementations are created for each data source and type, then data type specificity is ensured, but the maintenance burden and development time increase

Engineering Contradiction:
Improvedata type correctnessVSAvoiddevelopment and maintenance time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

By creating a universal table function with generic operators that can handle multiple data types through parameterization, the patent eliminates the need to develop and maintain separate function implementations for each data source type, significantly reducing development and maintenance time while preserving data type correctness through compile-time type determination.

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

Solution Approach 2:

The patent segments the operator interface from the function implementation by introducing generic input operators and generic output operators as separate configurable components. This allows the core function logic to remain unchanged while adapting to different data types through operator configuration, reducing the complexity of maintaining multiple implementations.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If generic input operators are used at compile time, then function flexibility is enhanced, but the complexity of operator determination increases

Engineering Contradiction:
Improvecustomization of table functionsVSAvoidcomplexity of operator determination
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent performs operator determination at compile time rather than runtime,预先 resolving which generic input operators and generic output operators to use based on the data sources provided. This preliminary action eliminates the need for complex runtime type checking and operator selection, making the complexity manageable through static analysis while preserving full flexibility for customization.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10970265B2Enhanced table functions for database management systems
Publication Date: 2021.04.06 SAP SE
  • US10970265B2 patent drawing
  • US10970265B2 patent drawing
  • US10970265B2 patent drawing

AI summary

A table function can be received at a database system and applied to one or more data sources. The table function can have one or more generic input operators associated with a source data type of the one or more data sources. One or more output operators associated with a return set of data of the table function can be determined at function call compile time from the values passed to one or more generic input operators. The determining of the one or more output parameters can be based on one or more rules specified in the table function definition. The one or more output operators for the table function can be generated at function call compile time.