Database repairing method and electronic device

US12561295B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12561295-B2
Application numberUS-202118245476-A
CountryUS
Kind codeB2
Filing dateAug 20, 2021
Priority dateSep 16, 2020
Publication dateFeb 24, 2026
Grant dateFeb 24, 2026

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

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.

First claim

Opening claim text (preview).

What is claimed is: 1 . A database repairing method, comprising: in response to determining that a first database file and a second data table in a backup file of the first database file are corrupted, backing up the first database file to obtain a backup file of the first database file; obtaining data of at least one field in the first database file from a master table, wherein the master table stores a structured query language (SQL) statement for generating a first data table which is a repaired version of the second data table, and wherein the at least one field is predefined by an application; in response to determining that a second data table in the backup file that stores the data of the at least one field is not corrupted, obtaining the data of the at least one field from the second data table; in response to determining that the second data table in the backup file is corrupted, obtaining the data of the at least one field from a master table associated with the first database file, the master table storing statements and data used to generate the first database file, and reconstructing a key data table by re-executing the statements for the key data table; creating, in response to the first database file being corrupted, a second database file having a same file name and a same structure as the first database file; and generating the first data table to obtain a in the second database file based on the data of the at least one field, wherein the second database file comprises the first data table and is a repaired version of the first database file and replaces the first data file, and wherein the first database file and the second database file are stored in a database. 2 . The method according to claim 1 , wherein the SQL statement comprises one or more of an update statement, an insertion statement, a deletion statement, or a query statement. 3 . The method according to claim 1 , wherein the method further comprises: deleting the first database file. 4 . The method according to claim 1 , wherein the database is a structured query language lite (SQLite) database. 5 . The method according to claim 1 , wherein a computer program for implementing the method is provided by the application. 6 . The method according to claim 1 , wherein a computer program for implementing the method is provided by an electronic device on which the application is installed. 7 . An electronic device comprising: at least one processor; and a memory coupled to the at least one processor and storing programming instructions for execution by the at least one processor to cause the electronic device to perform operations comprising: in response to determining that a first database file and a second data table in a backup file of the first database file are corrupted, backing up the first database file to obtain a backup file of the first database file; obtaining data of at least one field in the first database file from a master table, wherein the master table stores a structured query language (SQL) statement for generating a first data table which is a repaired version of the second data table, and wherein the at least one field is predefined by an application; in response to determining that a second data table in the backup file that stores the data of the at least one field is not corrupted, obtaining the data of the at least one field from the second data table; in response to determining that the second data table in the backup file is corrupted, obtaining the data of the at least one field from a master table associated with the first database file, the master table storing statements and data used to generate the first database file, and reconstructing a key data table by re-executing the statements for the key data table; creating, in response to the first database file being corrupted, a second database file having a same file name and a same structure as the first database file; and generating the first data table to obtain a in the second database file based on the data of the at least one field, wherein the second database file comprises the first data table and is a repaired version of the first database file and replaces the first data file, and wherein the first database file and the second database file are stored in a database. 8 . The electronic device according to claim 7 , wherein the SQL statement comprises one or more of an update statement, an insertion statement, a deletion statement, or a query statement. 9 . The electronic device according to claim 7 , wherein the method further comprises: deleting the first database file. 10 . The electronic device according to claim 7 , wherein the database is a structured query language lite (SQLite) database. 11 . The electronic device according to claim 7 , wherein a computer program for implementing the method is provided by the application. 12 . The electronic device according to claim 7 , wherein a computer program for implementing the method is provided by an electronic device on which the application is installed.

Assignees

Inventors

Classifications

  • Database-specific techniques · CPC title

  • Management of the data involved in backup or backup restore · CPC title

  • Backup restoration techniques · CPC title

  • G06F16/215Primary

    Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12561295B2 cover?
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 …
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F16/215. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 24 2026 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).