Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for recovering deleted records of SQLite database file

A technology for deleting records and file recovery, applied in the field of databases, can solve the problems of inaccurate data, poor recovery rate and recovery effect, and no deletion of records in table fields and field type verification, etc. Improve recovery speed and recovery accuracy, and improve the effect of recovery accuracy

Inactive Publication Date: 2017-04-26
XIAMEN ANSCEN NETWORK TECH CO LTD
View PDF5 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since the data header of the deleted record item has an indefinite length, and the data encoding method is different, the first 4 key bytes of the deleted record item are erased. It is not accurate to simply use the table field to infer the data length and locate the offset position of the data area. Whether the deleted record item is overwritten and the integrity check is performed, the number and field type of the table field to which the deleted record item belongs is not checked, resulting in the restored data containing more useless data, resulting in garbled characters
Therefore, the data recovered by the existing solutions is inaccurate, there are many invalid information and garbled characters, and the recovery rate and recovery effect are not good, which cannot meet the needs of the actual situation.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for recovering deleted records of SQLite database file
  • Method and device for recovering deleted records of SQLite database file
  • Method and device for recovering deleted records of SQLite database file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0054] To further illustrate the various embodiments, the present invention is provided with accompanying drawings. These drawings are a part of the disclosure of the present invention, which are mainly used to illustrate the embodiments, and can be combined with related descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, those skilled in the art should understand other possible implementations and advantages of the present invention. The present invention will be further described in conjunction with the accompanying drawings and specific embodiments.

[0055] First, briefly introduce the SQLite data storage structure for the understanding of subsequent recovery steps:

[0056] SQLite database files consist of fixed-size "pages". Page size (PageSize) range [512,32768] (must be an index of 2), the default size is 1024 bytes (1KB). All pages in the database are numbered sequentially starting from 1. The...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and device for recovering deleted records of a SQLite database file. The method for recovering deleted records of a SQLite database file comprises the following steps: analyzing the SQLite structure; obtaining the SQLite file encoding mode and the page size information; creating the base library of the field number and type of each table and realizing the association of the free pages with the base library; judging whether the free-block is covered or not and checking the integrity of the free-block; classifying the missing cases combined with the known data parameters which can be extracted from the free-block; and refactoring the control header information of the deleted records quickly and realizing the recovery of the SQLite deleted records. According to the invention, the base library of the field number and type of each table is created; the integrity check of the free-block is performed, so that the recovery accuracy rate is increased; the Rowid width of the free-block is calculated by means of the Rowid of the adjacent data unit that has not been deleted; the first four bytes in the memory structure of the free-block are calculated and reconstructed by means of the free-block size. Therefore, the data recovery of the SQLite deleted records can be realized generally, quickly and accurately by means of the invention, and the recovery rate and the recovery accuracy can be improved compared with the traditional method.

Description

technical field [0001] The invention relates to the field of databases, in particular to a method and a device for recovering and deleting records of SQLite database files. Background technique [0002] SQLite is a lightweight database that can support mainstream operating systems such as Windows / Linux / Unix and can be combined with many programming languages. SQLite has been widely used in embedded devices, Android devices and various application platforms with a series of characteristics such as very low resource occupation, fast processing speed, convenient use, and open source code. [0003] Because SQLite is widely used, it stores rich and diverse data information, including Android device address book, SMS, call records, WeChat / QQ chat records, and various browser Internet access records, etc. How important this amount of information is to users, once it is accidentally deleted and lost by mistake, it will often bring a lot of inconvenience to users. Similarly, in the...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F11/14
CPCG06F11/1435G06F16/17
Inventor 唐鹏陈明魏丽珍张婷梁煜麓罗佳
Owner XIAMEN ANSCEN NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products