Database Table Renaming via Routing Metadata Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face downtime issues when renaming tables, leading to inaccessible databases and disrupted services for clients, particularly in distributed systems where data integrity and availability are critical.

Innovation Solution

Implementing a method that uses client-facing table names as aliases to internal table identifiers, allowing for seamless updates of routing metadata to map new table names to original IDs without causing downtime, enabling concurrent access requests with both old and new names until all routers are updated, and utilizing versioning to ensure data integrity during the renaming process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional table renaming method is used, then table name is updated, but database becomes inaccessible during renaming process

Engineering Contradiction:
Improvedatabase availabilityVSAvoidapplication downtime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system creates a new table with the desired name before renaming the original table, and updates routing metadata to point to the new table. This preliminary creation of the target table ensures that the renaming operation can proceed without making the database inaccessible, as the new table is already in place to receive traffic.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses routing metadata as an intermediary layer between the client-facing table name and the internal table identifier. By updating the routing metadata to map the new table name to the original table ID (or to a newly created table), the system enables seamless name changes without directly exposing the renaming operation to clients, thus maintaining database availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If table name is changed immediately, then renaming is complete, but data integrity may be compromised during transition

Engineering Contradiction:
Improverenaming speedVSAvoiddata integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary validation checks before executing the rename operation, including verifying that the new table name is unique and that the routing metadata can be safely updated. This preliminary validation ensures data integrity is maintained while enabling rapid renaming execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The routing metadata serves as an intermediary that decouples the client-facing table name from the internal table identifier. This allows the system to update table names rapidly by simply modifying the routing metadata mappings, while the actual table data remains unchanged and intact, thus maintaining data integrity during the transition.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Stability of the object's composition

If routing metadata is updated for all routers simultaneously, then consistency is achieved, but system complexity increases

Engineering Contradiction:
Improverouting consistencyVSAvoidupdate coordination complexity
Core Design Contradiction:
Stability of the object's compositionVSDevice complexity

Solution Approach 1:

The system generates and validates the updated routing metadata configuration before propagating it to all routers. This preliminary preparation ensures that when updates are distributed, all routers receive a consistent, pre-validated configuration, maintaining routing consistency without requiring complex real-time coordination during the update process.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates copies of the updated routing metadata and distributes them to multiple routers. Rather than having routers communicate and coordinate updates in real-time, each router receives an identical copy of the updated metadata, simplifying the update coordination while ensuring consistency across all routing nodes.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11436211B1Renaming a database table with minimized application downtime
Publication Date: 2022.09.06 AMAZON TECH INC
  • US11436211B1 patent drawing
  • US11436211B1 patent drawing
  • US11436211B1 patent drawing

AI summary

Methods, systems, and computer-readable media for renaming a database table with minimized application downtime are disclosed. A database receives a table rename request for a table having a first table name. Routing metadata comprises a mapping of the first table name to a table identifier and a mapping of the table identifier to one or more partitions. The table rename request indicates a second table name. The database generates updated routing metadata responsive to the table rename request. The updated routing metadata comprises a mapping of the second table name to the table identifier and the mapping of the table identifier to the one or more partitions. The database receives, from a client application, one or more access requests indicating the second table name. The database routes the one or more access requests to the one or more partitions based at least in part on the updated routing metadata.