IP Library Granted Patent US 10,394,797
Granted Patent B2
US 10,394,797 · App. 15/085,871 · Granted Aug 27, 2019

Method and computing apparatus for managing main memory database

Inventor: Se Hoon Seo (Seoul, KR)
Assignee: TmaxData Co., Ltd.
G06F16/2365G06F16/2379
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,394,797
App. No.
15/085,871
Granted
Aug 27, 2019
Kind
B2
Abstract

An exemplary embodiment of the present disclosure discloses a management method of a main memory database which is performed in a computing apparatus including one or more processors and a main memory which stores commands executable in the processors. The management method of the main memory database includes: generating a first log including information of change, which includes at least one of a data insert, an update, and a deletion of data recorded in the main memory, in the main memory; recording the first log in a permanent storing device to generate a first log file; and performing log compaction on the first log to generate a second log including only effective change information among change information on data in order to reduce a size of the log.

Claims (65)

1. A management method of a main memory database which is performed in a computing apparatus including one or more processors and a main memory, which stores commands executable in the processors, the method comprising:

generating in the main memory a first log which is a target of the log compaction including collected change information of each change when the change occurs, which includes at least one of a data insertion, an update, and a deletion of data recorded in the main memory by one of the processors;

recording the first log which is a target of the log compaction in the main memory in a permanent storing device to generate a first log file by one of the processors; and

performing log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate a second log including only effective change information among change information on individual data in order to reduce the size of the log by one of the processors,

wherein the data is configured by one or more versions which are connected by a link and generate a version chain, based on a modified time sequence,

wherein the version chain is connected with a link which connects a next version and a previous version based on a version identification information, in order to read a data corresponding to a transaction in accordance with the link of the version chain of the data when reading a data recorded in the database,

wherein the version includes a header and a data field,

wherein the header includes at least one of a flag which indicates a usage state of the version or whether the version is deleted, the version identification information which includes information for identifying a version, a time stamp which includes information about time of a transaction related with the version, and data identification information which includes identification information indicating whether a value recorded in the data field is located in a specific column and row of the data table of the database,

wherein the version identification information includes information of an address value on a main memory of a next version of the data, in order to link with the next version,

wherein the data field includes a data value.

2. The method of claim 1 , further comprising:

determining whether a predetermined condition is satisfied to perform log compaction which leaves only effective change information among change information of the data included in the log in order to reduce a size of the log by one or more processors;

wherein the predetermined condition includes at least one of whether a user request is received, whether a predetermined period has elapsed, whether the size of the log file is equal to or larger than a predetermined size, and whether a usage amount of the processor is equal to or lower than a predetermined usage amount.

3. The method of claim 1 , wherein the permanent storing device of the main memory database includes a log file which is a log stored in the permanent storing device wherein the log is generated on the main memory, but does not include a data file, wherein the database on the main memory is stored in the permanent storing device.

4. The method of claim 1 , further comprising:

recording the second log in the permanent storing device to generate a generated second log file which includes only effective change information among change information of the data included in the log by log compaction which leaves only effective change information among change information of the data included in the log in order to reduce the size of the log by one or more processors; and

deleting the first log file which is generated by recording the first log which is a target of the log compaction in the main memory in the permanent storing device by one or more processors from the permanent storing device by one or more processors.

5. The method of claim 1 , wherein the performing of log compaction which leaves only effective change information among change information of the data included on the first log to generate the second log including only effective change information among change information on individual data in order to reduce the size of the log by one or more processors includes:

reading change information of the first log file to identify data by one or more processors; and

determining that change information which matches the latest version of the identified data among the change information on the identified data in the first log file as the effective change information by one or more processors.

6. The method of claim 5 , wherein the reading of change information of the first log file to identify data by one or more processors includes:

identifying data corresponding to change information of a predetermined time limit among the change information included in the first log file by one or more processors.

7. The method of claim 1 , wherein the performing of log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate the second log including only effective change information among change information on individual data in order to reduce the size of the log by one or more processors includes:

comparing the time stamp of the change information and the time stamp of the latest version of the data to determine the change information having a time stamp earlier than the time stamp of the latest version of the data as invalid change information by one or more processors; and

comparing the time stamp of the change information and the time stamp of the latest version of the data to determine the change information having a time stamp after the time stamp of the latest version of the data as effective change information by one or more processors.

8. The method of claim 1 , wherein the performing of log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate the second log including only effective change information among change information on individual data included by one or more processors:

scanning the main memory to identify the data by one or more processors;

reading a latest version of the identified data by one or more processors; and

generating the second log including the latest version of the data by one or more processors.

9. The method of claim 1 , further comprising:

generating changed data identification information including information for identifying changed data when data is changed in the database by one or more processors,

wherein the performing of log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate the second log including only effective change information among change information on individual data in order to reduce the size of the log by one or more processors includes:

scanning the changed data identification information which includes information for identifying which data is changed in the database to identify changed data by one or more processors;

reading a latest version of the identified data by one or more processors; and

generating the second log including the latest version of the data by one or more processors.

10. The method of claim 1 , further comprising:

generating block data change information which identifies changed data when the data is changed in a data block header of the main memory, in which the main memory includes two or more data blocks by one or more processors;

wherein the performing of log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate the second log including only effective change information among change information on individual data in order to reduce the size of the log by one or more processors includes:

scanning each data block header of the main memory to read block data change information and determine whether the block data change information indicates the change of data included in each data block by one or more processors;

scanning the data block to identify changed data when the block data change information indicates change of data included in the data block as a result of determination by one or more processors;

reading a latest version of the identified data by one or more processors; and

generating the second log including the latest version of the data by one or more processors.

11. A computing apparatus including a main memory database, the computing apparatus comprising:

one or more processors;

a main memory that is configured to store commands executable by one or more processors;

wherein the one or more processors are configured to process at least instructions from a log generating module, a log file generating module, and a log compaction module;

where the log generating module is configured to generate in the main memory a first log which is a target of the log compaction including information of change, which includes at least one of a data insertion, an update, and a deletion of data recorded in the main memory;

where the log file generating module is configured to record the first log which is a target of the log compaction in the main memory in a permanent storing device to generate a first log file; and

where the log compaction module is configured to perform log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate a second log including only effective change information among change information on data in order to reduce a size of the log

wherein the data is configured by one or more versions which are connected by a link and generate a version chain, based on a modified time sequence,

wherein the version chain is connected with a link which connects a next version and a previous version based on a version identification information, in order to read a data corresponding to a transaction in accordance with the link of the version chain of the data when reading a data recorded in the database,

wherein the version includes a header and a data field,

wherein the header includes at least one of a flag which indicates a usage state of the version or whether the version is deleted, version identification information which includes information for identifying a version, a time stamp which includes information about time of a transaction related with the version, and data identification information which includes identification information indicating whether a value recorded in the data field is located in a specific column and row of the data table of the database,

wherein the version identification information includes information of an address value on a main memory of a next version of the data, in order to link with the next version,

wherein the data field includes a data value.

12. A computer program stored in a non-transitory computer readable medium, including a plurality of commands executed by one or more processors, the computer program comprising:

a first command for generates in the main memory a first log which is a target of the log compaction including information of change, which includes at least one of a data insertion, an update, and a deletion of data recorded in the main memory, where the first command is stored in the non-transitory computer readable medium and executed by the one or more processors;

a second command for recording the first log which is a target of the log compaction in the main memory in a permanent storing device to generate a first log file, where the second command is stored in the non-transitory computer readable medium and executed by the one or more processors; and

a third command for performing log compaction which leaves only effective change information among change information of the data included in the log on the first log to generate a second log including only effective change information among change information on data in order to reduce a size of the log, where the third command is stored in the non-transitory computer readable medium and executed by the one or more processors

wherein the data is configured by one or more versions which are connected by a link and generate a version chain, based on a modified time sequence,

wherein the version chain is connected with a link which connects a next version and a previous version based on a version identification information, in order to read a data corresponding to a transaction in accordance with the link of the version chain of the data when reading a data recorded in the database,

wherein the version includes a header and a data field,

wherein the header includes at least one of a flag which indicates a usage state of the version or whether the version is deleted, version identification information which includes information for identifying a version, a time stamp which includes information about time of a transaction related with the version, and data identification information which includes identification information indicating whether a value recorded in the data field is located in a specific column and row of the data table of the database,

wherein the version identification information includes information of an address value on a main memory of a next version of the data, in order to link with the next version,

wherein the data field includes a data value.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 12, 2022
From: TMAXDATACO., LTD. (ALSO KNOWN AS TMAXDATA CO., LTD. AND TMAX DATA CO., LTD.)
To: TMAXTIBERO CO., LTD.
Reel/Frame 060635/0387 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 12, 2016
From: SEO, SE HOON
To: TMAXDATA CO., LTD
Reel/Frame 038258/0863 →
Priority Claims (1)
KR 10-2016-0028676 · Mar 10, 2016 · national
Continuity (1)
Related Publication 20170262489A1 · Sep 14, 2017