Relational Calculation View Conversion for Database Engines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database query optimization techniques are hindered by the presence of non-relational operations within calculation views, as relational engines cannot execute these operations, limiting the ability to fully optimize and integrate calculation scenarios.
Innovation Solution
The calculation engine converts calculation views containing non-relational operations into a relational calculation plan by merging them with relational operations and replacing non-relational operations with view search operations, allowing the plan to be executed by a relational database engine.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If calculation views with non-relational operations are directly executed by a relational engine, then the relational engine cannot process the query, but if converted to relational calculation plans, then execution is enabled
Solution Approach 1:
A calculation engine is introduced as an intermediary component between the relational database engine and calculation views containing non-relational operations. The calculation engine receives calculation scenarios, identifies non-relational operations, converts them into equivalent relational operations, and generates relational calculation plans that the relational database engine can execute, thereby enabling compatibility without requiring the relational engine itself to handle non-relational operations directly
Solution Approach 2:
The system transforms the operational parameters of calculation views by converting non-relational operations into relational operations. This parameter change allows the calculation plan to be compatible with relational database engines while preserving the original computational logic and results, enabling the relational engine to execute previously incompatible queries
2Adaptability or versatility
If calculation views are nested to provide flexibility and reusability, then user flexibility improves, but query runtime increases
Solution Approach 1:
The calculation engine performs preliminary analysis and optimization of nested calculation views before execution. By pre-identifying non-relational operations and converting them to relational equivalents, and by optimizing the overall calculation plan structure, the system prepares the query in advance to reduce runtime overhead while preserving the benefits of nested calculation view reusability
Data Source
AI summary
A calculation engine of a database management system is described. In some implementations, the calculation engine receives a calculation scenario including a plurality of calculation views comprising one or more relational operations. The calculation engine determines whether a first calculation view includes a second calculation view configured as an operand of one of the relational operations of the first calculation view, and also determines whether the second calculation view comprises a non-relational operation. The calculation engine further converts the plurality of calculation views into a calculation plan via merging the first calculation view with the second calculation view when the first calculation view is determined to comprise the second calculation view as an operand, and replacing the second calculation view with a view search operation when the second calculation view is determined to comprise the non-relational operation. Related systems, methods, and articles of manufacture are also described.


