# US 11,907,166 B2 · Electronic device and method for updating database based on reserved space

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,907,166 B2
- Document ID: US11907166B2
- Status: Granted
- Kind: B2
- Application number: 17/555,826
- Filed: 2021-12-20
- Published: 2022-07-14
- Granted: 2024-02-20
- Earliest claimed: 2021-01-13
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Kisung Lee; Hyeeun Jun; Kiwon Song
- Web page: https://patentgrep.com/patent/US11907166B2

## CPC

- G06F 16/1727: {Details of free space management performed by the file system (saving storage space on storage systems G06F3/0608; management of blocks in storage devices G06F3/064)}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 16/16: File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F 16/17: Details of further file system functions
- G06F 16/1805: {Append-only file systems, e.g. using logs or journals to store data}
- G06F 16/23: Updating
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various embodiments of the disclosure disclose a method and an apparatus, which includes: a display, a memory, and a processor operatively connected to the display and/or the memory, wherein the processor is configured to: add a frame to an appended file based on a request to update application data, allocate a reserved space to the appended file, update a database file based on an update condition, and allocate the reserved space to the database file.

## Claims

### Claim 1

An electronic device comprising:
a display;
a memory comprising a database file, the database file comprising a plurality of pages corresponding to application data and reserved space; and
a processor operatively connected to the display and/or the memory,
wherein the processor is configured to:
add a frame corresponding to an updated page of the application data stored in the database file to an appended file, based on a request to update the application data,
determine whether the frame is initially added to the appended file,
allocate, when the frame is initially added to the appended file, the reserved space to the appended file,
determine, when the frame is not initially added to the appended file, whether to allocate the reserved space to the appended file based on a storage space of the memory,
update the database file to apply the frame stored in the appended file based on identifying that an update condition is satisfied, and
after updating the database file, allocate the reserved space to the database file,
wherein the update condition comprises a condition that a size of the appended file corresponds to a predetermined size, or a condition that the number of frames included in the appended file corresponds to a predetermined number.

### Claim 2 (depends on 1)

The electronic device of claim 1, wherein the processor is configured to:
allocate the reserved space to the appended file based on the storage space of the memory having a size equal to or greater than a specified size, and
not allocate the reserved space to the appended file based on the storage space of the memory being less than the specified size.

### Claim 3 (depends on 1)

The electronic device of claim 1, wherein the processor is configured to display a user interface for configuring a size of the reserved space through the display.

### Claim 4 (depends on 1)

The electronic device of claim 1, wherein the processor is configured to maintain the reserved space allocated to the appended file and a specified space based on the database file being updated.

### Claim 5 (depends on 1)

The electronic device of claim 1, wherein the processor is configured to control the update condition based on a storage space of the memory based on the database file being updated.

### Claim 6 (depends on 5)

The electronic device of claim 5, wherein the processor is configured to:
maintain the update condition based on the storage space of the memory having a space equal to or greater than a specified space, and
change the update condition based on the storage space of the memory having a space less than the specified space.

### Claim 7

A method for operating an electronic device including a processor and a memory comprising a database file, the database file comprising a plurality of pages corresponding to application data and reserved space, the method comprising:
receiving a request to update application data stored in the memory of the electronic device;
adding a frame corresponding to an updated page of the application data stored in the database file to an appended file, based on the update request;
determining whether the frame is initially added to the appended file;
allocating, when the frame is initially added to the appended file, the reserved space to the appended file;
determining, when the frame is not initially added to the appended file, whether to allocate the reserved space to the appended file based on a storage space of the memory;
updating the database file to apply the frame stored in the appended file based on identifying that an update condition is satisfied; and
after updating the database file, allocating the reserved space to the database file,
wherein the update condition comprises a condition that a size of the appended file corresponds to a predetermined size, or a condition that the number of frames included in the appended file corresponds to a predetermined number.

### Claim 8 (depends on 7)

The method of claim 7, wherein allocating a reserved space to the appended file comprises:
allocating the reserved space to the appended file based on the storage space of the memory having a size equal to or greater than a specified size; and
not allocating the reserved space to the appended file based on the storage space of the memory being less than the specified size.

### Claim 9 (depends on 1)

The electronic device of claim 1, wherein the appended file is a write ahead log.
