Dynamic Default Value Transformation for Database Schema Upgrades

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Upgrading database applications by adding a new column with a default value can result in significant downtime and expense, as existing approaches require updating all existing rows with the default value, leading to inefficiencies.

Innovation Solution

Dynamically transforming NULL values to default values when adding a column with a Non-NULL constraint, allowing queries to seamlessly return the default value for NULL columns, thus avoiding physical updates and minimizing downtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all existing rows are updated with the default value when adding a new column, then the database maintains data consistency, but the downtime and expense increase significantly

Engineering Contradiction:
Improvedata consistencyVSAvoiddowntime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-defining the default value at the column level before any data insertion occurs. When a new column is added to a table, the default value is established in the schema metadata, so that any row lacking an explicit value automatically receives this default during query execution, eliminating the need for posterior bulk updates of existing rows

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating a virtual representation of the default value that is applied to NULL entries during query processing rather than physically updating each row. The system copies the default value from the column definition and applies it dynamically to rows that have NULL in that column, achieving data consistency without physical modification of stored data

Inventive Principle:
Principle #26Copying

2Reliability

If all existing rows are updated with the default value when adding a new column, then the database maintains data consistency, but the expense increases significantly

Engineering Contradiction:
Improvedata consistencyVSAvoidupdate operation cost
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The patent uses copying by creating a virtual representation of the default value that is applied to NULL entries during query processing rather than physically updating each row. The system copies the default value from the column definition and applies it dynamically to rows that have NULL in that column, achieving data consistency without physical modification of stored data

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent replaces the mechanical system of physical row-by-row updates with a logical substitution approach. Instead of mechanically iterating through and updating each row in the database, the system substitutes this with a metadata-driven approach where the default value is defined once at the column level and automatically applied during query execution, eliminating the expensive update operation

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

3Reliability

If the database server is made unavailable during column updates, then data integrity is maintained, but user convenience and productivity decrease

Engineering Contradiction:
Improvedata integrityVSAvoiduser productivity
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-defining the default value at the column level before any data insertion occurs. When a new column is added to a table, the default value is established in the schema metadata, so that any row lacking an explicit value automatically receives this default during query execution, eliminating the need for posterior bulk updates of existing rows

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent enables continuity of useful action by allowing the database to remain fully operational during schema changes. The system continues to accept queries and perform operations while the new column is being added, maintaining continuous service availability while the metadata changes are applied in the background without requiring database downtime

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS9569482B2Transforming default values dynamically
Publication Date: 2017.02.14 ORACLE INT CORP
  • US9569482B2 patent drawing
  • US9569482B2 patent drawing
  • US9569482B2 patent drawing

AI summary

When altering records in a repository of information to add an attribute that has a non-NULL default value and a corresponding constraint to the records, no update record is issued and instead, the existing records are essentially treated as having a NULL value for the attribute being added. To compute a query over the records to which the attribute has been added, a value is generated for rows that hold NULL values for the attribute in which the value in which the NULL values held therein are translated to the default value.