KR20180082753A - Database management system and method thereof using a non-volatile memory - Google Patents

Database management system and method thereof using a non-volatile memory Download PDF

Info

Publication number
KR20180082753A
KR20180082753A KR1020170004006A KR20170004006A KR20180082753A KR 20180082753 A KR20180082753 A KR 20180082753A KR 1020170004006 A KR1020170004006 A KR 1020170004006A KR 20170004006 A KR20170004006 A KR 20170004006A KR 20180082753 A KR20180082753 A KR 20180082753A
Authority
KR
South Korea
Prior art keywords
record
transaction
slotted
write
page
Prior art date
Application number
KR1020170004006A
Other languages
Korean (ko)
Other versions
KR101946135B1 (en
Inventor
남범석
Original Assignee
울산과학기술원
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 울산과학기술원 filed Critical 울산과학기술원
Priority to KR1020170004006A priority Critical patent/KR101946135B1/en
Publication of KR20180082753A publication Critical patent/KR20180082753A/en
Application granted granted Critical
Publication of KR101946135B1 publication Critical patent/KR101946135B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided is a database management system capable of storing a first record in a free-space depending on a transaction during running and updating a slot header with atomicity when the transaction is committed. The database management system may include a processor for executing the transaction and a hardware transaction memory for storing the first record associated with the writing in a free space of a first slotted page when writing is executed with respect to the first slotted page based on the transaction. In addition, when the commit of the transaction is determined by the processor, the hardware transaction memory may update information on the first record in a slot header of the first slotted page.

Description

비휘발성 메모리를 이용하는 데이터베이스 관리 시스템 및 방법{DATABASE MANAGEMENT SYSTEM AND METHOD THEREOF USING A NON-VOLATILE MEMORY}[0001] DATABASE MANAGEMENT SYSTEM AND METHOD THEREOF USING A NON-VOLATILE MEMORY [0002]

데이터베이스 관리 시스템 및 방법에 연관되며, 보다 구체적으로는 비휘발성 메모리(non-volatile memory)를 이용하는 데이터베이스 관리 시스템에 연관된다.The present invention relates to a database management system and method, and more particularly to a database management system that utilizes non-volatile memory.

비휘발성 메모리는 DRAM(Dynamic Random Access Memory)과 같이 바이트 단위로 데이터를 읽고 쓸 수 있으며(byte-addressability), 읽고 쓰는 속도 또한 DRAM과 같이 빠르면서, 시스템 전원이 꺼지는 경우에도 데이터를 잃어버리지 않는 비휘발성(non-volatility)을 갖는다는 점에서 차세대 메모리로서 큰 주목을 받고 있는 장치이다. 비휘발성 메모리가 메인 메모리로서 사용되는 경우에, 데이터의 복구와 무결성을 필요로 하는 데이터베이스(database)를 비롯한 많은 응용 프로그램들은 상대적으로 처리 속도가 빠른 비휘발성 메모리를 이용하여 기존의 HDD(Hard Disk Drive) 및 플래시 메모리 등을 대체할 수 있어 성능의 개선을 기대할 수 있다.Nonvolatile memory is a non-volatile memory that can read and write data byte-wise like DRAM (Dynamic Random Access Memory), and has the speed of reading and writing as fast as DRAM, It is a device that is attracting much attention as a next generation memory because it has non-volatility. When non-volatile memory is used as the main memory, many applications, including databases requiring data recovery and integrity, use non-volatile memory with relatively high processing speed, ) And flash memory can be substituted, and the performance can be expected to be improved.

그러나 응용 프로그램이 실행되는 동안 특정 데이터는 영구적으로 저장될 필요성이 존재하지만 그렇지 않은 데이터가 존재할 수도 있다. 또한, 메인 메모리에 데이터를 쓰는 연산은 쓰기 순서가 보장되지 않는 특징이 존재한다. 오늘날 중앙처리장치(CPU: Central Processing Unit)는 성능 향상을 위해 데이터가 써지는 순서를 다르게 조절하는 경우도 존재한다. 따라서 데이터가 써진 경우라도, 중앙처리장치 내의 캐시에만 써진 데이터가 남고 메인 메모리에는 데이터가 업데이트되지 않는 경우가 존재할 수 있다.However, there is a need to permanently store certain data while the application is running, but there may be data that is not. Also, there is a feature that the writing order is not guaranteed in the operation of writing data to the main memory. Today, a central processing unit (CPU) sometimes adjusts the order in which data is written to improve performance. Therefore, even if data is written, there may be a case where data written in only the cache in the central processing unit remains and the data is not updated in the main memory.

종래에는 이러한 경우를 대비하여 비휘발성 메모리를 메인 메모리로 사용하는 경우에 쓰기 연산의 재배열을 막기 위해 mfence, sfence와 같은 메모리 베리어(memory barrier) 연산이 추가적으로 수행될 필요성이 존재하고, 중앙처리 장치의 캐시로부터 비휘발성 메인 메모리로 데이터를 내려주는 캐시라인 플러시(clflush) 같은 연산이 추가적으로 수행될 필요성이 존재한다. 이러한 연산들은 HDD 또는 플래시 메모리에 데이터를 쓰는 fsync() 연산에 비교하여서는 빠르지만 그 오버헤드가 무시할 정도는 아니기 때문에 많이 사용되는 경우에 전체 시스템 성능을 저하시킬 가능성이 존재한다.Conventionally, in order to prevent rearrangement of a write operation when a non-volatile memory is used as a main memory, there is a need to additionally perform a memory barrier operation such as mfence and sfence, There is a need to additionally perform an operation such as a cache line flush to drop data from the cache of the nonvolatile main memory to the nonvolatile main memory. These operations are faster than the fsync () operation that writes data to the HDD or flash memory, but the overhead is not negligible, so there is a possibility that the overall system performance may be degraded if it is used heavily.

일측에 따르면, 실행 중인 트랜잭션에 따라 프리 스페이스에 제1 레코드를 저장하고, 상기 트랜잭션이 커밋된 경우에 슬롯 헤더를 원자성 있게 업데이트하는 데이터베이스 관리 시스템이 제공된다. 상기 데이터베이스 관리 장치는 트랜잭션(transaction)을 실행하는 프로세서 및 상기 트랜잭션에 따라 제1 슬롯티드 페이지(slotted page)에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 제1 레코드를 상기 제1 슬롯티드 페이지의 프리 스페이스(free space)에 저장하는 하드웨어 트랜잭션 메모리를 포함할 수 있다. 또한, 상기 프로세서에 의해 상기 트랜잭션의 커밋(commit)이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트할 수 있다.According to one aspect, a database management system is provided that stores a first record in a free space according to a transaction in execution, and atomically updates a slot header when the transaction is committed. Wherein the database management apparatus comprises: a processor for executing a transaction; and when a write is performed on a first slotted page according to the transaction, a first record associated with the write is written to the first slotted page In a free space of the hardware transaction memory. In addition, when a commit of the transaction is determined by the processor, the hardware transactional memory may update information about the first record in the slot header of the first slotted page.

일실시예에 따르면, 상기 하드웨어 트랜잭션 메모리는 상기 제1 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 상기 제1 레코드를 포함하는 레코드 오프셋 어레이 중 적어도 하나를 상기 제1 레코드에 관한 정보로서 업데이트할 수 있다.According to one embodiment, the hardware transactional memory stores the start offset of the free space updated in accordance with the first record, the number of records stored in the first slotted page, the end offset of the free space, and the first record And update at least one of the record offset arrays containing the information with respect to the first record.

다른 일실시예에 따르면, 상기 하드웨어 트랜잭션 메모리는 RTM(Restricted Transactional Memory)로 구현되고, 상기 슬롯 헤더의 크기가 64 바이트로 고정되는 것을 특징으로 할 수 있다.According to another embodiment, the hardware transaction memory is implemented with a Restricted Transactional Memory (RTM), and the size of the slot header is fixed to 64 bytes.

또 다른 일실시예에 따르면, 상기 프로세서는 상기 제1 레코드의 쓰기에 관한 공간이 부족하다고 판단된 경우, 단편화(fragmentation)된 프리 스페이스를 하나의 연속된 공간으로 만들고, 상기 하드웨어 트랜잭션 메모리는 단편화 제거된(defragmentation) 프리 스페이스에 상기 제1 레코드를 쓰기 시 복사(copy on write) 기법에 따라 저장할 수 있다.According to another embodiment, the processor makes the fragmented free space into one continuous space when it is determined that the space for writing of the first record is insufficient, and the hardware transaction memory stores the fragmentation free space The first record may be stored in a defragmentation free space according to a copy on write technique.

또 다른 일실시예에 따르면, 상기 하드웨어 트랜잭션 메모리는 상기 트랜잭션에 따라 상기 제1 슬롯티드 페이지에 관한 삭제가 실행되는 경우, 상기 삭제에 연관되는 제2 레코드의 오프셋을 슬롯 헤더에서 삭제하여 로그에 저장하고, 상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제2 레코드에 관한 정보를 상기 슬롯 헤더에 업데이트할 수 있다.According to yet another embodiment, the hardware transactional memory deletes the offset of the second record associated with the deletion from the slot header and stores it in the log when the deletion on the first slotted page is executed according to the transaction And if the commit of the transaction is determined by the processor, the hardware transactional memory may update information on the second record in the slot header.

또 다른 일실시예에 따르면, 상기 하드웨어 트랜잭션 메모리는 상기 제2 레코드에 연관되는 프리 스페이스를 연결된 리스트(linked list)로서 연결하고, 상기 제2 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 레코드 오프셋 어레이 중 적어도 하나를 상기 제2 레코드에 관한 정보로서 업데이트할 수 있다.According to another embodiment, the hardware transactional memory connects the free space associated with the second record as a linked list, and updates the start offset of the free space, And update at least one of the number of records stored in the one slotted page, the end offset of the free space, and the record offset array as information on the second record.

또 다른 일실시예에 따르면, 상기 하드웨어 트랜잭션 메모리는 상기 트랜잭션에 따라 상기 제1 슬롯티드 페이지에 관한 업데이트가 실행되는 경우, 상기 업데이트에 연관되는 제3 레코드를 추가하고, 상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제3 레코드에 관한 정보를 상기 슬롯 헤더에 업데이트할 수 있다.According to yet another embodiment, the hardware transactional memory further comprises means for, when an update on the first slotted page is executed in accordance with the transaction, adding a third record associated with the update, If a commit is determined, the hardware transactional memory may update information on the third record in the slot header.

다른 일측에 따르면, 실행되는 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 제1 레코드를 버퍼 캐시 내의 상기 제1 슬롯티드 페이지의 프리 스페이스에 저장하는 단계, 상기 트랜잭션에 대해 커밋(commit)을 판단하는 단계 및 상기 트랜잭션의 커밋이 판단된 경우에, 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트 하는 단계를 포함하는 버퍼 캐싱 방법이 제공된다.According to another aspect, when a write on a first slotted page is executed in accordance with a transaction being executed, storing a first record associated with the write in a free space of the first slotted page in the buffer cache, Determining a commit for a transaction and updating the information on the first record in a slot header of the first slotted page if a commit of the transaction is determined, / RTI >

일실시예에 따르면, 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트 하는 단계는, 상기 제1 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 상기 제1 레코드를 포함하는 레코드 오프셋 어레이 중 적어도 하나를 상기 제1 레코드에 관한 정보로서 업데이트 하는 단계를 포함할 수 있다.According to one embodiment, updating the information about the first record in the slot header of the first slotted page further comprises: updating the start offset of the free space updated in accordance with the first record, Updating the at least one of the number of records stored in the first record, the end offset of the free space, and the record offset array including the first record as information on the first record.

또 다른 일측에 따르면, 트랜잭션을 실행하는 프로세서 및 상기 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 복수의 레코드들을 각각의 슬롯티드 페이지에 저장하는 버퍼 캐시(buffer cache)를 포함하고, 상기 복수의 레코드들의 관한 정보를 포함하는 오프셋들을 저장하는 먼저 쓰기 로그(write ahead log) 영역을 포함하는 비휘발성 메모리를 포함하는 데이터베이스 관리 시스템이 제공된다.According to another aspect of the present invention there is provided a method of processing a plurality of slotted pages in a buffer cache for storing a plurality of records associated with the writes in respective slotted pages, cache memory, and a non-volatile memory including a write ahead log area for storing offsets containing information about the plurality of records.

일실시예에 따르면, 상기 비휘발성 메모리는 상기 저장된 복수의 레코드들에 따라 상기 각각의 슬롯티드 페이지에 대응하는 각각의 슬롯 헤더를 상기 먼저 쓰기 로그 영역에 저장하고, 상기 각각의 슬롯 헤더는 상기 각각의 슬롯티드 페이지에 관한 오프셋을 포함할 수 있다.According to one embodiment, the non-volatile memory stores each slot header corresponding to each slotted page in the first write log area according to the stored plurality of records, Lt; RTI ID = 0.0 > of < / RTI >

다른 일실시예에 따르면, 상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 비휘발성 메모리는 상기 먼저 쓰기 로그 영역에 저장된 상기 각각의 슬롯 헤더들을 대응하는 상기 각각의 슬롯티드 페이지에 업데이트할 수 있다.According to another embodiment, when a commit of the transaction is determined by the processor, the non-volatile memory updates the respective slot headers stored in the first write log area to the corresponding respective slotted pages .

또 다른 일측에 따르면, 실행되는 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 복수의 레코드들을 버퍼 캐시에 저장된 각각의 슬롯티드 페이지에 업데이트하는 단계 및 상기 복수의 레코드들에 관한 정보를 포함하는 오프셋들을 슬롯 헤더로서 미리 지정된 먼저 쓰기 로그 영역에 저장하는 단계를 포함하는 로깅 방법이 제공될 수 있다.According to another aspect, there is provided a method comprising: updating a plurality of records associated with a write to each slotted page stored in a buffer cache, when a write on a plurality of slotted pages is executed according to a transaction being executed; And storing the offsets containing information about the records in a pre-designated first write log area as a slot header.

일실시예에 따르면, 상기 오프셋들을 슬롯 헤더로서 미리 지정된 먼저 쓰기 로그 영역에 저장하는 단계는, 상기 저장된 복수의 레코드들에 따라 상기 각각의 슬롯티드 페이지에 대응하는 각각의 슬롯 헤더를 상기 먼저 쓰기 로그 영역에 저장하는 단계를 포함하고, 상기 각각의 슬롯 헤더는 상기 각각의 슬롯티드 페이지에 관한 오프셋을 포함할 수 있다.According to an embodiment of the present invention, the step of storing the offsets in a pre-designated first write log area as a slot header may further include storing each slot header corresponding to each slotted page according to the stored plurality of records, And wherein each of the slot headers may include an offset relative to each of the slotted pages.

도 1은 일실시예에 따른 데이터베이스 관리 시스템이 이용하는 슬롯티드 페이지의 구조를 나타내는 예시도이다.
도 2는 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다.
도 3a 및 도 3b는 도 2에서 설명된 버퍼 캐싱 방법에 따라 슬롯티드 페이지에 대해 쓰기 연산이 수행되는 과정을 설명하는 예시도이다.
도 4는 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다.
도 5는 또 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다.
도 6a는 다른 일실시예에 따른 데이터베이스 관리 시스템을 도시하는 블록도이다.
도 6b는 도 6a에서 설명된 데이터베이스 관리 시스템이 수행하는 로깅 방법을 도시하는 예시도이다.
도 7은 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 로깅 방법의 예시도이다.
도 8은 또 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 단편화 제거(defragmentation)의 예시도이다.
1 is an exemplary diagram illustrating a structure of a slotted page used by a database management system according to an embodiment.
2 is a flowchart of a buffer caching method performed by the database management system according to an embodiment.
FIGS. 3A and 3B are diagrams illustrating a process of performing a write operation on a slotted page according to the buffer caching method illustrated in FIG. 2. FIG.
4 is a flowchart of a buffer caching method performed by the database management system according to another embodiment.
5 is a flowchart of a buffer caching method performed by the database management system according to another embodiment.
6A is a block diagram illustrating a database management system according to another embodiment.
FIG. 6B is an exemplary diagram showing a logging method performed by the database management system illustrated in FIG. 6A.
7 is an exemplary diagram illustrating a logging method performed by the database management system according to another embodiment.
FIG. 8 is an illustration of a defragmentation performed by the database management system according to another embodiment.

실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 실시될 수 있다. 따라서, 실시예들은 특정한 개시형태로 한정되는 것이 아니며, 본 명세서의 범위는 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of embodiments are set forth for illustration purposes only and may be embodied with various changes and modifications. Accordingly, the embodiments are not intended to be limited to the specific forms disclosed, and the scope of the disclosure includes changes, equivalents, or alternatives included in the technical idea.

제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.The terms first or second, etc. may be used to describe various elements, but such terms should be interpreted solely for the purpose of distinguishing one element from another. For example, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.It is to be understood that when an element is referred to as being "connected" to another element, it may be directly connected or connected to the other element, although other elements may be present in between.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprises ", or" having ", and the like, are used to specify one or more of the features, numbers, steps, operations, elements, But do not preclude the presence or addition of steps, operations, elements, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.

이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the following description of the present invention with reference to the accompanying drawings, the same components are denoted by the same reference numerals regardless of the reference numerals, and a duplicate description thereof will be omitted.

도 1은 일실시예에 따른 데이터베이스 관리 시스템이 이용하는 슬롯티드 페이지의 구조를 나타내는 예시도이다. 도 1을 참조하면, 데이터베이스 관리 시스템이 버퍼 캐싱 또는 로깅(logging)을 수행하는데 이용하는 슬롯티드 페이지(slotted page)의 구조가 도시된다. 슬롯티드 페이지는 슬롯 헤더(slot header)(110), 프리 스페이스(free space)(120) 및 레코드 콘텐츠 영역(record content area)(130)을 포함할 수 있다. 슬롯 헤더(110)는 상기 슬롯티드 페이지에 연관되는 메타 데이터 및 저장된 레코드에 관한 정보를 포함할 수 있다. 또한, 레코드 콘텐츠 영역(130)은 각각의 레코드와 상기 각각의 레코드에 관한 키를 포함할 수 있다. 또한, 프리 스페이스(120)는 슬롯 헤더(110) 및 레코드 콘텐츠 영역(130) 사이에 배치된 빈 공간을 나타낼 수 있다. 예시적으로, 새로운 레코드가 페이지에 삽입(inserting)되는 경우, 데이터베이스 관리 시스템은 키 값의 크기와 관계없이 슬롯티드 페이지의 끝에서부터 순차적으로 레코드를 쓸(writing) 수 있다. 또한, 각각의 레코드들의 키에 따른 순서는 레코드 오프셋 어레이(116)로서 슬롯 헤더(110)에 저장될 수 있다. 보다 구체적으로, 레코드 오프셋 어레이(116)는 키 값의 크기에 따라 정렬된 상태로 유지될 수 있다. 본 실시예에서는 하나의 슬롯티드 페이지의 크기가 1k 바이트(byte)인 실시예가 도시되나, 이는 다른 실시예들의 범위를 제한하거나 한정하는 것으로 해석되어서는 안될 것이다.1 is an exemplary diagram illustrating a structure of a slotted page used by a database management system according to an embodiment. Referring to FIG. 1, there is shown the structure of a slotted page that a database management system uses to perform buffer caching or logging. The slotted page may include a slot header 110, a free space 120, and a record content area 130. The slot header 110 may include metadata associated with the slotted page and information regarding stored records. In addition, the record content area 130 may include a key for each record and for each record. In addition, the free space 120 may indicate an empty space disposed between the slot header 110 and the record content area 130. [ Illustratively, if a new record is inserting into the page, the database management system may write the record sequentially from the end of the slotted page, regardless of the size of the key value. Also, the order according to the key of each record may be stored in the slot header 110 as a record offset array 116. [ More specifically, the record offset array 116 may be maintained in an aligned state according to the magnitude of the key value. In this embodiment, an embodiment in which the size of one slotted page is 1 kilobyte (byte) is shown, but this should not be construed as limiting or limiting the scope of other embodiments.

슬롯티드 페이지는 슬롯 헤더(110) 내에 현재 페이지가 내부 노드(internal node)인지 리프 노드(leaf node)인지를 표시하는 플래그(110)를 1 바이트로서 포함할 수 있다. 또한, 슬롯티드 페이지는 슬롯 헤더(110) 내에 현재 사용되지 않고 있는 페이지 영역을 나타내는 프리 스페이스(120)의 시작 오프셋(112)을 저장할 수 있다. 도 1에서 설명되는 슬롯티드 페이지 내에서는 14 바이트부터 프리 스페이스(120)가 시작하기 때문에, 시작 오프셋(112)에 14가 저장될 수 있다. 또한, 슬롯티드 페이지는 시작 오프셋(112)에 이어지는 다음 2 바이트에서 현재 슬롯티드 페이지에 저장된 레코드의 개수(113)를 저장할 수 있다. 본 실시예에서는 3 개의 레코드가 저장되므로 3이 저장될 수 있다. 또한, 슬롯티드 페이지는 레코드의 개수(113)에 이어지는 다음 2 바이트에서 프리 스페이스(120)의 종료 오프셋(114)을 저장할 수 있다. 본 실시예에서는 프리 스페이스(120)의 마지막 영역이 972이므로, 종료 오프셋(114)에는 972이 저장되어 있다. 슬롯 헤더(110)의 마지막 1 바이트에는 프리 스페이스(120)가 분리되어 있는 경우에 프리 스페이스(120)를 연결하기 위한 단편화(fragmentation) 정보가 저장될 수 있다.The slotted page may include a flag 110 indicating whether the current page is an internal node or a leaf node in the slot header 110 as one byte. In addition, the slotted page may store the start offset 112 of the free space 120 indicating the page area that is not currently used in the slot header 110. 14 can be stored in the start offset 112 since 14 bytes of free space 120 start in the slotted page described in FIG. In addition, the slotted page may store the number 113 of records stored in the current slotted page at the next two bytes following the start offset 112. Since three records are stored in this embodiment, 3 can be stored. The slotted page may also store the end offset 114 of the free space 120 in the next two bytes following the number of records 113. [ In this embodiment, since the last area of the free space 120 is 972, 972 is stored in the end offset 114. Fragmentation information for connecting the free space 120 may be stored in the last 1 byte of the slot header 110 when the free space 120 is separated.

도 1에서 설명되는 실시예에서, 슬롯티드 페이지 내에는 세 개의 레코드(132, 134, 136)가 저장되어 있다. 각각의 레코드(132, 134, 136)들의 키 값은 20, 10, 30이고, 각각의 레코드(132, 134, 136)가 차지하는 바이트 수는 18, 14, 14 바이트이다. 이러한 레코드들은 슬롯티드 페이지의 레코드 콘텐츠 영역(130)에 저장될 수 있다. 도 1에서 도시된 것과 같이, 레코드 콘텐츠 영역(130)내에서 데이터들은 키 값에 따라 정렬되어 있지 않을 것이다. 이를 테면, 10보다 큰 20을 키 값으로 갖는 레코드(132)가 맨 앞에 위치할 수 있다.In the embodiment illustrated in FIG. 1, three records 132, 134, 136 are stored within the slotted page. The key values of the respective records 132, 134, and 136 are 20, 10, and 30, and the number of bytes occupied by each of the records 132, 134, and 136 is 18, 14, and 14 bytes. These records may be stored in the record content area 130 of the slotted page. As shown in FIG. 1, the data in the record content area 130 will not be sorted according to the key value. For example, a record 132 having a key value of 20 greater than 10 may be placed at the front.

따라서 데이터베이스 관리 시스템은 키 값에 따라 레코드들을 정렬할 필요성이 존재하는데, 슬롯티드 페이지 내에서는 각각의 레코드의 시작 바이트를 슬롯 헤더(110)의 레코드 오프셋 어레이(116)에 키 값에 따라 정렬하여 저장할 수 있다. 보다 구체적으로, 10이 가장 작은 키 값이므로 10을 키로 갖는 레코드의 시작 오프셋 992이 레코드 오프셋 어레이(116)의 첫 번째 엘리먼트(element)로 저장될 수 있다. 마찬가지로, 20을 키로 갖는 레코드의 시작 오프셋 972를 레코드 오프셋 어레이(116)의 두 번째 엘리먼트로 저장하고, 30을 키로 갖는 레코드의 시작 오프셋 1008을 세 번째 엘리먼트로 저장할 수 있다. 본 실시예에 따른 슬롯티드 페이지는 레코드 전체를 정렬하지 않고 2 바이트로서 작은 크기를 갖는 오프셋만을 별도의 레코드 오프셋 어레이(116)에 정렬하고 관리하여 레코드 전체의 순서를 바꾸는 경우에 복사해야 하는 데이터의 크기를 줄여 시스템 전체의 성능을 높이는 효과를 기대할 수 있다.Therefore, the database management system needs to sort the records according to the key value. In the slotted page, the start byte of each record is sorted and stored in the record offset array 116 of the slot header 110 according to the key value . More specifically, since 10 is the smallest key value, the start offset 992 of the record with ten keys can be stored as the first element of the record offset array 116. Similarly, a start offset 972 of a record having a key of 20 may be stored in a second element of the record offset array 116, and a start offset 1008 of a record having a key of 30 may be stored as a third element. The slotted page according to the present embodiment does not sort the entire record but arranges and manages only the offset having a small size as 2 bytes in the separate record offset array 116 to change the order of the entire record, It is possible to expect the effect of increasing the overall system performance by reducing the size.

도 2는 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다. 도 2를 참조하면, 버퍼 캐싱 방법은 실행되는 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 제1 레코드를 버퍼 캐시 내의 상기 제1 슬롯티드 페이지의 프리 스페이스에 저장하는 단계(210), 상기 트랜잭션에 대해 커밋(commit)을 판단하는 단계(220) 및 상기 트랜잭션의 커밋이 판단된 경우에, 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트하는 단계(230)를 포함할 수 있다. 본 실시예에서 설명되는 데이터베이스 관리 시스템은 트랜잭션을 실행하는 프로세서 및 상기 트랜잭션에 연관되는 데이터를 저장하고 업데이트하는 하드웨어 트랜잭션 메모리(hardware transactional memory)를 통해 구현될 수 있다.2 is a flowchart of a buffer caching method performed by the database management system according to an embodiment. Referring to FIG. 2, a buffer caching method is a method in which, when a write operation is performed on a first slotted page according to a transaction to be executed, a first record associated with the write is stored in a free space of the first slotted page in the buffer cache (220) of determining a commit for the transaction, and if the commit of the transaction is determined, transmitting information about the first record to a slot header of the first slotted page (Step < RTI ID = 0.0 > 230). ≪ / RTI > The database management system described in this embodiment can be implemented through a processor executing a transaction and a hardware transactional memory for storing and updating data associated with the transaction.

단계(210)에서 데이터베이스 관리 시스템의 프로세서는 미리 지정된 트랜잭션을 실행할 수 있다. 이하의 설명에서 트랜잭션은 하나의 작업을 수행하기 위해 필요한 데이터베이스의 연산의 집합을 나타내고, 데이터베이스 내의 논리적인 작업의 단위로서 데이터의 복구, 저장, 업데이트 및 삭제 등을 나타낼 수 있다. 또한, 단계(210)에서 실행 중인 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 데이터베이스 관리 시스템은 상기 쓰기에 연관되는 제1 레코드를 상기 제1 슬롯티드 페이지의 프리 스페이스에 저장할 수 있다. 보다 구체적으로, 데이터베이스 관리 시스템의 하드웨어 트랜잭션 메모리는 상기 트랜잭션에 따라 쓰기가 실행되는 경우에, 슬롯 헤더를 참조하여 프리 스페이스를 찾아낼 수 있다. 또한, 하드웨어 트랜잭션 메모리는 상기 제1 레코드를 상기 제1 슬롯티드 페이지의 프리 스페이스의 마지막 바이트에서부터 순차적으로 저장할 수 있다. 본 실시예의 데이터베이스 관리 시스템을 통해 저장된 레코드는 슬롯 헤더가 업데이트될 때까지는 다른 트랜잭션에 의해 보이지 않는다. 데이터베이스에서 실행되는 프로세스들은 레코드를 읽기 전 슬롯 헤더를 통해 유효한 레코드를 찾기 때문에, 프리 스페이스에 새롭게 기록된 제1 레코드는 기존의 데이터에 오류를 불러일으키지(corrupting) 않는 효과를 제공할 수 있다.In step 210, the processor of the database management system may execute a predefined transaction. In the following description, a transaction represents a set of operations of a database necessary to perform one operation, and may represent recovery, storage, update, deletion, etc. of data as a unit of logical operation in the database. Also, if a write on the first slotted page is executed in accordance with the transaction being executed in step 210, the database management system may store the first record associated with the write in the free space of the first slotted page have. More specifically, the hardware transaction memory of the database management system can find a free space by referring to the slot header when writing is performed according to the transaction. The hardware transactional memory may also store the first record sequentially from the last byte of the free space of the first slotted page. The stored record through the database management system of this embodiment is not visible by other transactions until the slot header is updated. Since processes running in the database seek valid records through the slot headers before reading the records, the first record written to the free space can provide the effect of not corrupting existing data.

다른 일실시예로서, 단계(210)에서 제1 레코드를 저장하기 위해 프리 스페이스에 존재하는 공간이 충분하지 않은 경우가 존재할 수 있다. 이 경우에, 데이터베이스 관리 시스템의 프로세서는 제1 레코드의 쓰기에 공간이 부족하다고 판단된 경우, 단편화(fragmentation)된 프리 스페이스를 하나의 연속된 공간으로 만들 수 있다. 또한, 하드웨어 트랜잭션 메모리는 단편화 제거된(defragmentation) 프리 스페이스에 상기 제1 레코드를 쓰기 시 복사(copy on write) 기법에 따라 저장할 수 있다.In another embodiment, there may be a case where there is not enough space in the free space to store the first record in step 210. [ In this case, the processor of the database management system can make the fragmented free space into one continuous space when it is determined that the space of the first record is insufficient. In addition, the hardware transactional memory may store the first record in a defragmentation free space according to a copy on write technique.

단계(220)에서 상기 프로세서는 실행 중이었던 트랜잭션에 대해 커밋을 판단할 수 있다. 커밋은 트랜잭션에 포함되는 연산이 모두 실행되고, 그에 따른 데이터베이스의 갱신 내용이 작업 영역에 기록되어 트랜잭션의 적용이 완료되었다고 판단된 시점을 나타낼 수 있다. 커밋이 실행된 경우, 갱신 데이터는 데이터베이스에 기록되고, 관련된 잠금이 해제되어 갱신된 내용이 다른 트랜잭션으로부터 접근될 수 있다.In step 220, the processor may determine a commit for a transaction that was being executed. The commit can be performed when all the operations included in the transaction are executed and the update contents of the corresponding database are recorded in the work area to determine when the application of the transaction is determined to be completed. When a commit is executed, the update data is written to the database, the associated lock is released, and the updated contents can be accessed from another transaction.

단계(220)에서 상기 트랜잭션의 커밋이 판단된 경우에, 단계(230)에서 데이터베이스 관리 시스템의 하드웨어 트랜잭션 메모리는 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트할 수 있다. 보다 구체적으로, 하드웨어 트랜잭션 메모리는 제1 레코드가 새롭게 저장됨에 따라 업데이트된 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 상기 제1 레코드를 포함하는 레코드 오프셋 어레이 중 적어도 하나를 상기 제1 레코드에 관한 정보로서 슬롯 헤더에 업데이트할 수 있다.If the commit of the transaction is determined in step 220, then in step 230, the hardware transaction memory of the database management system may update information about the first record in the slot header of the first slotted page . More specifically, the hardware transactional memory includes a start offset of the updated free space, a number of records stored in the first slotted page, an end offset of the free space, and the first record as the first record is newly stored And update at least one of the record offset arrays in the slot header as information regarding the first record.

본 실시예의 데이터베이스 관리 시스템은 RTM(Restricted Transactional Memory)를 이용하여 하드웨어 트랜잭션 메모리가 구현될 수 있다. 그에 따라, 하드웨어 트랜잭션 메모리는 레코드 오프셋 어레이를 포함하는 슬롯헤더를 원자성 있게(atomic) 업데이트할 수 있다. RTM을 이용하는 경우에, 트랜잭션 내에서 발생하는 제1 레코드에 관한 메모리 연산은 상기 트랜잭션 바깥에서는 참조할 수 없을 것이다. 또한, 트랜잭션 내에서 수정된 캐시라인은 플러시 되지 않고 L1 캐시에 남아 있을 수 있고, 캐시라인 단위에 대해 원자성(atomicity)을 보장할 수 있다. 일실시예로서, 본 실시예에 따른 버퍼 캐싱 방법에 있어서 슬롯 헤더의 길이는 하나의 캐시라인 크기인 64 바이트로 고정될 수 있고, RTM을 통해 슬롯 헤더가 원자성 있게 업데이트될 수 있어 커밋 마크와 같은 기능을 할 수 있도록 구현될 수 있다. 따라서, 본 실시예의 버퍼 캐싱 방법에서는 슬롯 헤더가 업데이트되기 전 시스템의 크래시(crash)가 발생하더라도, 슬롯의 헤더에는 새로 추가한 레코드가 보이지 않기 때문에 상기 새로 추가된 레코드가 무시될 수 있어 원자성이 보장되는 효과가 제공될 수 있다.The database management system of this embodiment can implement a hardware transactional memory using Restricted Transactional Memory (RTM). Hence, the hardware transactional memory can atomically update the slot header including the record offset array. If using RTM, the memory operation for the first record occurring in the transaction will not be referenced outside of the transaction. In addition, the modified cache line in the transaction can remain in the L1 cache without being flushed and can guarantee atomicity for the cache line unit. In one embodiment, in the buffer caching method according to the present embodiment, the length of the slot header can be fixed to 64 bytes, which is the size of one cache line, and the slot headers can be atomically updated through the RTM, It can be implemented to perform the same function. Therefore, in the buffer caching method of the present embodiment, even if a system crash occurs before the slot header is updated, the newly added record can not be seen in the header of the slot, so that the newly added record can be ignored, A guaranteed effect can be provided.

도 3a 및 도 3b는 도 2에서 설명된 버퍼 캐싱 방법에 따라 슬롯티드 페이지에 대해 쓰기 연산이 수행되는 과정을 설명하는 예시도이다. 도 3a를 참조하면, 데이터베이스 관리 시스템이 관리하는 슬롯티드 페이지가 도시된다. 슬롯티드 페이지는 제1 슬롯 헤더(310), 제1 프리 스페이스(320) 및 제1 레코드 콘텐츠 영역(330)을 포함할 수 있다. 데이터베이스 관리 시스템은 실행 중인 트랜잭션에 따라 상기 슬롯티드 페이지에 대해 쓰기 작업을 실행할 수 있다. 데이터베이스 관리 시스템은 제1 슬롯 헤더(110)를 참조하여, 현재의 제1 프리 스페이스(320)의 마지막 바이트가 972 바이트라는 것을 확인할 수 있다. 예시적으로, 데이터베이스 관리 시스템은 키 값으로 40을 갖는 제4 레코드를 기록하고, 상기 제4 레코드에 대응하는 바이트 길이 44를 프리 스페이스의 926 바이트에 기록할 수 있다. 그에 따라 새롭게 업데이트된 제1 프리 스페이스(320)의 마지막 바이트(321)는 926 바이트일 수 있다. 본 실시예의 데이터베이스 관리 시스템은 트랜잭션이 실행되는 도중에는 제1 슬롯 헤더(310)에 대해서 업데이트를 수행하지 않을 수 있다. 그에 따라, 트랜잭션이 커밋 되기 전 시스템에 오류가 발생하는 경우라도 새롭게 기록된 레코드는 다른 트랜잭션에 영향을 주지 않게 되어 시스템 전체의 안정성이 향상되는 효과를 기대할 수 있다.FIGS. 3A and 3B are diagrams illustrating a process of performing a write operation on a slotted page according to the buffer caching method illustrated in FIG. 2. FIG. Referring to FIG. 3A, a slotted page managed by the database management system is shown. The slotted page may include a first slot header 310, a first free space 320, and a first record content area 330. The database management system can execute a write operation on the slotted page in accordance with the transaction being executed. The database management system can refer to the first slot header 110 to confirm that the last byte of the current first free space 320 is 972 bytes. Illustratively, the database management system may write a fourth record with a key value of 40 and write the byte length 44 corresponding to the fourth record to 926 bytes of free space. Accordingly, the last byte 321 of the newly updated first free space 320 may be 926 bytes. The database management system of this embodiment may not perform the update for the first slot header 310 during the execution of the transaction. Accordingly, even if a system error occurs before the transaction is committed, the newly recorded record does not affect other transactions, and the stability of the entire system can be expected to be improved.

도 3b는 실행되는 트랜잭션의 완료가 판단되어, 데이터베이스 관리 시스템이 슬롯티드 페이지의 슬롯 헤더를 업데이트하는 과정을 도시하는 예시도이다. 업데이트된 슬롯티드 페이지는 제2 슬롯 헤더(340), 제2 프리 스페이스(350) 및 제2 레코드 콘텐츠 영역(360)을 포함할 수 있다.3B is an exemplary diagram showing a process of determining completion of a transaction to be performed and updating a slot header of a slotted page by the database management system. The updated slotted page may include a second slot header 340, a second free space 350, and a second record content area 360.

새롭게 업데이트된 슬롯티드 페이지 내에서는 16 바이트에서부터 제2 프리 스페이스(350)가 시작하기 때문에, 데이터베이스 관리 시스템은 시작 오프셋(341)에 16을 저장할 수 있다. 또한, 트랜잭션에 따라 새로운 제4 레코드가 슬롯티드 페이지 내에 추가되었기 때문에, 데이터베이스 관리 시스템은 현재 슬롯티드 페이지에 저장된 레코드의 개수(342)를 4로 저장할 수 있다. 또한, 제2 프리 스페이스(350)의 마지막 영역이 926이므로, 데이터베이스 관리 시스템은 제2 프리 스페이스(350)의 종료 오프셋(343)을 926으로 저장할 수 있다. 또한, 데이터베이스 관리 시스템은 제4 레코드에 상응하는 레코드 오프셋 926을 레코드 오프셋 어레이 내에 마지막 영역(344)에 업데이트할 수 있다. 제4 레코드가 추가되어서, 제2 프리 스페이스(250)는 16 바이트로부터 926 바이트까지의 영역을 나타내도록 업데이트될 수 있다. 또한, 제2 레코드 콘텐츠 영역(360)은 제4 레코드에 관한 데이터를 새롭게 포함하고, 926 바이트로부터 1023 바이트까지의 영역을 나타내도록 업데이트될 수 있다.The database management system can store 16 at the start offset 341 since the second free space 350 starts from 16 bytes in the newly updated slotted page. Also, since a new fourth record has been added in the slotted page in accordance with the transaction, the database management system can store the number 342 of records currently stored in the slotted page as four. Also, since the last area of the second free space 350 is 926, the database management system may store the end offset 343 of the second free space 350 as 926. [ In addition, the database management system may update the record offset 926 corresponding to the fourth record in the last area 344 in the record offset array. A fourth record is added so that the second free space 250 can be updated to represent an area from 16 bytes to 926 bytes. In addition, the second record content area 360 may be updated to include new data for the fourth record and represent an area from 926 bytes to 1023 bytes.

도 4는 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다. 도 4를 참조하면, 버퍼 캐싱 방법은 실행되는 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 삭제가 실행되는 경우, 상기 삭제에 연관되는 제2 레코드의 오프셋을 슬롯 헤더에서 삭제하여 로그에 저장하는 단계(410), 상기 트랜잭션에 대해 커밋을 판단하는 단계(420) 및 상기 트랜잭션의 커밋이 판단된 경우에, 상기 제2 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트하는 단계(430)를 포함할 수 있다.4 is a flowchart of a buffer caching method performed by the database management system according to another embodiment. Referring to FIG. 4, the buffer caching method includes the steps of deleting, from a slot header, an offset of a second record associated with the deletion when the deletion of the first slotted page is executed according to a transaction to be executed, 410), determining (420) a commit for the transaction, and updating (430) information about the second record in a slot header of the first slotted page if commit of the transaction is determined, . ≪ / RTI >

단계(410)에서 데이터베이스 관리 시스템은 상기 제1 슬롯티드 페이지에 포함되는 슬롯 헤더를 참조하여 삭제 요청에 대응하는 제2 레코드의 위치를 확인할 수 있다. 데이터베이스 관리 시스템은 실행 중인 트랜잭션에 따라 상기 제2 레코드를 레코드 콘텐츠 영역에서 삭제할 수 있다. 다만, 본 실시예에서도 데이터베이스 관리 시스템은 트랜잭션 도중에 슬롯 헤더를 업데이트하지 않을 것이다. 보다 구체적으로, 데이터베이스 관리 시스템은 상기 삭제에 연관되는 제2 레코드의 오프셋을 슬롯 헤더에서 삭제하여 로그에 저장할 수 있다.In step 410, the database management system can check the position of the second record corresponding to the deletion request by referring to the slot header included in the first slotted page. The database management system may delete the second record in the record content area according to the transaction being executed. In this embodiment, however, the database management system will not update the slot header during the transaction. More specifically, the database management system may delete the offset of the second record associated with the deletion from the slot header and store it in the log.

단계(420)에서 데이터베이스 관리 시스템은 트랜잭션에 대해 커밋을 판단할 수 있다. 트랜잭션 커밋을 판단하는 과정에 관한 자세한 설명은 도 2와 함께 기재된 단계(220)의 설명이 그대로 적용될 수 있어, 중복되는 설명은 생략하기로 한다.At step 420, the database management system may determine a commit for the transaction. The detailed description of the process of determining the transaction commit may be applied to the description of the step 220 described in conjunction with FIG. 2 as it is, and redundant description will be omitted.

단계(420)에서 상기 트랜잭션의 커밋이 판단된 경우에, 데이터베이스 관리 장치는 제2 레코드에 관한 정보를 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트할 수 있다. 보다 구체적으로, 데이터베이스 관리 장치는 RTM을 이용하여 슬롯 헤더 내의 레코드 오프셋 어레이 내에서 상기 제2 레코드에 관한 오프셋을 원자성 있게 삭제할 수 있다. 삭제된 레코드가 기재되었던 영역은 프리 스페이스와 연결될 필요가 존재할 것이다. 이 경우에, 데이터베이스 관리 장치는 삭제된 제2 레코드에 연관되는 프리 스페이스를 연결된 리스트(linked list)로서 연결할 수 있다. 또한, 데이터베이스 관리 장치는 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 레코드 오프셋 어레이 중 적어도 하나를 상기 제2 레코드에 관한 정보로서 상기 슬롯 헤더에 업데이트할 수 있다.If it is determined in step 420 that the transaction is to be committed, the database management device may update the information on the second record in the slot header of the first slotted page. More specifically, the database management device may use the RTM to atomically delete the offset associated with the second record within the record offset array in the slot header. The area in which the deleted record was written may need to be associated with a free space. In this case, the database management apparatus can link the free space associated with the deleted second record as a linked list. Also, the database management apparatus may update at least one of the number of records stored in the first slotted page, the end offset of the free space, and the record offset array as information on the second record in the slot header.

도 5는 또 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 버퍼 캐싱 방법의 흐름도이다. 도 5를 참조하면, 버퍼 캐싱 방법은 실행되는 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 업데이트가 실행되는 경우, 상기 업데이트에 연관되는 제3 레코드를 추가하는 단계(510), 상기 트랜잭션에 대해 커밋을 판단하는 단계(520) 및 상기 트랜잭션의 커밋이 판단된 경우에, 상기 제3 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트하는 단계(530)를 포함할 수 있다.5 is a flowchart of a buffer caching method performed by the database management system according to another embodiment. Referring to FIG. 5, a buffer caching method may include adding 510 a third record associated with the update when an update on a first slotted page is executed according to a transaction being executed, (530) updating information about the third record in the slot header of the first slotted page if the commit of the transaction is determined (520).

단계(510)에서 데이터베이스 관리 시스템은 상기 제1 슬롯티드 페이지에 포함되는 슬롯 헤더를 참조하여 업데이트 요청에 대응하는 제3 레코드의 위치를 확인할 수 있다. 데이터베이스 관리 시스템은 실행 중인 트랜잭션에 따라 상기 제3 레코드를 업데이트 하는 경우에, 새로운 값을 가지는 새로운 제3 레코드를 프리 스페이스에 추가할 수 있다. 마찬가지로, 본 실시예에서도 데이터베이스 관리 시스템은 트랜잭션 도중에 슬롯 헤더를 업데이트하지 않을 것이다.In step 510, the database management system can check the position of the third record corresponding to the update request by referring to the slot header included in the first slotted page. The database management system may add a new third record having a new value to the free space when updating the third record in accordance with the transaction being executed. Likewise, in this embodiment, the database management system will not update the slot header during the transaction.

단계(520)에서 데이터베이스 관리 시스템은 트랜잭션에 대해 커밋을 판단할 수 있다. 트랜잭션 커밋을 판단하는 과정에 관한 자세한 설명은 도 2와 함께 기재된 단계(220)의 설명이 그대로 적용될 수 있어, 중복되는 설명은 생략하기로 한다.At step 520, the database management system may determine a commit for the transaction. The detailed description of the process of determining the transaction commit may be applied to the description of the step 220 described in conjunction with FIG. 2 as it is, and redundant description will be omitted.

단계(520)에서 상기 트랜잭션의 커밋이 판단된 경우에, 단계(530)에서 데이터베이스 관리 장치는 업데이트된 제3 레코드에 관한 정보를 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트할 수 있다. 보다 구체적으로, 데이터베이스 관리 시스템의 하드웨어 트랜잭션 메모리는 제3 레코드의 새로운 오프셋을 레코드 오프셋 어레이 내에서 새롭게 덮어쓸 수 있다. 또한, 데이터베이스 관리 시스템은 하드웨어 트랜잭션 메모리를 이용하여 64 바이트 캐시 라인의 크기를 가지는 슬롯 헤더를 원자성 있게 업데이트할 수 있다.If the commit of the transaction is determined in step 520, the database management device may update the information on the updated third record in the slot header of the first slotted page in step 530. More specifically, the hardware transactional memory of the database management system may overwrite the new offset of the third record in the record offset array. In addition, the database management system can atomically update a slot header having a size of a 64-byte cache line using hardware transactional memory.

도 6a는 다른 일실시예에 따른 데이터베이스 관리 시스템을 도시하는 블록도이다. 도 6a를 참조하면, 데이터베이스 관리 시스템(600)은 비휘발성 메모리(610) 및 프로세서(620)를 포함할 수 있다. 프로세서(620)는 미리 지정된 트랜잭션을 수행할 수 있다. 프로세서(620)에 의해 실행되는 트랜잭션은 복수의 슬롯티드 페이지에 관한 쓰기 연산을 포함할 수 있다.6A is a block diagram illustrating a database management system according to another embodiment. Referring to FIG. 6A, the database management system 600 may include a non-volatile memory 610 and a processor 620. Processor 620 may perform a predefined transaction. A transaction executed by the processor 620 may include a write operation on a plurality of slotted pages.

비휘발성 메모리(610)는 데이터베이스 관리 시스템 내에서 메인 메모리로서 동작할 수 있다. 비휘발성 메모리(610)는 쓰기에 연관되는 복수의 레코드들을 각각의 슬롯티드 페이지에 저장하는 버퍼 캐시를 포함할 수 있다. 또한, 비휘발성 메모리(610)는 복수의 레코드들의 관한 정보를 포함하는 오프셋들을 저장하는 먼저 쓰기 로그(write ahead log) 영역을 포함할 수 있다.Non-volatile memory 610 may operate as main memory within the database management system. Non-volatile memory 610 may include a buffer cache that stores a plurality of records associated with a write in each slotted page. The non-volatile memory 610 may also include a write ahead log area for storing offsets containing information regarding a plurality of records.

도 6b는 도 6a에서 설명된 데이터베이스 관리 시스템이 수행하는 로깅 방법을 도시하는 예시도이다. 도 6b를 참조하면, 데이터베이스 관리 시스템은 버퍼 캐시(611) 및 먼저 쓰기 로그 영역(612)을 포함하는 비휘발성 메모리(610) 및 프로세서(620)를 포함할 수 있다. 본 실시예에 따른 데이터베이스 관리 시스템은 실행 되는 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 수정이 발생하는 경우에, 상기 복수의 슬롯티드 페이지에 관한 슬롯 헤더만을 먼저 쓰기 로그 영역(612)에 복사하는 방식의 로깅을 수행할 수 있다. 그에 따라, 데이터베이스 관리 시스템은 업데이트할 페이지 전체를 복사하지 않고, 업데이트된 레코드를 가리키는 오프셋만을 로그 영역에 복사할 수 있어 작은 2 바이트 오프셋 만을 로깅하여 메모리 쓰기 연산을 최소로 하고, 시스템의 부하를 줄이는 효과를 기대할 수 있다. 본 실시예의 비휘발성 메모리(610)는 RTM 뿐만 아니고 다양한 형태의 비휘발성 메모리로 구현될 수 있고, 슬롯 헤더의 길이 또한 64 바이트로 한정되지 않을 것이다.FIG. 6B is an exemplary diagram showing a logging method performed by the database management system illustrated in FIG. 6A. Referring to FIG. 6B, the database management system may include a non-volatile memory 610 and a processor 620, including a buffer cache 611 and a write log area 612 first. The database management system according to the present exemplary embodiment may include a method of copying only the slot headers related to the plurality of slotted pages into the write log area 612 in the case where a modification to a plurality of slotted pages occurs according to a transaction to be executed Can be performed. Accordingly, the database management system can copy only the offset pointing to the updated record to the log area without copying the entire page to be updated, minimizing the memory write operation by logging only a small 2-byte offset, Effect can be expected. The nonvolatile memory 610 of the present embodiment may be implemented in various forms of nonvolatile memory as well as RTM, and the length of the slot header is also not limited to 64 bytes.

프로세서(620)는 실행 중인 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 쓰기 연산을 실행할 수 있다. 프로세서(620)는 비휘발성 메모리(610)를 통해 수정하려는 제1 슬롯티드 페이지 및 제2 슬롯티드 페이지의 새로운 데이터들을 직접 쓸 수 있다. 보다 구체적으로, 업데이트된 제1 슬롯티드 페이지 및 업데이트된 제2 슬롯티드 페이지는 비휘발성 메모리(610) 내의 버퍼 영역(611)에 포함될 수 있다. 다만, 프로세서(620)는 상기 제1 슬롯티드 페이지 및 상기 제2 슬롯티드 페이지에 포함되는 각각의 슬롯 헤더들은 업데이트하지 않을 것이다.Processor 620 may perform write operations on a plurality of slotted pages in accordance with the transaction in progress. The processor 620 can directly write new data of the first slotted page and the second slotted page to be modified through the nonvolatile memory 610. [ More specifically, the updated first slotted page and the updated second slotted page may be included in the buffer area 611 in the nonvolatile memory 610. However, the processor 620 may not update the respective slot headers included in the first slotted page and the second slotted page.

또한, 프로세서(620)는 비휘발성 메모리(610) 내의 먼저 쓰기 로그 영역(612)을 이용하여 새로 써진 레코드들의 위치를 가리키는 오프셋들을 먼저 쓸 수 있다. 보다 구체적으로, 프로세서(620)는 먼저 쓰기 로그 영역(612)을 이용하여 업데이트된 제1 슬롯티드 페이지에 대응하는 제1 슬롯 헤더 및 업데이트된 제2 슬롯티드 페이지에 대응하는 제2 슬롯 헤더 각각을 먼저 쓰기 로그 영역(612)에 저장할 수 있다.In addition, the processor 620 may first write the offsets pointing to the location of newly written records using the write log area 612 in the non-volatile memory 610 first. More specifically, the processor 620 first uses the write log area 612 to update the first slot header corresponding to the updated first slotted page and the second slot header corresponding to the updated second slotted page, respectively It can be stored in the write log area 612 first.

프로세서(620)는 실행 중이었던 트랜잭션의 커밋을 판단할 수 있다. 상기 트랜잭션의 커밋이 판단된 경우에, 프로세서(620)는 먼저 쓰기 로그 영역(612)에 기록된 제1 슬롯 헤더 및 제2 슬롯 헤더 각각을 대응하는 슬롯티드 페이지에 복사하여 업데이트된 레코드들이 다른 트랜잭션에 보일 수 있도록 할 수 있다.Processor 620 may determine the commit of the transaction that was being executed. If the commit of the transaction is determined, the processor 620 first copies each of the first slot header and the second slot header recorded in the write log area 612 to the corresponding slotted page, To be visible to the user.

본 실시예에 따른 데이터베이스 관리 시스템은 트랜잭션 도중에 슬롯티드 페이지 전체에 관한 쓰기를 수행하지 않고, 레코드들의 오프셋을 포함하는 슬롯 헤더에 대해서만 로깅을 수행할 수 있어 쓰기 연산을 최소화하면서 데이터베이스의 무결성을 보장하는 효과를 기대할 수 있다.The database management system according to the present embodiment can perform logging only on the slot header including the offset of the records without performing writing on the entire slotted page during the transaction to ensure the integrity of the database while minimizing the write operation Effect can be expected.

도 2에서 설명된 버퍼 캐싱 방법은 RTM을 지원하는 프로세서에서 사용 가능하며, 또한 트랜잭션에 따라 하나의 슬롯티드 페이지에 관한 쓰기 수행되는 경우에 사용될 것이다. 반면에, 도 6b에서 설명된 로깅 방법은 복수의 슬롯티드 페이지를 업데이트하는 트랜잭션이나 오버플로우가 발생하여 B-tree 페이지가 분할되는 경우에 이용될 수 있다. 본 실시예의 데이터베이스 관리 장치는 트랜잭션을 수행하는 도중에 B-tree에서 오버플로우가 발생하는지 여부를 판단할 수 있다. 또한, 데이터베이스 관리 장치는 상기 오버플로우의 발생 여부에 따라 하나의 슬롯티드 페이지에 대해 버퍼 캐싱을 수행하는 방법 또는 복수의 슬롯티드 페이지에 대한 업데이트를 수행하고, 슬롯 헤더를 로깅하는 방법 중 어느 하나를 선택할 수 있다.The buffer caching method described in FIG. 2 is available in a processor that supports RTM, and will also be used when a write is performed on one slotted page in accordance with a transaction. On the other hand, the logging method illustrated in FIG. 6B can be used when a B-tree page is divided due to a transaction or an overflow that updates a plurality of slotted pages. The database management apparatus of the present embodiment can determine whether an overflow occurs in the B-tree during the transaction. Also, the database management apparatus may perform a method of performing buffer caching on one slotted page or a method of performing update on a plurality of slotted pages and logging a slot header, depending on whether the overflow occurs or not You can choose.

도 7은 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 로깅 방법의 예시도이다. 도 7을 참조하면, B-tree 페이지가 오버플로우 된 경우에, 데이터베이스 관리 시스템이 수행하는 로깅 방법을 도시하는 예시도이다. 단계(710)에서 키 값 14를 갖는 데이터의 삽입 요청에 따라 제3 페이지 내에 오버플로우가 발생한 경우가 존재할 수 있다. 단계(720)에서 데이터베이스 관리 장치는 상기 키 값 14보다 큰 키 값을 갖는 레코드들의 오프셋들을 포함하는 새로운 레코드 오프셋 어레이를 CPU 캐시로서 생성할 수 있다. 본 실시예에서는 키 값 15, 17 및 19를 각각 가지는 레코드들의 오프셋들인 700, 500, 800이 새로운 레코드 오프셋 어레이로서 생성될 수 있다. 또한, 단계(720)에서 데이터베이스 관리 시스템은 상기 생성된 새로운 레코드 오프셋 어레이를 포함하는 복수의 슬롯 헤더들을 별도의 슬롯 헤더 로그에 기록할 수 있다. 이 경우에, 기존 제3 페이지에는 어떠한 변화도 존재하지 않을 것이다.7 is an exemplary diagram illustrating a logging method performed by the database management system according to another embodiment. Referring to FIG. 7, an exemplary diagram illustrating a logging method performed by the database management system when a B-tree page overflows. There may be a case where an overflow occurs in the third page according to the insertion request of the data having the key value 14 in step 710. [ In step 720, the database management device may generate as a CPU cache a new record offset array comprising offsets of records having a key value greater than the key value 14. In this embodiment, the offsets of records 700, 500, 800 each having key values 15, 17 and 19 can be generated as a new record offset array. Also, in step 720, the database management system may record a plurality of slot headers including the generated new record offset array in a separate slot header log. In this case, there will be no change in the existing third page.

단계(730)에서 데이터베이스 관리 시스템은 새로운 이웃(sibling) 페이지를 할당하고, 지정된 키 값 14보다 작거나 같은 키를 갖는 레코드들을 새로운 이웃 페이지에 복사할 수 있다. 마찬가지로, 기존 제3 페이지에는 어떠한 변화도 존재하지 않을 것이다.At step 730, the database management system may allocate a new sibling page and copy records having a key that is less than or equal to the specified key value 14 to a new neighboring page. Likewise, there will be no change in the existing third page.

단계(740)에서 데이터베이스 관리 시스템은 이웃 페이지에 관한 키 값 및 포인트를 새로운 레코드로서 저장할 수 있다. 보다 구체적으로, 상기 이웃 페이지는 오버플로우가 발생한 제3 페이지의 부모 페이지로부터 분할되어 새로 만들어진 페이지를 나타낼 수 있다. 데이터베이스 관리 시스템은 상기 이웃 페이지에 관한 레코드는 프리 스페이스에 기록하고, 상기 레코드의 오프셋을 추가한 새로운 슬롯 헤더를 슬롯 헤더 로그에 기록할 수 있다.In step 740, the database management system may store the key values and points for the neighboring pages as a new record. More specifically, the neighboring page may be divided from the parent page of the third page in which an overflow occurs to indicate a newly created page. The database management system may record a record relating to the neighboring page in a free space and record a new slot header in which the offset of the record is added in the slot header log.

단계(750)에서 트랜잭션이 완료된 경우, 데이터베이스 관리 장치는 슬롯 헤더 로그에 커밋 마크를 기록할 수 있다. 또한, 데이터베이스 관리 장치는 로그에 기록된 트랜잭션들을 슬롯티드 페이지에 반영하기 위한 체크포인팅을 수행할 수 있다. 상기 체크포인팅이 수행되는 동안, 데이터베이스 관리 장치는 각각의 슬롯티드 페이지들의 슬롯 헤더들을 로그 영역에 기록된 슬롯 헤더들로 대체할 수 있다.If the transaction is completed in step 750, the database management device may record a commit mark in the slot header log. In addition, the database management apparatus may perform checkpointing to reflect the transactions recorded in the log on the slotted page. While the checkpointing is being performed, the DBMS may replace the slot headers of the slotted pages with the slot headers recorded in the log area.

도 8은 또 다른 일실시예에 따른 데이터베이스 관리 시스템이 수행하는 단편화 제거(defragmentation)의 예시도이다. 슬롯티드 페이지 구조에서 데이터가 분할(splitting) 또는 삭제 연산으로 인해 슬롯티드 페이지로부터 없어져야 할 경우가 존재할 수 있다. 이 경우에, 데이터베이스 관리 시스템은 삭제할 레코드를 지우기 위해 레코드 오프셋 어레이에서 상기 레코드에 대응하는 오프셋을 삭제할 수 있다. 그러나, 오프셋 만을 삭제한 경우에, 레코드 콘텐츠 영역 내에 삭제된 레코드가 그대로 위치할 수 있다. 따라서, 해당 영역을 다른 레코드를 저장하는데 사용하기 위해 데이터베이스 관리 시스템은 해당 영역들을 프리 리스트(free list)로서 연결하여 프리 스페이스로서 생성할 수 있다.FIG. 8 is an illustration of a defragmentation performed by the database management system according to another embodiment. In a slotted page structure, there may be cases where data should be lost from a slotted page due to splitting or erasing operations. In this case, the database management system may delete the offset corresponding to the record in the record offset array to clear the record to be deleted. However, in the case where only the offset is deleted, the deleted record in the record content area can be left intact. Accordingly, in order to use the area for storing another record, the database management system can connect the areas as a free list and generate the free space as a free space.

도 8을 참조하면, 제3 페이지는 오버플로우가 발생하여, 키 값 11 및 키 값 13에 대응하는 레코드들이 새로운 이웃 페이지로 이동한 상태가 도시된다. 따라서, 도 8의 제3 페이지에서 600 이상 700 이하 바이트에 대응하는 영역 및 800 이상 900 이하 바이트에 대응하는 영역은 프리 리스트로 연결될 수 있다.Referring to FIG. 8, the third page shows a state in which an overflow has occurred and records corresponding to key value 11 and key value 13 have moved to a new neighboring page. Therefore, in the third page of FIG. 8, an area corresponding to 600 to 700 bytes and an area corresponding to 800 to 900 bytes can be connected to the free list.

단계(810)에서 데이터베이스 관리 장치는 제3 페이지에 200 바이트를 초과하여 빈 공간 보다 큰 데이터가 들어 오는 경우, 두 개로 분할된 공간을 모아주는 단편화 제거 작업이 필요할 것이다. 본 실시예의 데이터베이스 관리 장치는, 쓰기 시 복사 방식에 따라 새로운 페이지에 데이터를 빈 공간이 없도록 복사하고, 부모 페이지의 부모 엔트리가 가지고 있는 페이지의 주소를 새로 만든 페이지의 주소로 덮어쓰는 방식으로 원자성 있게 업데이트를 수행할 수 있다.In step 810, if the third page contains more than 200 bytes of data larger than the empty space, the database management apparatus will need to perform a de-fragmentation operation for collecting the two divided spaces. The database management apparatus of the present embodiment copies data in a new page in a new copying method in a manner that there is no empty space and overwrites the address of the page of the parent entry of the parent page with the address of the newly created page, Update can be performed.

이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented in hardware components, software components, and / or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, such as an array, a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device , Or may be permanently or temporarily embodied in a transmitted signal wave. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer readable medium may include program instructions, data files, data structures, and the like, alone or in combination. Program instructions to be recorded on a computer-readable medium may be those specially designed and constructed for an embodiment or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described with reference to the drawings, various technical modifications and variations may be applied to those skilled in the art. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced.

Claims (14)

트랜잭션(transaction)을 실행하는 프로세서; 및
상기 트랜잭션에 따라 제1 슬롯티드 페이지(slotted page)에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 제1 레코드를 상기 제1 슬롯티드 페이지의 프리 스페이스(free space)에 저장하는 하드웨어 트랜잭션 메모리
를 포함하고,
상기 프로세서에 의해 상기 트랜잭션의 커밋(commit)이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트 하는 데이터베이스 관리 시스템.
A processor executing a transaction; And
A hardware transactional memory that stores a first record associated with the write in a free space of the first slotted page when a write on a first slotted page is performed in accordance with the transaction,
Lt; / RTI >
Wherein the hardware transactional memory updates the information about the first record in a slot header of the first slotted page when a commit of the transaction is determined by the processor.
제1항에 있어서,
상기 하드웨어 트랜잭션 메모리는 상기 제1 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 상기 제1 레코드를 포함하는 레코드 오프셋 어레이 중 적어도 하나를 상기 제1 레코드에 관한 정보로서 업데이트 하는 데이터베이스 관리 시스템.
The method according to claim 1,
Wherein the hardware transactional memory is operative to determine a record offset array comprising a start offset of the free space updated according to the first record, a number of records stored in the first slotted page, an end offset of the free space, And updates at least one as information on the first record.
제1항에 있어서,
상기 하드웨어 트랜잭션 메모리는 RTM(Restricted Transactional Memory)로 구현되고, 상기 슬롯 헤더의 크기가 64 바이트로 고정되는 것을 특징으로 하는 데이터베이스 관리 시스템.
The method according to claim 1,
Wherein the hardware transaction memory is implemented with a Restricted Transactional Memory (RTM), and the size of the slot header is fixed to 64 bytes.
제1항에 있어서,
상기 프로세서는 상기 제1 레코드의 쓰기에 관한 공간이 부족하다고 판단된 경우, 단편화(fragmentation)된 프리 스페이스를 하나의 연속된 공간으로 만들고, 상기 하드웨어 트랜잭션 메모리는 단편화 제거된(defragmentation) 프리 스페이스에 상기 제1 레코드를 쓰기 시 복사(copy on write) 기법에 따라 저장하는 데이터베이스 관리 시스템.
The method according to claim 1,
Wherein the processor makes the fragmented free space into one continuous space when it is determined that the space for writing the first record is insufficient, and the hardware transaction memory stores the free space in the defragmentation free space A database management system for storing a first record according to a copy on write technique.
제1항에 있어서,
상기 하드웨어 트랜잭션 메모리는 상기 트랜잭션에 따라 상기 제1 슬롯티드 페이지에 관한 삭제가 실행되는 경우, 상기 삭제에 연관되는 제2 레코드의 오프셋을 슬롯 헤더에서 삭제하여 로그에 저장하고,
상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제2 레코드에 관한 정보를 상기 슬롯 헤더에 업데이트 하는 데이터베이스 관리 시스템.
The method according to claim 1,
Wherein the hardware transactional memory deletes the offset of the second record associated with the deletion from the slot header and stores the offset in the slot header when deletion is performed on the first slotted page according to the transaction,
Wherein the hardware transactional memory updates the information regarding the second record in the slot header when a commit of the transaction is determined by the processor.
제5항에 있어서,
상기 하드웨어 트랜잭션 메모리는 상기 제2 레코드에 연관되는 프리 스페이스를 연결된 리스트(linked list)로서 연결하고, 상기 제2 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 레코드 오프셋 어레이 중 적어도 하나를 상기 제2 레코드에 관한 정보로서 업데이트하는 데이터베이스 관리 시스템.
6. The method of claim 5,
Wherein the hardware transaction memory links the free space associated with the second record as a linked list and updates a start offset of the updated free space according to the second record, a start offset of the record stored in the first slotted page, The end offset of the free space, and the record offset array as information on the second record.
제1항에 있어서,
상기 하드웨어 트랜잭션 메모리는 상기 트랜잭션에 따라 상기 제1 슬롯티드 페이지에 관한 업데이트가 실행되는 경우, 상기 업데이트에 연관되는 제3 레코드를 추가하고,
상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 하드웨어 트랜잭션 메모리는 상기 제3 레코드에 관한 정보를 상기 슬롯 헤더에 업데이트하는 데이터베이스 관리 시스템.
The method according to claim 1,
Wherein the hardware transactional memory adds a third record associated with the update when an update on the first slotted page is executed in accordance with the transaction,
Wherein the hardware transactional memory updates information on the third record in the slot header when a commit of the transaction is determined by the processor.
실행되는 트랜잭션에 따라 제1 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 제1 레코드를 버퍼 캐시 내의 상기 제1 슬롯티드 페이지의 프리 스페이스에 저장하는 단계;
상기 트랜잭션에 대해 커밋(commit)을 판단하는 단계; 및
상기 트랜잭션의 커밋이 판단된 경우에, 상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트 하는 단계
를 포함하는 버퍼 캐싱 방법.
Storing a first record associated with the write in a free space of the first slotted page in the buffer cache when a write on the first slotted page is executed in accordance with a transaction being executed;
Determining a commit for the transaction; And
Updating the information on the first record in the slot header of the first slotted page if the commit of the transaction is determined;
/ RTI >
제8항에 있어서,
상기 제1 레코드에 관한 정보를 상기 제1 슬롯티드 페이지의 슬롯 헤더에 업데이트 하는 단계는,
상기 제1 레코드에 따라 업데이트된 상기 프리 스페이스의 시작 오프셋, 상기 제1 슬롯티드 페이지에 저장된 레코드의 개수, 상기 프리 스페이스의 종료 오프셋 및 상기 제1 레코드를 포함하는 레코드 오프셋 어레이 중 적어도 하나를 상기 제1 레코드에 관한 정보로서 업데이트 하는 단계를 포함하는 버퍼 캐싱 방법.
9. The method of claim 8,
The step of updating the information on the first record in the slot header of the first slotted page comprises:
At least one of a start offset of the free space updated in accordance with the first record, a number of records stored in the first slotted page, an end offset of the free space, and a record offset array including the first record, Lt; RTI ID = 0.0 > 1 < / RTI > record.
트랜잭션을 실행하는 프로세서; 및
상기 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 복수의 레코드들을 각각의 슬롯티드 페이지에 저장하는 버퍼 캐시(buffer cache)를 포함하고, 상기 복수의 레코드들의 관한 정보를 포함하는 오프셋들을 저장하는 먼저 쓰기 로그(write ahead log) 영역을 포함하는 비휘발성 메모리
를 포함하는 데이터베이스 관리 시스템.
A processor executing a transaction; And
And a buffer cache that stores a plurality of records associated with the write in each slotted page when a write is performed on a plurality of slotted pages in accordance with the transaction, A non-volatile memory including a write ahead log area for storing offsets containing information,
And a database management system.
제10항에 있어서,
상기 비휘발성 메모리는 상기 저장된 복수의 레코드들에 따라 상기 각각의 슬롯티드 페이지에 대응하는 각각의 슬롯 헤더를 상기 먼저 쓰기 로그 영역에 저장하고, 상기 각각의 슬롯 헤더는 상기 각각의 슬롯티드 페이지에 관한 오프셋을 포함하는 데이터베이스 관리 시스템.
11. The method of claim 10,
Wherein the non-volatile memory stores each slot header corresponding to each slotted page in the first write log area according to the stored plurality of records, A database management system that includes offsets.
제11항에 있어서,
상기 프로세서에 의해 상기 트랜잭션의 커밋이 판단된 경우에, 상기 비휘발성 메모리는 상기 먼저 쓰기 로그 영역에 저장된 상기 각각의 슬롯 헤더들을 대응하는 상기 각각의 슬롯티드 페이지에 업데이트하는 데이터베이스 관리 시스템.
12. The method of claim 11,
Wherein the non-volatile memory updates the respective slot headers stored in the first write log area to the corresponding respective slotted pages when a commit of the transaction is determined by the processor.
실행되는 트랜잭션에 따라 복수의 슬롯티드 페이지에 관한 쓰기가 실행되는 경우, 상기 쓰기에 연관되는 복수의 레코드들을 버퍼 캐시에 저장된 각각의 슬롯티드 페이지에 업데이트하는 단계; 및
상기 복수의 레코드들에 관한 정보를 포함하는 오프셋들을 슬롯 헤더로서 미리 지정된 먼저 쓰기 로그 영역에 저장하는 단계
를 포함하는 로깅 방법.
Updating a plurality of records associated with the write to each slotted page stored in a buffer cache when a write on a plurality of slotted pages is executed according to a transaction to be executed; And
Storing the offsets including information on the plurality of records in a pre-designated first write log area as a slot header
≪ / RTI >
제13항에 있어서,
상기 오프셋들을 슬롯 헤더로서 미리 지정된 먼저 쓰기 로그 영역에 저장하는 단계는,
상기 저장된 복수의 레코드들에 따라 상기 각각의 슬롯티드 페이지에 대응하는 각각의 슬롯 헤더를 상기 먼저 쓰기 로그 영역에 저장하는 단계
를 포함하고, 상기 각각의 슬롯 헤더는 상기 각각의 슬롯티드 페이지에 관한 오프셋을 포함하는 로깅 방법.
14. The method of claim 13,
Storing the offsets in a pre-designated first write log area as a slot header,
Storing each slot header corresponding to each slotted page in the first write log area according to the stored plurality of records
Wherein each of the slot headers comprises an offset for each of the slotted pages.
KR1020170004006A 2017-01-11 2017-01-11 Database management system and method thereof using a non-volatile memory KR101946135B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170004006A KR101946135B1 (en) 2017-01-11 2017-01-11 Database management system and method thereof using a non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170004006A KR101946135B1 (en) 2017-01-11 2017-01-11 Database management system and method thereof using a non-volatile memory

Publications (2)

Publication Number Publication Date
KR20180082753A true KR20180082753A (en) 2018-07-19
KR101946135B1 KR101946135B1 (en) 2019-02-08

Family

ID=63058309

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170004006A KR101946135B1 (en) 2017-01-11 2017-01-11 Database management system and method thereof using a non-volatile memory

Country Status (1)

Country Link
KR (1) KR101946135B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200082949A (en) 2018-12-31 2020-07-08 성균관대학교산학협력단 Method for logging double header of slotted page and database apparautus
CN116244041A (en) * 2022-12-02 2023-06-09 湖南亚信安慧科技有限公司 Performance optimization method for database sub-transaction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101491626B1 (en) * 2013-07-01 2015-03-05 성균관대학교산학협력단 Memory storage apparatus, memory system and transaction function support method for database
KR20160088432A (en) * 2014-03-14 2016-07-25 인터내셔널 비지네스 머신즈 코포레이션 Coherence protocol augmentation to indicate transaction status
KR20160145197A (en) * 2012-10-22 2016-12-19 인텔 코포레이션 Control messaging in multislot link layer flit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160145197A (en) * 2012-10-22 2016-12-19 인텔 코포레이션 Control messaging in multislot link layer flit
KR101491626B1 (en) * 2013-07-01 2015-03-05 성균관대학교산학협력단 Memory storage apparatus, memory system and transaction function support method for database
KR20160088432A (en) * 2014-03-14 2016-07-25 인터내셔널 비지네스 머신즈 코포레이션 Coherence protocol augmentation to indicate transaction status

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
[블로그] 차세대 비휘발성 메모리를 활용한 데이터베이스 성능 향상 기법, 2016.9.13. *
김욱희 외 4명. "NVWAL: Exploiting NVRAM in Write-Ahead Logging". 21st International Conference on Architectural Support for Programming Languages and Operating Systems(ASPLOS '16), 2016.4. *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200082949A (en) 2018-12-31 2020-07-08 성균관대학교산학협력단 Method for logging double header of slotted page and database apparautus
US11442929B2 (en) 2018-12-31 2022-09-13 Research & Business Foundation Sungkyunkwan University Double header logging of slotted page structures
CN116244041A (en) * 2022-12-02 2023-06-09 湖南亚信安慧科技有限公司 Performance optimization method for database sub-transaction
CN116244041B (en) * 2022-12-02 2023-10-27 湖南亚信安慧科技有限公司 Performance optimization method for database sub-transaction

Also Published As

Publication number Publication date
KR101946135B1 (en) 2019-02-08

Similar Documents

Publication Publication Date Title
US11301379B2 (en) Access request processing method and apparatus, and computer device
CN105843551B (en) Data integrity and loss resistance in high performance and large capacity storage deduplication
KR100862661B1 (en) Method for deferred logging and apparatus thereof
JP4939610B2 (en) System, method, and computer program for managing data using a write-back cache unit
KR100689762B1 (en) A database system and method for storing a plurality of database components in main memory thereof
US11449430B2 (en) Key-value store architecture for key-value devices
US20180300083A1 (en) Write-ahead logging through a plurality of logging buffers using nvm
US11030092B2 (en) Access request processing method and apparatus, and computer system
US11537582B2 (en) Data access method, a data access control device, and a data access system
US9990150B2 (en) Method to provide transactional semantics for updates to data structures stored in a non-volatile memory
KR20200060220A (en) NVM-based file system and method for data update using the same
US10452496B2 (en) System and method for managing storage transaction requests
CN111414320B (en) Method and system for constructing disk cache based on nonvolatile memory of log file system
KR20110046118A (en) Adaptive logging apparatus and method
KR101946135B1 (en) Database management system and method thereof using a non-volatile memory
Wei et al. Extending SSD lifetime with persistent in-memory metadata management
KR101789933B1 (en) Computing system and method for data consistency
US20230229346A1 (en) Crash-safe tiered memory system
Seo Persistent Database Buffer Caching and Logging with Slotted Page Structure
KR101375794B1 (en) Method and device for improving performance of database
Lee et al. Minimizing consistency-control overhead with rollback-recovery for storage class memory

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E90F Notification of reason for final refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant