Byte Orderable Array Encoding for Multi-Field Database Sorting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data sorting techniques face inefficiencies when dealing with variable-width columns and null values, particularly in relational databases, as the concatenated key approach fails to accurately compare and order data items with mixed byte lengths and null values.

Innovation Solution

The proposed solution, known as 'key conditioning,' transforms sort keys into byte orderable arrays by applying specific transformations such as handling null values, variable-width fields, and ordering options, ensuring accurate and efficient sorting through the construction of byte orderable arrays from multi-field keys.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the concatenated key approach is used for sorting, then sorting efficiency is improved through byte-wise comparison, but sorting accuracy deteriorates when dealing with variable-width columns and null values

Engineering Contradiction:
Improvesorting efficiencyVSAvoidsorting accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent applies preliminary action by transforming sort keys into a standardized byte orderable format before the sorting operation begins. This key transformation encodes variable-width columns and null values in a way that prepares them for efficient byte-wise comparison, thus achieving both sorting efficiency and accuracy from the outset

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameter representation of sort keys by transforming them into a standardized byte orderable format. This transformation modifies how variable-width columns and null values are encoded, allowing them to be compared byte-by-byte while maintaining sorting accuracy across different data types and formats

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If separate byte comparison is used for each sort key, then sorting accuracy is maintained for variable-width columns, but sorting efficiency deteriorates due to multiple comparisons

Engineering Contradiction:
Improvesorting accuracyVSAvoidsorting efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent merges multiple sort key comparisons into a single byte-wise comparison by transforming all sort keys into a concatenated byte orderable array. This consolidation allows the sorting algorithm to compare entire multi-column keys in one operation rather than performing separate comparisons for each column

Inventive Principle:
Principle #5Merging (Combining)

3Device complexity

If the concatenated key approach is used, then device complexity is reduced through simplified comparison logic, but reliability deteriorates due to incorrect ordering of variable-width fields

Engineering Contradiction:
Improvecomparison logic complexityVSAvoidsorting reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent changes the parameter encoding of variable-width columns and null values in the sort key transformation process. By encoding these elements in a standardized byte orderable format with proper delimiters and null indicators, the system maintains simple comparison logic while ensuring reliable and correct sorting results

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS7587396B2Encoding data to be sorted
Publication Date: 2009.09.08 ORACLE INT CORP
  • US7587396B2 patent drawing
  • US7587396B2 patent drawing
  • US7587396B2 patent drawing

AI summary

Key conditioning involves the construction of a byte orderable array from values for a possibly multi-field key concatenated key, for comparison by a sort routine. Byte-orderable sort keys are conditioned prior to execution of a sort routine, to facilitate an accurate and/or efficient sort procedure. For example, key conditioning may be applied to values in one or more columns of a database table, where the column(s) are used as keys for sorting rows of the table. Six factors are considered in encoding the byte array, such as whether nulls compare high or low; whether a field is fixed width or variable width; whether a field is guaranteed to be not null; whether a field is ordered ascending or descending; whether a field is the last field of a multi-field sort key or the only field of a sort key; and whether a field is likely to contain a significant number of zero values.