WO2008133373A1 - Database management system based on in-page logging and method using the system - Google Patents
Database management system based on in-page logging and method using the system Download PDFInfo
- Publication number
- WO2008133373A1 WO2008133373A1 PCT/KR2007/003626 KR2007003626W WO2008133373A1 WO 2008133373 A1 WO2008133373 A1 WO 2008133373A1 KR 2007003626 W KR2007003626 W KR 2007003626W WO 2008133373 A1 WO2008133373 A1 WO 2008133373A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- storage space
- database
- log
- erase unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/40—Data acquisition and logging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present invention relates to a database management system, and more particularly, to a non-volatile memory based data management system, which is represented as a flash memory.
- a database indicates all types of data storage media capable of storing data such as a magnetic disk and a semiconductor memory, and requires a data management system which conforms to different physical features since the data storage media have the different physical features according to their types.
- a magnetic disk is used for a conventional database.
- the magnetic disk has read/write times of a couple of milliseconds per kilobyte. Also, the magnetic disk has a feature that the read/write times differ since arms' accessing times differ depending on physical locations of stored data.
- the non-volatile memory device is a semiconductor memory device which is electrically capable of reading, writing, and erasing, and is capable of maintaining programmed data when power is not supplied.
- the operation of storing data with respect to the non-volatile memory device is also referred to as 'programming' as well as 'writing'.
- the non-volatile memory device are variously applied to portable devices such as a digital camera, a cellular phone, a personal data assistant (PDA), a lap-top computer, and the like, and is capable of storing a great amount of data in a small dimension on a semiconductor chip.
- portable devices such as a digital camera, a cellular phone, a personal data assistant (PDA), a lap-top computer, and the like.
- PDA personal data assistant
- lap-top computer and the like
- a NAND flash memory is broadly utilized for mass storage devices.
- the NAND flash memory has a read time of dozens of microseconds per kilobyte and a write time of hundreds of microseconds per kilobyte.
- a write time and an erase time are generally different from each other in the
- NAND flash memory since the erase time is up to a couple of milliseconds, a method of simultaneously erasing a plurality of memory cells is used to reduce an erase time with respect to all data to be erased.
- a unit of the plurality of memory cells, which are simultaneously erased is referred to as an erase unit.
- the non-volatile memory has a feature of asymmetric times of read/write/erase since required times for reading, writing, and erasing are respectively different in the non-volatile memory which includes the NAND flash memory. Also, it is different from the conventional magnetic disk in that a location where data is stored scarcely affects read/write/erase features since the non-volatile memory electrically accesses data.
- the present invention provides a database management system and method in a non-volatile memory based database which requires less time to update data even when the data is randomly accessed.
- the present invention also provides a non-volatile memory based database management system and method which can respond to approval and abortion of a transaction without an additional overhead.
- the present invention also provides a non-volatile memory based database management system and method which can be applied to portable devices due to less power consumption.
- a database management system including: a database including a plurality of non- volatile memory erase units; and a database manager allocating a data storage space and a log storage space to each of the erase units, and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which include the data storage space.
- a database management method including: allocating a data storage unit and a log storage space to each of erase units of a database including a plurality of non- volatile memory erase units; and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which includes the data storage space.
- FIG. 1 is a diagram illustrating a database of a database management system according to an exemplary embodiment of the present invention
- FIG. 2 is a diagram a data flow of a database and a database buffer of a database management system according to an exemplary embodiment of the present invention
- FIG. 3 is a block diagram illustrating a database management system according to an exemplary embodiment of the present invention
- FIG. 4 is a flowchart illustrating a database management method according to an exemplary embodiment of the present invention.
- FIG. 5 is a flowchart illustrating merging operations provided by a database management method according to an exemplary embodiment of the present invention.
- FIG. 1 is a diagram illustrating a database 100 of a database management system according to an exemplary embodiment of the present invention.
- the database 100 of the database management system includes four erase units 110, 120, 130, and 140.
- a data storage space and a log storage space are allocated to each of the four erase units 110, 120, 130, and 140.
- a non-volatile memory a plurality of memory cells are simultaneously erased when erasing the memory cells.
- a minimum collection of the simultaneously erased plurality of memory cells is referred to as an erase unit. That is, memory cells in erase units are simultaneously erased in the erase units.
- current data is calculated based on the original data and the change log associated with the original data which is stored in the first log storage space 114.
- the calculated current data is outputted to the processor.
- an erase unit includes a data storage space and a log storage space.
- the change log is sequentially stored in a free space of the log storage space.
- the change log includes address information of the original data corresponding to the change log.
- a non-volatile memory has a feature of a uniform random access speed for data to be read regardless of an address of stored data.
- a data access speed may not be affected even when having a log storage space scattered all over non-volatile memory area, without having a contiguous log storage space.
- the non-volatile memory generally has an asymmetric read/write speed, that is a data storage time is longer than a data read time, and a data erase time is longer than the data storage time.
- a data erase operation is not required and a data update time may be reduced since the stored data is not directly updated when updating the stored data and required information for the updating are sequentially stored in a log storage space of an erase unit, which includes the stored data.
- the in-page logging method of the present invention enables the merge operation, and does not require individual erase operations with respect to the data storage space and the log storage space due to the merge operation, thereby updating data via a single erase operation. Accordingly, overhead time may be minimized even when a log storage space has no free space.
- the result of the transaction may be applied using a minimized overhead without considering whether the transaction is approved or aborted.
- the result of the transaction is confirmed without an additional operation.
- a change log corresponding to the aborted transaction is checked to be ignored.
- FIG. 2 is a diagram of a data flow of a database and a database buffer 220 of a database management system according to an exemplary embodiment of the present invention.
- the database buffer 220 of the database management system includes a plurality of data storage spaces 221 and a plurality of log storage spaces 222.
- An erase unit 210 includes a plurality of data storage space 211 and a plurality of log storage space 212.
- the database buffer 220 stores one of original data, which is accessed by a processor, as in-memory data, in the data storage spaces 221.
- the database management system In-place updates, the in-place updating overwrites the in- memory data in an in-memory data location. Also, the database management system stores an update log with respect to the updated in-memory data in the log storage spaces 222 of the database buffer 220. When another original data in the database is accessed by the processor, the other accessed original data is stored in the data storage spaces 221 of the database buffer 220.
- any one of the in-memory data stored in the data storage spaces 221 is evicted to the database instead of the accessed another original data, and the other accessed original data is stored as a new in-memory data in an area where the evicted in-memory data is stored.
- a change log is stored in the log storage space 212 of the erase unit 210 from an update log associated with the evicted data, which is stored in the log storage spaces 222 of the database buffer 220.
- the evicted data is not required to be directly stored in the database since the change log is stored in the database.
- the database management system of the present invention since the change log is stored in the log storage space 212 of the erase unit 210 only when data evicted from the database buffer 220, a number of storing operations may be reduced with respect to the database. Since a storing operation with respect to the nonvolatile memory generally requires a great amount of power, the database management system of the present invention may be easily applied to portable applications due to the reduced number of the storing operations.
- the original data of the database corresponding to the in- memory data is stored in the erase unit 210 when the update for the in-memory data is requested by the processor and when the log storage spaces 222 of the database buffer 220 has no free space to store the update log, a change log is stored in the log storage space 212 of the erase unit 210 from an update log associated with the in-memory data.
- the update logs are required to be stored in the database when updates frequently occur with respect to the in-memory data since a defined number of update logs are stored in the log storage unit 222 of the database buffer 220.
- FIG. 3 is a block diagram illustrating a database management system according to an exemplary embodiment of the present invention.
- the database management system includes a database 310, a database manager 320, a database buffer 330, and a buffer manager 340.
- the database 310 includes a plurality of erase units.
- An erase unit in the non-volatile memory indicates a minimum collection of memory cells which are simultaneously erased.
- the database manager 320 allocates a data storage space and a log storage space to each of the erase units, and stores a change log associated with original data of the data storage space in the log storage space of an erase unit, which includes the data storage space.
- the database manager 320 maintains the original data when an update for the original data is requested by a processor, and generates the change log associated with the original data according to the requested update for the original data.
- the database manager 320 may store the generated change log in the log storage space of the erase unit, which includes the data storage space.
- the database management system may calculate current data based on the original data and the change log associated with original data, and output the calculated current data to the processor.
- the calculating and outputting operations may be performed by the database manager 320.
- the database manager 320 may allocate another available erase unit, store the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erase the previous erase unit. In this instance, the database manager 320 may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
- a non- volatile memory generally uses a wear-leveling to increase life span.
- the memory cell of the non-volatile memory when storing and erasing operations are repeated, the memory cell may no longer be used since characteristics of the memory cell of the non- volatile memory may degrade, therefore management for a number of the storing and erase operations is required. Ideally, it may be desirable to repeat a same number of the storing operation as a same number of the erase operation. Accordingly, the database manager 320 selects the other available erase unit based on the number of used times of each erase units when allocating the available erase unit, thereby enabling a number of used times of all memory cells in the database
- the database manager 320 may generate current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log.
- the database manager 320 applies a change log which corresponds to an approved transaction from the change logs to calculate the current data, and disregards another change log which corresponds to an aborted transaction.
- the database manager 320 determines whether to apply a change log, approved or aborted, to calculate the current data since it is not clear whether to approve the change log which corresponds to the activated transaction.
- the database manager 320 allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
- the database manager 320 allocates the other available erase unit as the overflow erase unit instead of performing the merge operation, and stores a change log in the overflow erase unit afterward.
- the database buffer 330 stores one of original data, which is accessed by the processor, as in-memory data.
- the database buffer 330 may be a volatile memory having a shorter access time than the database 310.
- the database buffer 330 may be a dynamic random access memory (RAM) or a static RAM.
- the buffer manager 340 updates the in-memory data when an update for the in- memory data is requested by the processor, stores the updated in-memory data in the database buffer 330, and stores an update log about the updated in-memory data in another space of the database buffer 330.
- the database manager 320 stores a change log associated with the in-memory data in the log storage space of the erase unit, which includes the data storage space where the original data is stored.
- the database manager 320 when an update for the in-memory data is requested by the processor and when the database buffer 330 has no free space to store the update log, the database manager 320 stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
- FIG. 4 is a flowchart illustrating database management method according to an exemplary embodiment of the present invention.
- the database management method allocates a data storage space and a log storage space to each of erase units of a database, which includes a plurality of nonvolatile memory erase units in operation S410.
- the database management method stores a change log associated with original data of the data storage space in the log storage space of an erase unit, which include the data storage space in operation S420.
- the database management method maintains the original data and stores the change log associated with the original data in the log storage space of the erase unit, which includes the data storage space where the original data is stored.
- the database management method calculates current data based on the original data and the change log associated with original data in operation S430.
- the database management method outputs the calculated current data to the processor in operation S440.
- a database management method allocates another available erase unit, stores the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erases the previous erase unit.
- the database management method may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
- FIG. 5 is a flowchart illustrating merging operations provided by a database management method according to an exemplary embodiment of the present invention.
- the database management method according to the exemplary embodiment of the present invention allocates another available erase unit when a log storage space has no free space to store a change log in operation S510.
- the database management method may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
- the database management method determines whether a change log associated with original data of a previous erase unit exists in operation S520.
- the database management method calculates current data based on the original data and the change log associated with original data in operation S530.
- the database management method may generate the current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log.
- the database management method stores the calculated current data in the allocated erase unit in operation S540.
- the database management method stores the original data in the allocated erase unit when the change log associated with the original data does not exist.
- the database management method erases the previous erase unit after storing the current data in the allocated erase unit in operation S550.
- a database management method stores one of original data, which is accessed by a processor, as in-memory data in a database buffer.
- the database management method updates the in-memory data when an update for the in-memory data is requested by the processor, stores the updated in-memory data in the database buffer, and stores the update log about the updated in-memory data in another space of the database buffer.
- the database management method may store a change log associated with the in- memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
- the database management method stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
- the database management method allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
- the database management method may be recorded in computer-readable media including program instructions to implement various operations embodied by a computer.
- the media may also include, alone or in combination with the program instructions, data files, data structures, and the like.
- Examples of computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD ROM disks and DVD; magneto-optical media such as optical disks; and hardware devices that are specially configured to store and perform program instructions, such as read-only memory (ROM), random access memory (RAM), flash memory, and the like.
- the media may also be a transmission medium such as optical or metallic lines, wave guides, and the like, including a carrier wave transmitting signals specifying the program instructions, data structures, and the like.
- Examples of program instructions include both machine code, such as produced by a compiler, and files containing higher level code that may be executed by the computer using an interpreter.
- the described hardware devices may be configured to act as one or more software modules in order to perform the operations of the above-described embodiments of the present invention.
- a database management system and database management method in a non-volatile memory based database whi ch requires less time to update data even when the data is randomly accessed. Also, according to the present invention, it is possible to implement a database management system and database management method which can respond to approval and abortion of a transaction without an additional overhead.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A non- volatile memory based database management system and method is provided. The dat abase management system includes: a database including a plurality of non- volatile memory erase units; and a database manager allocating a data storage space and a log storage space to each of the erase units, and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which include the data storage space, thereby reducing a non- volatile memory based database access time.
Description
DATABASE MANAGEMENT SYSTEM BASED ON IN-PAGE LOGGING AND
METHOD USING THE SYSTEM
Technical Field The present invention relates to a database management system, and more particularly, to a non-volatile memory based data management system, which is represented as a flash memory.
Background Art This work was supported by the IT R&D program of Ministry of Information and Communication (MIC) and Institute of Information Technology Advancement (HTA) Republic of Korea. [2006-S-040-01, Development of Flash Memory-based Embedded Multimedia Software]
A database indicates all types of data storage media capable of storing data such as a magnetic disk and a semiconductor memory, and requires a data management system which conforms to different physical features since the data storage media have the different physical features according to their types.
A magnetic disk is used for a conventional database. As a general feature of the magnetic disk, the magnetic disk has read/write times of a couple of milliseconds per kilobyte. Also, the magnetic disk has a feature that the read/write times differ since arms' accessing times differ depending on physical locations of stored data.
Currently, a non-volatile memory device having shorter read/write times, requiring less power consumption, and having a smaller size in comparison to the magnetic disk is rapidly being substituted for the magnetic disk. This is possible since high capacity of the non- volatile memory device is achieved.
The non-volatile memory device is a semiconductor memory device which is electrically capable of reading, writing, and erasing, and is capable of maintaining programmed data when power is not supplied. The operation of storing data with respect to the non-volatile memory device is also referred to as 'programming' as well as 'writing'.
The non-volatile memory device are variously applied to portable devices such
as a digital camera, a cellular phone, a personal data assistant (PDA), a lap-top computer, and the like, and is capable of storing a great amount of data in a small dimension on a semiconductor chip.
Among non-volatile memory devices, a NAND flash memory is broadly utilized for mass storage devices. The NAND flash memory has a read time of dozens of microseconds per kilobyte and a write time of hundreds of microseconds per kilobyte.
Also, a write time and an erase time are generally different from each other in the
NAND flash memory, and since the erase time is up to a couple of milliseconds, a method of simultaneously erasing a plurality of memory cells is used to reduce an erase time with respect to all data to be erased. In this instance, a unit of the plurality of memory cells, which are simultaneously erased, is referred to as an erase unit.
As described above, unlike the conventional magnetic disk, the non-volatile memory has a feature of asymmetric times of read/write/erase since required times for reading, writing, and erasing are respectively different in the non-volatile memory which includes the NAND flash memory. Also, it is different from the conventional magnetic disk in that a location where data is stored scarcely affects read/write/erase features since the non-volatile memory electrically accesses data.
In the conventional magnetic disk, a data erase operation is included in a data write operation, therefore an additional erase time is not required. When there is a need to update data, updated data is overwritten in a location of a previous data.
However, in the non-volatile memory, a data erase operation and a data write operation are separate, therefore an additional erase time is required, and when a method applied to the conventional magnetic disk is applied to the non-volatile memory, a great amount of time is required to update data. Specifically, when randomly accessing data and when randomly updating data, a greater amount of time is required.
Accordingly, a more effective database management system is required in a non-volatile memory based database.
Disclosure of Invention Technical Goals
The present invention provides a database management system and method in a non-volatile memory based database which requires less time to update data even when
the data is randomly accessed.
The present invention also provides a non-volatile memory based database management system and method which can respond to approval and abortion of a transaction without an additional overhead. The present invention also provides a non-volatile memory based database management system and method which can be applied to portable devices due to less power consumption.
Technical solutions According to an aspect of the present invention, there is provided a database management system including: a database including a plurality of non- volatile memory erase units; and a database manager allocating a data storage space and a log storage space to each of the erase units, and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which include the data storage space.
According to another aspect of the present invention, there is provided a database management method including: allocating a data storage unit and a log storage space to each of erase units of a database including a plurality of non- volatile memory erase units; and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which includes the data storage space.
Brief Description of Drawings
FIG. 1 is a diagram illustrating a database of a database management system according to an exemplary embodiment of the present invention;
FIG. 2 is a diagram a data flow of a database and a database buffer of a database management system according to an exemplary embodiment of the present invention;
FIG. 3 is a block diagram illustrating a database management system according to an exemplary embodiment of the present invention; FIG. 4 is a flowchart illustrating a database management method according to an exemplary embodiment of the present invention; and
FIG. 5 is a flowchart illustrating merging operations provided by a database
management method according to an exemplary embodiment of the present invention.
Best Mode for Carrying Out the Invention
Hereinafter, embodiments of the present invention will be described in the accompanying drawings.
FIG. 1 is a diagram illustrating a database 100 of a database management system according to an exemplary embodiment of the present invention.
Referring to FIG. 1, the database 100 of the database management system according to the exemplary embodiment of the present invention includes four erase units 110, 120, 130, and 140. A data storage space and a log storage space are allocated to each of the four erase units 110, 120, 130, and 140.
There are three pages of data storage spaces 111, 112, and 113 and four sectors of log storage spaces 114, 115, 116, and 117 in the first erase unit 110.
Generally, in a non-volatile memory, a plurality of memory cells are simultaneously erased when erasing the memory cells. In this instance, a minimum collection of the simultaneously erased plurality of memory cells is referred to as an erase unit. That is, memory cells in erase units are simultaneously erased in the erase units.
When an update to update contents of original data stored in the second data storage space 112 included in the first erase unit 110 is requested by a processor, the original data is maintained, and a change log associated with the original data is stored in the first log storage space 114.
In this instance, when the processor accesses the original data, current data is calculated based on the original data and the change log associated with the original data which is stored in the first log storage space 114. The calculated current data is outputted to the processor.
In the specification of the present invention, a database management method provided by the database management system of the present invention is referred to as an in-page logging method. In the database management method provided by the database management system of the present invention, an erase unit includes a data storage space and a log storage space.
The change log is sequentially stored in a free space of the log storage space.
The change log includes address information of the original data corresponding to the change log.
When a log storage space has no free space to store the change log in the first erase unit 110, an available erase unit of other erase units 120, 130, and 140 is allocated, the current data corresponding to the original data of the first erase unit 110 is stored in the allocated erase unit, and the first erase unit 110 is erased. The erased first erase unit 110 switches to a storable state. The above operation is referred to as a merge operation.
Generally, a non-volatile memory has a feature of a uniform random access speed for data to be read regardless of an address of stored data.
Thus, according to the database management system of the present invention, a data access speed may not be affected even when having a log storage space scattered all over non-volatile memory area, without having a contiguous log storage space.
Also, the non-volatile memory generally has an asymmetric read/write speed, that is a data storage time is longer than a data read time, and a data erase time is longer than the data storage time.
Accordingly, it takes a great amount of time for a general non-memory management system to erase a stored data and to store the data which will be updated in an erased storage space to update the previously stored data. According to the database management system of the present invention, a data erase operation is not required and a data update time may be reduced since the stored data is not directly updated when updating the stored data and required information for the updating are sequentially stored in a log storage space of an erase unit, which includes the stored data.
Also, the in-page logging method of the present invention enables the merge operation, and does not require individual erase operations with respect to the data storage space and the log storage space due to the merge operation, thereby updating data via a single erase operation. Accordingly, overhead time may be minimized even when a log storage space has no free space.
A required time for the merge operation is calculated by, [Equation 1]
Emerge "" ("-cP~K-l) X Cread "■" Λ-d X Cwrjte ' Cerase where Cmerge indicates a required time for the merge operation, Kd indicates a
number of sectors of a data storage space within a first erase unit 110, Ki indicates a number of sectors of a log storage space within a first erase unit 110, Cread indicates a required time for a single read, Cwrite indicates a required time for a single write, and Cerase indicates a required time for a single erase. Generally, a transaction indicating an update request for ori ginal data in a database 100 may be approved or aborted.
When the transaction is approved, the transaction is confirmed, and a result of the transaction is maintained. Conversely, when the transaction is aborted, a result of the transaction is required to be recovered to a state prior to the transaction. When approval or abortion with respect to the transaction is not determined, it is referred to as an activated transaction.
According to the in-page logging method of the present invention, the result of the transaction may be applied using a minimized overhead without considering whether the transaction is approved or aborted. When the transaction is approved, the result of the transaction is confirmed without an additional operation. When the transaction is aborted, a change log corresponding to the aborted transaction is checked to be ignored.
FIG. 2 is a diagram of a data flow of a database and a database buffer 220 of a database management system according to an exemplary embodiment of the present invention.
Referring to FIG. 2, the database buffer 220 of the database management system according to the exemplary embodiment of the present invention includes a plurality of data storage spaces 221 and a plurality of log storage spaces 222.
An erase unit 210 includes a plurality of data storage space 211 and a plurality of log storage space 212.
The database buffer 220 stores one of original data, which is accessed by a processor, as in-memory data, in the data storage spaces 221.
When an update for the in-memory data is requested by the processor, the database management system in-place updates, the in-place updating overwrites the in- memory data in an in-memory data location. Also, the database management system stores an update log with respect to the updated in-memory data in the log storage spaces 222 of the database buffer 220.
When another original data in the database is accessed by the processor, the other accessed original data is stored in the data storage spaces 221 of the database buffer 220. When the data storage spaces 221 has no free space to store the update log, any one of the in-memory data stored in the data storage spaces 221 is evicted to the database instead of the accessed another original data, and the other accessed original data is stored as a new in-memory data in an area where the evicted in-memory data is stored.
It is assumed that the other accessed original data of the database corresponding to the evicted data is stored in the erase unit 210, a change log is stored in the log storage space 212 of the erase unit 210 from an update log associated with the evicted data, which is stored in the log storage spaces 222 of the database buffer 220. The evicted data is not required to be directly stored in the database since the change log is stored in the database.
According to the database management system of the present invention, since the change log is stored in the log storage space 212 of the erase unit 210 only when data evicted from the database buffer 220, a number of storing operations may be reduced with respect to the database. Since a storing operation with respect to the nonvolatile memory generally requires a great amount of power, the database management system of the present invention may be easily applied to portable applications due to the reduced number of the storing operations.
It is assumed that the original data of the database corresponding to the in- memory data is stored in the erase unit 210 when the update for the in-memory data is requested by the processor and when the log storage spaces 222 of the database buffer 220 has no free space to store the update log, a change log is stored in the log storage space 212 of the erase unit 210 from an update log associated with the in-memory data. The update logs are required to be stored in the database when updates frequently occur with respect to the in-memory data since a defined number of update logs are stored in the log storage unit 222 of the database buffer 220.
According to the database management system of the present invention, since a change log is stored in the log storage space 212 of the erase unit 210 only when the log storage space 222 of the database buffer 220 has no free space to store the change log, a number of storing operations with respect to the database may be reduced. In this
instance, since the database management system of the present invention may reduce a number of storing operations with respect to a non-volatile memory and reduce power consumption, the database management system of the present invention may be easily applied to portable applications. FIG. 3 is a block diagram illustrating a database management system according to an exemplary embodiment of the present invention.
Referring to FIG. 3, the database management system according to the exemplary embodiment of the present invention includes a database 310, a database manager 320, a database buffer 330, and a buffer manager 340. The database 310 includes a plurality of erase units.
An erase unit in the non-volatile memory indicates a minimum collection of memory cells which are simultaneously erased.
The database manager 320 allocates a data storage space and a log storage space to each of the erase units, and stores a change log associated with original data of the data storage space in the log storage space of an erase unit, which includes the data storage space.
In this instance, the database manager 320 maintains the original data when an update for the original data is requested by a processor, and generates the change log associated with the original data according to the requested update for the original data. The database manager 320 may store the generated change log in the log storage space of the erase unit, which includes the data storage space.
In this instance, when the update for the original data is requested from the processor, the database management system may calculate current data based on the original data and the change log associated with original data, and output the calculated current data to the processor. The calculating and outputting operations may be performed by the database manager 320.
In this instance, when the log storage space has no free space to store the change log, the database manager 320 may allocate another available erase unit, store the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erase the previous erase unit.
In this instance, the database manager 320 may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
A non- volatile memory generally uses a wear-leveling to increase life span. In the memory cell of the non-volatile memory, when storing and erasing operations are repeated, the memory cell may no longer be used since characteristics of the memory cell of the non- volatile memory may degrade, therefore management for a number of the storing and erase operations is required. Ideally, it may be desirable to repeat a same number of the storing operation as a same number of the erase operation. Accordingly, the database manager 320 selects the other available erase unit based on the number of used times of each erase units when allocating the available erase unit, thereby enabling a number of used times of all memory cells in the database
310 to be uniform, and expanding a life span of the database 310.
In this instance, the database manager 320 may generate current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log.
The database manager 320 applies a change log which corresponds to an approved transaction from the change logs to calculate the current data, and disregards another change log which corresponds to an aborted transaction. The database manager 320 determines whether to apply a change log, approved or aborted, to calculate the current data since it is not clear whether to approve the change log which corresponds to the activated transaction.
In this instance, when the log storage space has no free space to store the change log and when a ratio of an active change log, which corresponds to the activated transaction, to the change log exceeds a reference ratio, the database manager 320 allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
Since efficiency of the merge operation is not high when the activated transaction exceeds the reference ratio, the database manager 320 allocates the other available erase unit as the overflow erase unit instead of performing the merge operation, and stores a change log in the overflow erase unit afterward.
The database buffer 330 stores one of original data, which is accessed by the processor, as in-memory data.
In this instance, the database buffer 330 may be a volatile memory having a shorter access time than the database 310. As an example, the database buffer 330 may be a dynamic random access memory (RAM) or a static RAM.
The buffer manager 340 updates the in-memory data when an update for the in- memory data is requested by the processor, stores the updated in-memory data in the database buffer 330, and stores an update log about the updated in-memory data in another space of the database buffer 330. In this instance, when the in-memory data is evicted from the database buffer, the database manager 320 stores a change log associated with the in-memory data in the log storage space of the erase unit, which includes the data storage space where the original data is stored.
In this instance, when an update for the in-memory data is requested by the processor and when the database buffer 330 has no free space to store the update log, the database manager 320 stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
FIG. 4 is a flowchart illustrating database management method according to an exemplary embodiment of the present invention.
Referring to FIG. 4, the database management method according to the exemplary embodiment of the present invention allocates a data storage space and a log storage space to each of erase units of a database, which includes a plurality of nonvolatile memory erase units in operation S410. The database management method stores a change log associated with original data of the data storage space in the log storage space of an erase unit, which include the data storage space in operation S420.
In this instance, when an update for the original data is requested by the processor, the database management method maintains the original data and stores the change log associated with the original data in the log storage space of the erase unit, which includes the data storage space where the original data is stored.
When the processor accesses the original data, the database management
method calculates current data based on the original data and the change log associated with original data in operation S430.
The database management method outputs the calculated current data to the processor in operation S440. According to another exemplary embodiment of the present invention, when the log storage space has no free space to store the change log, a database management method allocates another available erase unit, stores the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erases the previous erase unit. In this instance, the database management method may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
FIG. 5 is a flowchart illustrating merging operations provided by a database management method according to an exemplary embodiment of the present invention. Referring to FIG. 5, the database management method according to the exemplary embodiment of the present invention allocates another available erase unit when a log storage space has no free space to store a change log in operation S510.
In this instance, the database management method may select the other available erase unit based on a number of used times of each of erase units when allocating the other available erase unit.
The database management method determines whether a change log associated with original data of a previous erase unit exists in operation S520.
When the change log associated with the original data of the previous erase unit exists, the database management method calculates current data based on the original data and the change log associated with original data in operation S530.
In this instance, the database management method may generate the current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log. The database management method stores the calculated current data in the allocated erase unit in operation S540.
The database management method stores the original data in the allocated erase
unit when the change log associated with the original data does not exist.
The database management method erases the previous erase unit after storing the current data in the allocated erase unit in operation S550.
A database management method according to another exemplary embodiment of the present invention stores one of original data, which is accessed by a processor, as in-memory data in a database buffer.
The database management method updates the in-memory data when an update for the in-memory data is requested by the processor, stores the updated in-memory data in the database buffer, and stores the update log about the updated in-memory data in another space of the database buffer.
In this instance, only when the in-memory data is evicted from the database buffer, the database management method may store a change log associated with the in- memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
In this instance, when the update for the in-memory data is requested by the processor and when the database buffer has no free space to store the update log, the database management method stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
According to another exemplary embodiment of the present invention, when the log storage space has no free space to store the change log and when a ratio of an active change log, corresponding to the activated transaction, to the change log exceeds a reference ratio, the database management method allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
The database management method according to the above-described exemplary embodiments may be recorded in computer-readable media including program instructions to implement various operations embodied by a computer. The media may also include, alone or in combination with the program instructions, data files, data structures, and the like. Examples of computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD
ROM disks and DVD; magneto-optical media such as optical disks; and hardware devices that are specially configured to store and perform program instructions, such as read-only memory (ROM), random access memory (RAM), flash memory, and the like. The media may also be a transmission medium such as optical or metallic lines, wave guides, and the like, including a carrier wave transmitting signals specifying the program instructions, data structures, and the like. Examples of program instructions include both machine code, such as produced by a compiler, and files containing higher level code that may be executed by the computer using an interpreter. The described hardware devices may be configured to act as one or more software modules in order to perform the operations of the above-described embodiments of the present invention.
According to the present invention, it is possible to implement a database management system and database management method in a non-volatile memory based database whi ch requires less time to update data even when the data is randomly accessed. Also, according to the present invention, it is possible to implement a database management system and database management method which can respond to approval and abortion of a transaction without an additional overhead.
Also, according to the present invention, it is possible to embody a non-volatile memory based database management system and method which can be applied to portable devices due to less power consumption.
Although a few embodiments of the present invention have been shown and described, the present invention is not limited to the described embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A database management system, comprising: a database including a plurality of non- volatile memory erase units; and a database manager allocating a data storage space and a log storage space to each of the erase units, and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which include the data storage space.
2. The system of claim 1, wherein, when a processor accesses the original data, the database management system calculates current data based on the original data and the change log associated with the original data, and outputs the calculated current data to the processor.
3. The system of claim 1 , wherein, when an update for the original data is requested by the processor, the database manager maintains the original data, and stores the change log associated with the original data in the log storage space of the erase unit which includes the data storage space where the original data is stored.
4. The system of claim 1 , wherein the database management system further comprises: a database buffer storing one of the original data, which is accessed by the processor, as in-memory data; and a buffer manager updating the in-memory data when an update for the in- memory data is requested by the processor, storing the updated in-memory data in the database buffer, and storing an update log about the updated in-memory data in another space of the database buffer.
5. The system of claim 4, wherein, when the in-memory data is evicted from the database buffer, the database manager stores a change log associated with the in- memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
6. The system of claim 4, wherein, when an update for the in-memory data is requested by the processor and when the database buffer has no free space to store the update log, the database manager stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
7. The system of claim 1, wherein, when the log storage space has no free space to store the change log, the database manager allocates another available erase unit, stores the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erases data from the previous erase unit.
8. The system of claim 7, wherein the database manager selects the other available erase unit based on a number of used times of each of the erase units.
9. The system of claim 7, wherein the database manager generates the current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log.
10. The system of claim 1, wherein, when the log storage space has no free space to store the change log and when a ratio of an active change log, corresponding to the activated transaction, to the change log exceeds a reference ratio, the database manager allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
11. A database management method, comprising: allocating a data storage unit and a log storage space to each of erase units of a database including a plurality of non- volatile memory erase units; and storing a change log associated with original data of the data storage space in the log storage space of an erase unit which includes the data storage space.
12. The method of claim 11 , wherein, when a processor accesses the original data, the database management method calculates current data based on the original data and the change log associated with original data, and outputs the calculated current data to the processor.
13. The method of claim 11 , wherein, when an update for the original data is requested by the processor, the database management method maintains the original data and stores the change log associated with the original data in the log storage space of the erase unit which includes the data storage space where the original data is stored.
14. The method of claim 11 , further comprising: storing one of the original data, which is accessed by the processor, as in- memory data; and updating the in-memory data when an update for the in-memory data is requested by the processor, storing the updated in-memory data in the database buffer, and storing an update log about the updated in-memory data in another space of the database buffer.
15. The method of claim 14, wherein, when the in-memory data is evicted from the database buffer and when the database buffer has no free space to store the update log, the database management method stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in-memory data.
16. The method of claim 14, wherein, when an update for the in-memory data is requested by the processor and when the database buffer has no free space to store the update log, the database management method stores the change log associated with the in-memory data in the log storage space of the erase unit which includes the data storage space where the original data is stored, the original data corresponding to the in- memory data.
17. The method of claim 11 , wherein, when the log storage space has no free space to store the change log, the database management method allocates another available erase unit, stores the current data corresponding to the original data of a previous erase unit in the allocated erase unit, and erases data from the previous erase unit.
18. The method of claim 17, wherein the database management method selects the other available erase unit based on a number of used times of each of the erase units.
19. The method of claim 17, wherein the database management method generates the current data based on the original data and the change log associated with the original data of the previous erase unit, except for an active change log which corresponds to an activated transaction from the change log.
20. The method of claim 11 , wherein, when the log storage space has no free space to store the change log and when a ratio of an active change log, corresponding to the activated transaction, to the change log exceeds a reference ratio, the database management method allocates the other available erase unit as an overflow erase unit, and additionally stores the change log in the overflow erase unit.
21. At least one medium comprising computer readable instructions implementing the method of any one of claims 11 through 20.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020070042220A KR100900189B1 (en) | 2007-04-30 | 2007-04-30 | Nonvolatile Memory Based Database Management System and Method |
| KR10-2007-0042220 | 2007-04-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2008133373A1 true WO2008133373A1 (en) | 2008-11-06 |
Family
ID=39925807
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2007/003626 Ceased WO2008133373A1 (en) | 2007-04-30 | 2007-07-27 | Database management system based on in-page logging and method using the system |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR100900189B1 (en) |
| WO (1) | WO2008133373A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011098118A1 (en) * | 2010-02-09 | 2011-08-18 | Telefonaktiebolaget Lm Ericsson (Publ) | Data storage method |
| US8856469B2 (en) | 2009-09-22 | 2014-10-07 | Samsung Electronics Co., Ltd. | Apparatus and method for logging optimization using non-volatile memory |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101020781B1 (en) * | 2009-03-04 | 2011-03-09 | 한국과학기술원 | How to Manage Logs for Database Systems Based on Flash Memory |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050271377A1 (en) * | 2004-06-04 | 2005-12-08 | Seong-Jun Hong | Apparatus for processing multimedia data in portable device having NAND flash memory and method thereof |
| US7139199B2 (en) * | 2004-06-28 | 2006-11-21 | Intel Corporation | Flash memory file system with transacted operations |
-
2007
- 2007-04-30 KR KR1020070042220A patent/KR100900189B1/en not_active Expired - Fee Related
- 2007-07-27 WO PCT/KR2007/003626 patent/WO2008133373A1/en not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050271377A1 (en) * | 2004-06-04 | 2005-12-08 | Seong-Jun Hong | Apparatus for processing multimedia data in portable device having NAND flash memory and method thereof |
| US7139199B2 (en) * | 2004-06-28 | 2006-11-21 | Intel Corporation | Flash memory file system with transacted operations |
Non-Patent Citations (3)
| Title |
|---|
| BOBINEAU C. ET AL.: "PicoDBMS: Scaling Down Database Techniques for the Smartcard", PROCEEDINGS OF THE 26TH VLDB CONFERENCE, CAIRO, EGYPT, September 2000 (2000-09-01), pages 11.20 * |
| HUI DAI ET AL.: "ELF: An Efficient Log-Structured Flash File System for Micro Sensor Nodes", IN THE SECOND INTERNATIONAL CONFERENCE ON EMBEDDED NETWORKED SENSOR SYSTEMS (SENSYS'03), BALTIMORE, MD, USA, November 2004 (2004-11-01), pages 176 - 187, XP002479775 * |
| KIM G.-J. ET AL.: "LGeDBMS: A Small DBMS for Embedded System with Flash Memory", PROCEEDINGS OF THE 32ND INTERNATIONAL CONFERENCE ON VERY LARGE DATA BASES, SEOUL, KOREA, 12 September 2006 (2006-09-12) - 15 September 2006 (2006-09-15), pages 1255 - 1258 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8856469B2 (en) | 2009-09-22 | 2014-10-07 | Samsung Electronics Co., Ltd. | Apparatus and method for logging optimization using non-volatile memory |
| WO2011098118A1 (en) * | 2010-02-09 | 2011-08-18 | Telefonaktiebolaget Lm Ericsson (Publ) | Data storage method |
| US20120317384A1 (en) * | 2010-02-09 | 2012-12-13 | Telefonaktiebolaget L M Ericsson (Publ) | Data storage method |
Also Published As
| Publication number | Publication date |
|---|---|
| KR100900189B1 (en) | 2009-06-02 |
| KR20080097078A (en) | 2008-11-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12443371B2 (en) | Data writing method and storage device | |
| US8171239B2 (en) | Storage management method and system using the same | |
| JP4948793B2 (en) | Flash memory system including bad block manager | |
| US8725927B2 (en) | Hot memory block table in a solid state storage device | |
| KR101014599B1 (en) | Adaptive Mode Switching of Flash Memory Address Mapping Based on Host Usage Features | |
| US9715444B2 (en) | Storage device having nonvolatile memory device and write method | |
| US8484432B2 (en) | Memory system | |
| US20100082917A1 (en) | Solid state storage system and method of controlling solid state storage system using a multi-plane method and an interleaving method | |
| US20110296089A1 (en) | Programming method and device for a buffer cache in a solid-state disk system | |
| CN112114743B (en) | Data storage device that manages memory resources by using a flash translation layer | |
| US7287117B2 (en) | Flash memory and mapping control apparatus and method for flash memory | |
| US20120203993A1 (en) | Memory system with tiered queuing and method of operation thereof | |
| CN101095121A (en) | High speed temporary storage block | |
| KR20090131146A (en) | Nonvolatile Memory System and Its Data Management Method | |
| US20060085493A1 (en) | Dual journaling store method and storage medium thereof | |
| US20100161890A1 (en) | Cache management method and cache device using sector set | |
| Pang et al. | RDA: A Read-request driven adaptive allocation scheme for improving SSD performance | |
| WO2008133373A1 (en) | Database management system based on in-page logging and method using the system | |
| US8954662B2 (en) | SSD controller, and method for operating an SSD controller | |
| CN113590505B (en) | Address mapping method, solid state disk controller and solid state disk | |
| JP2023039459A (en) | Memory system and method | |
| CN111324307B (en) | Satellite-borne NAND FLASH type solid-state memory and method for distributing storage space | |
| JP4558054B2 (en) | Memory system | |
| US7626869B2 (en) | Multi-phase wordline erasing for flash memory | |
| JPH06282484A (en) | Data writing control unit for nonvolatile semiconductor memory |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 07793282 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 07793282 Country of ref document: EP Kind code of ref document: A1 |