Schema Versioning for Cloud Database Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

When users upgrade applications on different devices to different schema versions, changes made on one device are not automatically reflected on other devices, leading to version skew issues, as each device may have a separate database instance and different schema formats, causing data inconsistencies across devices.

Innovation Solution

The solution involves merging different schema versions by creating a separate database for the new schema version, using transaction logs to translate and replay changes, ensuring that all changes are synchronized across devices, preserving the order and historical information, and updating the database schema to maintain data consistency across all devices accessing the newer version.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If users upgrade applications on different devices at different times, then each device can use the latest features available at upgrade time, but version skew occurs causing data inconsistencies across devices

Engineering Contradiction:
Improveapplication version flexibilityVSAvoiddata consistency
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the database system into multiple schema versions (first schema version and second schema version) that can coexist simultaneously. Each device can operate with its own schema version without requiring all devices to be upgraded uniformly, thus maintaining application version flexibility while preventing data consistency issues through structured version management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces schema translation logic as an intermediary layer between different schema versions. This translation mechanism automatically converts data between the first schema version and second schema version, allowing devices with different application versions to access and modify data consistently without direct compatibility requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If separate database instances are created for different schema versions, then devices can maintain their own version, but changes made on one device are not automatically reflected on other devices

Engineering Contradiction:
Improveschema version independenceVSAvoiddata synchronization
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent merges multiple schema versions (first schema version and second schema version) into a unified database system where both versions can access the same underlying data storage. This merging approach ensures that data changes made on any device are automatically visible to all other devices regardless of their schema version, eliminating data synchronization issues while preserving schema version independence through translation capabilities.

Inventive Principle:
Principle #5Merging (Combining)

3Productivity

If data is migrated from one schema version to another, then the upgraded application can use new features, but changes made during the transition period may be lost

Engineering Contradiction:
Improveapplication feature capabilityVSAvoiddata changes during migration
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent implements preliminary action by maintaining both the first schema version and second schema version concurrently during the transition period. Instead of immediately migrating all data and losing access to the original schema structure, the system preserves both versions and uses translation logic to bridge them, ensuring that no data changes are lost during the upgrade transition while enabling new features through the second schema version.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9244914B2Schema versioning for cloud hosted databases
Publication Date: 2016.01.26 APPLE INC
  • US9244914B2 patent drawing
  • US9244914B2 patent drawing
  • US9244914B2 patent drawing

AI summary

Methods and apparatus are provided in which applications that run on different devices can be upgraded with migration of data to a new database format. A method of upgrading a first version of an application installed on a first device to a second version is provided, where first and second transaction logs for respective first and second schema versions are stored in respective first and second log containers on a server computer, and the first version of the application stores data in accordance with a first schema version, and further stores a cache of at least a portion of the first transaction log in a log database on the first device, migrating the log database to the second schema version, storing a duplicate copy of the first transaction log in the second log container, and rewriting the duplicate copy of the first transaction logs using the second schema.