SQLite Database Repair by Extracting Key Fields

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

SQLite databases are prone to corruption due to environmental factors, leading to loss of data and poor user experience as they lack reliable repair mechanisms, resulting in the need for users to re-enter lost data when recreated.

Innovation Solution

A database repairing method that automatically identifies and extracts predefined key fields from a corrupted SQLite database, generating a new database file with the extracted data to minimize user interference and data loss.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the SQLite database is used for its lightweight characteristic, then the database can be applied to various embedded devices, but the database lacks a reliable repairing mechanism and is easily corrupted

Engineering Contradiction:
Improveapplicability to embedded devicesVSAvoidrepairing mechanism
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements an automatic database repair mechanism that detects corruption and performs self-repair without user intervention. The system automatically identifies corrupted databases, extracts intact data, and reconstructs functional database files, enabling the lightweight SQLite database to self-heal while maintaining its embedded device applicability.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent performs preliminary data extraction and validation before complete corruption occurs. By continuously monitoring database integrity and proactively recovering data from corrupted files, the system prevents total data loss and maintains reliability while preserving the lightweight nature of SQLite for embedded applications.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the database is recreated when corrupted, then the database can be restored to a functional state, but all originally stored data is lost

Engineering Contradiction:
Improvedatabase functionalityVSAvoidstored data
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent extracts intact data from corrupted database files by parsing the binary structure and identifying valid data segments. This extraction process separates recoverable information from corrupted portions, allowing the system to preserve originally stored data while restoring database functionality through selective data recovery and reconstruction.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent creates a copy of the corrupted database file and performs extraction operations on the copy, preserving the original file while generating a reconstructed database with recovered data. This copying approach ensures data integrity during the repair process and allows the system to restore functionality without completely losing originally stored information.

Inventive Principle:
Principle #26Copying

3Reliability

If the database is recreated when corrupted, then the database can be restored, but users need to re-enter the lost data which poor user experience

Engineering Contradiction:
Improvedatabase restorationVSAvoiduser experience
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent implements automatic database repair that executes without user intervention. The system autonomously detects corruption, extracts intact data, reconstructs the database structure, and restores functionality, eliminating the need for users to manually re-enter data and significantly improving ease of operation while maintaining reliable restoration.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent incorporates feedback mechanisms that monitor database integrity and automatically trigger repair operations when corruption is detected. This closed-loop system provides users with real-time status information and automatically restores the database, eliminating the need for manual data re-entry and creating a seamless user experience with improved ease of operation.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12561295B2Database repairing method and electronic device
Publication Date: 2026.02.24 HUAWEI TECH CO LTD
  • US12561295B2 patent drawing
  • US12561295B2 patent drawing
  • US12561295B2 patent drawing

AI summary

Database repairing methods and electronic devices are disclosed. In an implementation, a method includes, in response to determining that a first database file is corrupted, obtaining data of at least one field in the first database file, wherein the at least one field is predefined by an application, and generating a first data table in a second database file based on the data of the at least one field, wherein the second database file is obtained through repairing.