Electronic device and data management method thereof
AssigneeSamsung Electronics Co., Ltd.
InventorsKisung Lee, Hyeeun Jun
Life of this patent
Estimating the term…
Abstract
An electronic device according to various embodiments of the present invention comprises: a memory for storing a database and a file which includes at least one change data for changing the database; and a processor electrically connected to the memory, wherein, when terminating the use of the database, the processor can initialize at least one data other than a first validity data, included in a header of the file, for determining the validity of the at least one change data, and, when commencing the use of the database following the termination of the use of the database, the processor can change the first validity data included in the header of the file. Other various embodiments are possible.
Claims13
An electronic device comprising:
- a memory to store a database and a write-ahead logging (WAL) file, the WAL file including a header and at least one frame including data for changing the database;
- and
- a processor electrically connected to the memory,
- wherein the processor is configured to:
- determine whether the at least one frame included in the WAL file is valid when use of the database is terminated;
- based on determination that the at least one frame included in the WAL file is valid, change the database based on the data included in the frame determined to be valid;
- based on determination that a WAL file retention policy is applied, initialize a remaining data except for reference data for determining the validity of the at least one frame among data included in the header of the WAL file;
- recover the initialized data included in the header of the WAL file when the use of the database is started after the use of the database has been terminated;
- and
- change the reference data included in the header of the WAL file.
A method of data management for an electronic device, the method comprising:
- determining whether at least one frame included in a write-ahead logging (WAL) file is valid when use of a database is terminated;
- based on determination that the at least one frame included in the WAL file is valid, changing the database based on the data included in the frame determined to be valid;
- based on determination that a WAL file retention policy is applied, initializing a remaining data except for reference data for determining the validity of the at least one frame among data included in a header of the WAL file;
- recovering the initialized data included in the header of the WAL file when the use of the database is started after the use of the database has been terminated;
- and
- changing the reference data included in the header of the WAL file.
Dependencies are inferred from the claim text.