Automated Data Type Determination for Database Variables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Programmers face significant effort in determining the proper data types for variables in database procedures, especially when initial values are complex, requiring consideration of database system type semantics and related objects.

Innovation Solution

Implementing automated data type determination in programming languages, where the compiler processes expressions to deduce the data type of variables, allowing 'AUTO' semantics or blank data type specification, and using scalar and table type deductors to determine data types.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the programmer manually specifies the data type for each variable, then the data type accuracy is improved, but the programming complexity and time consumption increase

Engineering Contradiction:
Improvedata type accuracyVSAvoidprogramming time consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs automatic type determination, allowing the compiler to infer data types from variable assignments and expressions without requiring manual specification by the programmer. This self-service approach resolves the contradiction by automating the time-consuming task while maintaining type accuracy through systematic analysis of the code structure and type relationships.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The compiler performs type determination in advance during the compilation phase, analyzing variable assignments and expressions to infer data types before the program executes. This preliminary action eliminates the need for programmers to manually specify types during development, reducing programming time while ensuring type accuracy through comprehensive static analysis.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If the programmer manually specifies the data type for complex expressions, then the type accuracy is improved, but the ease of operation deteriorates

Engineering Contradiction:
Improvedata type accuracyVSAvoidprogramming ease
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The automatic type determination system analyzes complex expressions and infers data types autonomously, freeing the programmer from the burden of manually determining types for complicated expressions. The system services itself by analyzing the expression structure, operator types, and operand types to derive the correct result type, thereby improving programming ease while maintaining type accuracy.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The manual mechanical process of type determination is replaced by an automated computational system. The compiler uses type inference algorithms to automatically analyze expressions and determine types, substituting the programmer's manual analysis with a systematic computational approach that handles complexity more efficiently and accurately.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Ease of operation

If automated type determination is implemented, then the ease of operation is improved, but the reliability may worsen due to potential type inference errors

Engineering Contradiction:
Improveprogramming easeVSAvoidtype determination reliability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The type inference system incorporates feedback mechanisms where the compiler analyzes the inferred types and validates them against type compatibility rules and semantic constraints. If the inferred type leads to inconsistencies or conflicts, the system can adjust the inference or generate appropriate error messages, thereby improving reliability through iterative validation and correction.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system introduces an intermediary type checking layer between the automatic type inference and the final program execution. This intermediary validates the inferred types against the program's semantic requirements and type compatibility rules, acting as a mediator that ensures the reliability of type determination while maintaining the ease of automatic inference.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11385874B2Automatic type determination for database programming
Publication Date: 2022.07.12 SAP SE
  • US11385874B2 patent drawing
  • US11385874B2 patent drawing
  • US11385874B2 patent drawing

AI summary

In one embodiment, the present disclosure pertains to automated data type determination of variables that are written in a programming language. In one embodiment, a programming language statement is received. The programming language statement includes a variable, an expression to which the variable is set, and a request to determine a data type of the variable. The expression is processed to deduce a data type of the expression. In certain embodiments, the data type of the expression is then assigned as the data type of the variable such that the data type can be used when the programming language statement is compiled into machine executable code.