# US 2017/0293536 A1 · Database journaling method and apparatus

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

- Number: US 2017/0293536 A1
- Document ID: US20170293536A1
- Status: Published application
- Kind: A1
- Application number: 15/372,310
- Filed: 2016-12-07
- Published: 2017-10-12
- Earliest claimed: 2016-04-06
- Assignees: Iucf-Hyu (Industry-University Cooperation Foundation Hanyang University); Unist (Ulsan National Institute of Science and Technology)
- Applicants: IUCF-HYU(Industry-University Cooperation Foundation Hanyang University); Unist(Ulsan National Institute of Science and Technology)
- Inventors: You Jip WON; Beom Seok NAM
- Web page: https://patentgrep.com/patent/US20170293536A1

## CPC

- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 11/1446: Point-in-time backing up or restoration of persistent data
- G06F 16/1815: {Journaling file systems}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 2201/80: Database-specific techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided is a database journaling method and apparatus for storing a log file in a storing apparatus by performing a lesser number of record commands to decrease a volume of data to be input and output by the storing apparatus, and the database journaling method may include determining whether a database is changed based on an operation performed on data in the database, generating a log file including log entries for the database when the database is changed, and performing journaling on the database by storing the generated log file in a storing apparatus, wherein each of the log entries includes a log record in which the data associated with a change of the database is stored, and metadata for the log record is recorded in a predetermined area embedded in the log record.

## Claims

### Claim 1

A database journaling method comprising:
determining whether a database is changed based on an operation performed on data in the database;
generating a log file including log entries for the database when the database is changed; and
performing journaling on the database by storing the generated log file in a storing apparatus,
wherein each of the log entries includes a log record in which the data associated with a change of the database is stored, and metadata for the log record is recorded in a predetermined area embedded in the log record.

### Claim 2 (depends on 1)

The method of claim 1, wherein, when a journaling mode of the database is a rollback journaling mode, the predetermined area includes a header area including a page number for the log record and a footer area including a checksum for at least one piece of the data stored in the log record, and the data obtained before the database is changed is recorded in the log record.

### Claim 3 (depends on 2)

The method of claim 2, wherein a size of the predetermined area is determined based on a sum of a size of the header area and a size of the footer area.

### Claim 4 (depends on 1)

The method of claim 1, wherein, when a journaling mode of the database is a rollforward journaling mode, the predetermined area includes a frame header area including a checksum for the log record, and the data obtained after the database is changed is recorded in the log record.

### Claim 5 (depends on 4)

The method of claim 4, wherein a size of the predetermined area is identical to a size of the frame header area.

### Claim 6 (depends on 1)

The method of claim 1, wherein the predetermined area is set to be at least at one of an end portion, a start portion, and a middle portion of the log record.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
performing journaling on the log file in the storing apparatus using a record command corresponding to each of the log entries.

### Claim 8 (depends on 1)

The method of claim 1, wherein the database includes a plurality of nodes on which the data is recorded, and the data is added to a node of which a size of an available space is greater than or equal to a size of the predetermined area, from among the nodes.

### Claim 9 (depends on 1)

The method of claim 1, wherein the database includes a node on which the data is recorded, and the node is split such that a size of an available space of each of nodes generated by splitting the node is greater than or equal to a size of the predetermined area.

### Claim 10 (depends on 1)

The method of claim 1, wherein the database includes a plurality of nodes on which the data is recorded, and the nodes are merged such that a size of an available space of a node generated by merging the nodes is greater than or equal to a size of the predetermined area.

### Claim 11

A database journaling apparatus comprising:
a processor,
wherein the processor is configured to determine whether a database is changed based on an operation performed on data in the database, generate a log file including log entries for the database when the database is changed, perform journaling on the database by storing the generated log file in a storing apparatus, and each of the log entries includes a log record in which the data associated with a change of the database is stored, and metadata for the log record is recorded in a predetermined area embedded in the log record.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein, when a journaling mode of the database is a rollback journaling mode, the processor is configured to allocate, to the predetermined area, a header area including a page number for the log record and a footer area including a checksum for at least one piece of the data stored in the log record, and the data obtained before the database is changed is recorded in the log record.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein, when a journaling mode of the database is a rollforward journaling mode, the processor is configured to allocate, to the predetermined area, a frame header area including a checksum for the log record, and the data obtained after the database is changed is recorded in the log record.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the database includes a plurality of nodes on which the data is recorded, and the processor is configured to add the data to a node of which a size of an available space is greater than or equal to a size of the predetermined area from among the nodes when the data is added to any one of the nodes.

### Claim 15 (depends on 11)

The apparatus of claim 11, wherein the database includes a node on which the data is recorded, and the processor is configured to split the node such that a size of an available space of each of nodes generated by splitting the node is greater than or equal to a size of the predetermined area.

### Claim 16 (depends on 11)

The apparatus of claim 11, wherein the database includes a plurality of nodes on which the data is recorded, and the processor is configured to merge the nodes such that a size of an available space of a node generated by merging the nodes is greater than or equal to a size of the predetermined area.

### Claim 17 (depends on 1)

A non-transitory computer-readable storage medium storing a program to implement the method of claim 1.
