Write-Ahead Log Header Initialization for Database Storage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face issues with file system fragmentation and reduced storage device lifespan due to repeated changes in metadata and cleanup operations when using write-ahead logging (WAL) schemes, especially when WAL files are deleted or truncated.

Innovation Solution

An electronic device and method that initialize the WAL file header without deleting or truncating the WAL file, allowing for reuse and preventing file system fragmentation, by modifying the validity data in the header when the database is terminated or started.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the WAL file is deleted or truncated when database use is ended, then the database can be cleaned up, but file system fragmentation increases and storage device lifespan decreases

Engineering Contradiction:
Improvedata integrityVSAvoidstorage device lifespan
Core Design Contradiction:
ReliabilityVSDuration of action of stationary object

Solution Approach 1:

Instead of deleting the WAL file when database use is ended, the patent initializes the header of the WAL file to reuse it for future transactions. This recovers the file for continued use without deleting it, thereby preventing file system fragmentation and reducing disk I/O operations that would otherwise occur with repeated deletion and creation cycles.

Inventive Principle:
Principle #34Discarding and recovering

2Quantity of substance

If the WAL file is deleted or truncated when database use is ended, then memory can be freed, but file system fragmentation increases

Engineering Contradiction:
Improvememory usageVSAvoidfile system structure
Core Design Contradiction:
Quantity of substanceVSStability of the object's composition

Solution Approach 1:

The patent initializes the WAL file header rather than deleting the file, allowing the file to be reused for subsequent transactions. This approach maintains file system structure integrity by avoiding repeated deletion and cleanup operations, while still managing memory usage effectively.

Inventive Principle:
Principle #34Discarding and recovering

3Productivity

If repeated cleanup operations are performed on the WAL file region, then data can be managed, but disk input and output operations increase

Engineering Contradiction:
Improvedata management efficiencyVSAvoiddisk I/O operations
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

By initializing the WAL file header instead of deleting the file, the patent enables reuse of the same file for future transactions. This eliminates the need for repeated cleanup operations and associated disk I/O operations, thereby reducing energy consumption and improving data management efficiency.

Inventive Principle:
Principle #34Discarding and recovering

Solution Approach 2:

The patent maintains continuous use of the WAL file by initializing its header rather than deleting it. This ensures the file remains available for ongoing transaction processing without interruption, reducing the frequency of disk I/O operations that would be required if the file were repeatedly deleted and recreated.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS11379458B2Electronic device and data management method thereof
Publication Date: 2022.07.05 SAMSUNG ELECTRONICS CO LTD
  • US11379458B2 patent drawing
  • US11379458B2 patent drawing
  • US11379458B2 patent drawing

AI summary

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.