Method and device for recovering deleted data in SQLite

2014 
The invention provides a method and device for recovering deleted data in the SQLite. The method includes the steps that a B+tree type main tree and a WAL file which correspond to a data sheet are read from the SQLite; the WAL file is divided into a plurality of page sets according to imperative statements; a first unread page set is read and marked as read and is marked as a first page set; if the first page set is not empty, a second page set related to the main tree is extracted from the first page set; if the second page set is not empty, the second page set and related pages form a B+tree type second subtree; if the second subtree is not empty, a first subtree, corresponding to the second subtree, in the main tree is obtained, and whether the second subtree is in a data deleting type or not is judged; if the second subtree is in the data deleting type, first original data deficient in the first subtree are found according to the second subtree, and data recovering can be carried out on the deleted data corresponding to the first original data in a preset mode conveniently. By means of the method, the data recovery accuracy rate and the data recovery comprehensiveness can be improved.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    2
    References
    0
    Citations
    NaN
    KQI
    []