Sequencing Temporal Table Rows for Error-Free Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Optimizing UPDATE or DELETE statements in SQL for temporal tables, where multiple source rows affect the same target row, is challenging due to the complexity of managing non-overlapping validity periods.

Innovation Solution

A method is introduced to sequence requests for temporal Source tables applied to temporal Target tables, ordering rows by the join column and period-to-be-modified, and creating LDIFF and RDIFF rows to manage non-overlapping ValidTime ranges, allowing for efficient updates or deletes without errors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple source rows are applied to a single target row in a temporal table, then the completeness of data updates is improved, but the complexity of managing non-overlapping validity periods increases

Engineering Contradiction:
Improvecompleteness of data updatesVSAvoidcomplexity of managing validity periods
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the validity period management by creating LDIFF (Left Difference) and RDIFF (Right Difference) rows that separate the temporal ranges. When multiple source rows affect the same target row, the system divides the target row's validity period into distinct segments, each associated with a specific source row, ensuring non-overlapping temporal ranges while maintaining complete data updates.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary action by ordering source rows by their ValidTime dimension before applying them to the target row. This pre-ordering ensures that the system processes source rows in the correct temporal sequence, preventing conflicts and simplifying the management of non-overlapping validity periods during the update operation.

Inventive Principle:
Principle #10Preliminary action

2Manufacturing precision

If source rows are ordered by join column and period-to-be-modified, then the accuracy of temporal modifications is improved, but the processing time increases

Engineering Contradiction:
Improveaccuracy of temporal modificationsVSAvoidprocessing time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary ordering of source rows by join column and period-to-be-modified before the actual update operation. This pre-sorting ensures accurate temporal modifications without requiring complex sorting during the update process itself, balancing precision with processing efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses the inherent ordering properties of the source rows (by ValidTime) to self-organize the update sequence. By leveraging the natural temporal ordering of the data, the system achieves accurate temporal modifications without requiring additional expensive sorting operations during processing.

Inventive Principle:
Principle #25Self-service

3Productivity

If TransactionTime is truncated and ValidTime ranges are adjusted, then the efficiency of data modification is improved, but the complexity of temporal range management increases

Engineering Contradiction:
Improveefficiency of data modificationVSAvoidcomplexity of temporal range management
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments temporal range management into standardized LDIFF and RDIFF operations. By truncating TransactionTime and adjusting ValidTime ranges through these predefined segmentation operations, the system improves modification efficiency while containing complexity through reusable, standardized temporal range handling mechanisms.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8666956B1Sequenced modifications of multiple rows in a temporal table
Publication Date: 2014.03.04 TERADATA US INC
  • US8666956B1 patent drawing
  • US8666956B1 patent drawing
  • US8666956B1 patent drawing

AI summary

A SEQUENCED request a) to apply a temporal Source table to a temporal Target table under a predicate is received. The Source table includes a plurality of rows that qualify to apply to a single Target table row under the predicate. The predicate specifies a Source table join column. Each of the plurality of Source table rows and the single Target table row include a ValidTime dimension. The plurality of Source table rows is b) ordered by the Source table join column and a period-to-be-modified. The next of the ordered plurality of Source table rows is c) applied by determining that the Target table row has a TransactionTime and, in response, closing out the TransactionTime of the Target table row. Applying the next of the ordered plurality of Source table rows includes identifying an RDIFF range as the period-to-be-modified of the Source table row being applied that is later than the ValidTime range of the single Target table row. Applying the next of the ordered plurality of Source table rows includes creating an RDIFF row being the same as the Target table row except the ValidTime of the RDIFF row is set to RDIFF range. A second of the ordered plurality of Source table rows d) is applied by applying c) to the RDIFF row as the Target table row.