KR20050054380A - Database management system and the method of controlling consistency of system table in dbms - Google Patents
Database management system and the method of controlling consistency of system table in dbms Download PDFInfo
- Publication number
- KR20050054380A KR20050054380A KR1020030087748A KR20030087748A KR20050054380A KR 20050054380 A KR20050054380 A KR 20050054380A KR 1020030087748 A KR1020030087748 A KR 1020030087748A KR 20030087748 A KR20030087748 A KR 20030087748A KR 20050054380 A KR20050054380 A KR 20050054380A
- Authority
- KR
- South Korea
- Prior art keywords
- system table
- entry
- record
- lock
- transaction
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
- G06F16/2343—Locking methods, e.g. distributed locking or locking implementation details
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
본 발명은 시스템 테이블을 질의 처리기 수준에서 동시성 제어하는 데이터베이스 관리 시스템 및 그 시스템에서 시스템 테이블에 대한 동시성 제어 방법에 관한 것이다. The present invention relates to a database management system for concurrency control of system tables at the query processor level, and a method of concurrency control for system tables in the system.
본 발명의 데이터베이스 관리 시스템은, 시스템 테이블과 사용자 테이블이 물리적으로 저장되는 디스크; 시스템 테이블과 사용자 테이블을 메인 메모리에 적재하여 버퍼 관리를 수행하는 버퍼관리모듈과, 사용자 테이블에 대한 일관성과 동시성을 지원하는 제 1 잠금관리모듈을 포함하는 저장 관리기; 및 저장 관리기로부터의 디스크 구조 형식의 시스템 테이블 정보를 메모리 구조로 변환하여 관리하고 각 응용프로그램 트랜잭션의 요구에 따라 해당 시스템 테이블 정보를 제공하는 시스템 테이블 관리모듈과, 시스템 테이블 정보에 대한 동시성 및 일관성을 지원하는 제 2 잠금관리모듈을 포함하는 질의 처리기;로 구성된다. The database management system of the present invention includes a disk on which system tables and user tables are physically stored; A storage manager including a buffer management module configured to load a system table and a user table into main memory to perform buffer management, and a first lock management module to support consistency and concurrency of the user table; And a system table management module that converts and manages system table information in a disk structure form from a storage manager into a memory structure and provides corresponding system table information according to the requirements of each application transaction, and the concurrency and consistency of system table information. It consists of; a query processor including a second lock management module to support.
Description
본 발명은 데이터베이스 시스템에서 시스템 테이블에 대한 동시성 제어 방법에 관한 것으로, 보다 상세히는 데이터 종류 중에서 접근 빈도와 트랜잭션 공유도가 매우 높고 접근 형식이 일정한 시스템 테이블을 질의 처리기 수준에서 동시성 제어하는 데이터베이스 관리시스템 및 그 시스템에서 시스템 테이블에 대한 동시성 제어 방법에 관한 것이다. The present invention relates to a method for controlling concurrency of system tables in a database system. More specifically, the present invention relates to a database management system for concurrency control of a system table with a high access frequency and transaction sharing and a constant access type among data types at the query processor level. It relates to a method of controlling concurrency on system tables in the system.
일반적으로, 데이터베이스 관리 시스템은 같은 데이터(테이블 또는 레코드)를 동시에 다중 사용자(트랜잭션)들이 접근 할 때, 데이터 일관성을 유지하기 위하여 데이터 공유를 위한 버퍼 관리와 동시성 제어를 위한 잠금 관리를 저장 관리기 수준에서 지원하고 있다.In general, a database management system stores a buffer management for data sharing and a lock management for concurrency control at the storage manager level when multiple users (transactions) access the same data (table or record) at the same time. Support.
도 1은 다중 트랜잭션이 수행되는 과정에서 모든 테이블들에 대한 동시성 제어가 저장 관리기에서 처리되는 종래의 데이터베이스 관리 시스템의 구조 예이다.1 is a structural example of a conventional database management system in which concurrency control for all tables is processed in a storage manager while multiple transactions are performed.
도 1을 참조하면, 데이터베이스 관리시스템은 트랜잭션을 생성하는 질의처리기(110)와, 버퍼관리모듈(122)과 잠금관리모듈(124)을 포함하는 저장관리기(120), 및 시스템 테이블(132)과 사용자 테이블(134)을 포함하는 디스크(130)로 이루어져 응용 프로그램들(101-1~101-n)의 요구를 처리한다.Referring to FIG. 1, the database management system includes a query processor 110 for generating a transaction, a storage manager 120 including a buffer management module 122 and a lock management module 124, and a system table 132. It consists of a disk 130 including a user table 134 to process the requests of the application programs (101-1 ~ 101-n).
응용 프로그램(101-1~101-n)은 사용자가 요구한 질의 처리를 위하여 트랜잭션(112-1~112-n)을 발생시키고, 트랜잭션(112-1~112-n)은 사용자가 요구한 사용자 테이블(134)에 접근하기 위하여, 먼저 사용자 테이블 접근을 위한 정보를 얻기 위해 시스템 테이블(132)을 먼저 접근한다. 시스템 테이블에 접근하는 절차는 먼저 저장 관리기의 잠금관리모듈(124)로부터 잠금 권한을 획득한 다음, 시스템 테이블(132)이 버퍼 관리 모듈(122)에서 관리하는 공간(이하, 버퍼 공간이라 함)에 있는지를 찾는다. 시스템 테이블(132)이 버퍼 공간에 있는 경우에는 그 내용을 질의 처리기(110)에서 사용할 수 있도록 디스크 구조 형식인 레코드를 메모리 구조 형식으로 바꾼 다음 저장하고, 그 내용을 읽어서 궁극적으로 찾고자 하는 사용자 테이블 정보를 얻는다. 찾고자 하는 시스템 테이블(132)이 버퍼 공간에 없는 경우에는 디스크(130)로부터 버퍼 공간으로 읽은 다음, 앞서 언급한 실행 순서를 따른다.The applications 101-1 to 101-n generate the transactions 112-1 to 112-n for the query processing requested by the user, and the transactions 112-1 to 112-n are the users requested by the user. To access the table 134, first access the system table 132 to obtain information for accessing the user table. The procedure of accessing the system table first obtains the locking authority from the lock management module 124 of the storage manager, and then stores the system table 132 in a space managed by the buffer management module 122 (hereinafter referred to as a buffer space). Find out. If the system table 132 is in buffer space, the contents of the disk structure are changed to the memory structure format and stored in the memory structure format so that the contents can be used by the query processor 110, and the user table information that is ultimately desired to be read and read. Get If the system table 132 to be found is not in the buffer space, the system table 132 is read from the disk 130 into the buffer space, and then the above-described execution order is followed.
그러므로 시스템 테이블은 사용자 테이블보다는 접근 빈도가 매우 높고, 대부분의 트랜잭션에서 공유되는 특성과 읽기 연산이 거의 대부분이다. 그러나 버퍼 관리 모듈(122)은 시스템 테이블과 사용자 테이블을 동등하게 버퍼 교체 알고리즘을 적용하기 때문에 시스템 테이블을 찾을 때도 버퍼 공간에 없는 경우가 발생할 수 있으며, 이에 따라 디스크 입출력에 소요되는 시간 비중이 상대적으로 매우 높아지는 문제점이 있다.Therefore, system tables have a higher frequency of access than user tables, and most of the properties and read operations are shared by most transactions. However, since the buffer management module 122 applies the buffer replacement algorithm equally to the system table and the user table, the buffer management module 122 may not be present in the buffer space even when searching the system table, and thus a relatively large portion of the time spent on disk I / O. There is a problem that is very high.
또한 트랜잭션들(112-1~112-n)의 시스템 테이블 공유가 매우 높음에도 불구하고, 트랜잭션마다 관리되는 시스템 테이블 정보를 질의 처리기(110) 수준에서 공유하지 않음에 따라 각 트랜잭션들(112-1~112-n)은 서로 같은 시스템 테이블을 접근하더라도 트랜잭션 별로 중복해서 질의 처리기(110)로 가져옴과 동시에 매번 디스크 형식 구조를 메모리 구조 형식으로 변환해야 하는 문제점이 있다. In addition, even though the system table sharing of the transactions (112-1 ~ 112-n) is very high, each transaction (112-1) as the system table information is not shared at the query processor (110) level managed for each transaction 112-n) has a problem in that even when accessing the same system table, the disk format structure is converted into the memory structure format at the same time as the transaction processor is repeatedly imported to the query processor 110 for each transaction.
본 발명은 상술한 종래의 문제점을 해결하기 위한 것으로서, 본 발명의 목적은 시스템 테이블들에 대해서는 질의 처리기에서, 즉 메모리 구조 형식 자체에서 동시성 제어 기법을 적용시켜 트랜잭션들이 시스템 테이블 정보를 질의 처리기 수준에서 공유할 수 있도록 하여 동시성 성능을 높이고, 시스템 테이블을 메모리 구조 형식으로 변환하는 연산을 한번으로 줄이도록 개선한 데이터베이스 관리 시스템 및 그 시스템에서 시스템 테이블에 대한 동시성 제어 방법을 제공하는데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to apply a concurrency control scheme in a query processor, that is, in a memory structure format itself, to system tables so that transactions can generate system table information at the query processor level. The present invention provides a database management system that improves concurrency performance by sharing, and reduces the number of operations for converting a system table into a memory structure format and a method of controlling concurrency on system tables in the system.
또한, 본 발명의 다른 목적은 한번 읽은 시스템 테이블 정보는 데이터베이스 관리 시스템을 다운시키기 전까지 항상 보관하도록 함에 따라 디스크 입출력은 단지 한번 발생하도록 함으로 해서 성능을 개선할 수 있는 데이터베이스 관리시스템 및 그 시스템에서 시스템 테이블에 대한 동시성 제어 방법을 제공하는 것이다. In addition, another object of the present invention is to ensure that the system table information once read is always stored until the database management system is down, so that disk I / O occurs only once, so that the database management system and system tables in the system can be improved. It is to provide a concurrency control method for.
상기와 같은 목적을 달성하기 위하여 본 발명의 데이터베이스 관리 시스템은, 시스템 테이블과 사용자 테이블이 물리적으로 저장되는 디스크; 상기 디스크로부터의 시스템 테이블과 사용자 테이블을 메인 메모리에 적재하여 버퍼 관리를 수행하는 버퍼관리모듈과, 사용자 테이블에 대한 일관성과 동시성을 지원하는 제 1 잠금관리모듈을 포함하는 저장 관리기; 및 상기 저장 관리기로부터의 디스크 구조 형식의 시스템 테이블 정보를 메모리 구조로 변환하여 관리하고 각 응용프로그램 트랜잭션의 요구에 따라 해당 시스템 테이블 정보를 제공하는 시스템 테이블 관리모듈과, 시스템 테이블 정보에 대한 동시성 및 일관성을 지원하는 제 2 잠금관리모듈을 포함하여 각 응용프로그램의 질의에 응답하는 질의 처리기;로 구성된다. In order to achieve the above object, a database management system of the present invention includes a disk on which system tables and user tables are physically stored; A storage manager including a buffer management module configured to load a system table and a user table from the disk into main memory to perform buffer management, and a first lock management module to support consistency and concurrency of the user table; And a system table management module which converts and manages system table information in a disk structure form from the storage manager into a memory structure and provides corresponding system table information according to a request of each application transaction, and concurrency and consistency of system table information. And a query processor that responds to a query of each application program, including a second lock management module supporting the application.
또한, 상기와 같은 목적을 달성하기 위하여 본 발명의 데이터베이스 시스템에서 시스템 테이블에 대한 동시성 제어 방법은, 사용자 테이블 식별자 값을 통해 해쉬 엔트리를 결정하고, 해당 엔트리의 래치를 획득하여 다른 트랜잭션의 동시 접근을 방지하는 단계; 그 엔트리에서 해당 레코드가 탐색됨에 따라, 읽기 잠금권한을 획득한 후 레코드에서 시스템 테이블 정보를 획득하는 단계; 및 상기 획득된 시스템 테이블 정보에 따라 디스크에서 필요한 사용자 테이블 정보를 읽어 온 후, 상기 엔트리 래치를 반납하는 단계;를 수행하여 트랜잭션 요구에 대한 질의 처리기 수준의 시스템 테이블 정보를 탐색하는 것을 특징으로 한다. In addition, in order to achieve the above object, the concurrency control method for a system table in the database system of the present invention determines a hash entry through a user table identifier value and obtains a latch of the entry to simultaneously access other transactions. Preventing; As the record is retrieved from the entry, acquiring read lock permission and then obtaining system table information from the record; And reading the necessary user table information from the disk according to the obtained system table information, and returning the entry latch. The system table information of the query processor level for a transaction request is searched.
이하, 본 발명에 따른 실시예를 첨부한 도면을 참조하여 상세히 설명하기로 한다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 2는 본 발명에 따른 질의 처리기에서의 시스템 테이블에 대한 동시성 제어 방법이 적용되는 데이터베이스 관리시스템의 구성도이다.2 is a block diagram of a database management system to which a concurrency control method for a system table in a query processor according to the present invention is applied.
도 2를 참조하면, 데이터베이스 관리시스템은 잠금관리모듈(214)과 시스템 테이블 관리모듈(216)을 포함하고 트랜잭션(212-1~212-n)을 생성하는 질의 처리기(210)와, 버퍼관리모듈(224)과 잠금관리모듈(222)을 포함하는 저장관리기(220), 및 시스템 테이블(232)과 사용자 테이블(234)을 저장하고 있는 디스크(230)로 이루어져 응용 프로그램들(201-2~101-n)의 요구(질의)를 처리한다.Referring to FIG. 2, the database management system includes a lock management module 214 and a system table management module 216, a query processor 210 for generating transactions 212-1 to 212-n, and a buffer management module. 224 and a storage manager 220 including a lock management module 222, and a disk 230 for storing the system table 232 and the user table 234 application programs (201-2 ~ 101) -n) process the request (query).
즉, 데이터베이스 관리 시스템을 사용하는 다양한 응용 프로그램(201-1~201-n)이 존재하고, 이들로부터 요청되어지는 질의 수행, 즉 트랜잭션(212-1~212-n)은 각 응용 프로그램에 따라 별도로 존재한다. 다중 트랜잭션들(212-1~212-n)은 질의를 수행하는 과정에서 필요한 시스템 테이블 정보를 시스템 테이블 관리 모듈(216)로부터 얻는다. 시스템 테이블 관리 모듈(216)은 저장 관리기의 버퍼 관리 모듈(224)을 통해 얻어진 디스크 구조 형식의 시스템 테이블 정보를 메모리 구조로 변환하며, 이들 정보를 다중 트랜잭션(212-1~212-n)이 공유할 수 있도록 질의 처리기 부분의 잠금 관리 모듈(214)을 통해 일관성과 동시성을 지원한다. 저장 관리기의 버퍼 모듈(224)은 디스크 구조 형태의 시스템 테이블과 일반 데이터(사용자 테이블)를 메인 메모리에 적재하여 버퍼 관리를 수행하며, 저장 관리기 부분의 잠금 관리 모듈(222)은 일반 데이터 파일의 정보에 한하여 일관성 및 동시성의 유지를 담당한다. 디스크(230)는 시스템 테이블(232)과 일반 데이터 파일(234)이 물리적으로 저장되어 있다. 그리고 한번 시스템 테이블 관리 모듈(216)로 적재된 정보는 해당 사용자 파일이 삭제되지 않는 한, 시스템 테이블 관리 모듈(216)에 유지되도록 한다. That is, there are various applications 201-1 to 201-n using the database management system, and query executions requested from them, that is, transactions 212-1 to 212-n are separately determined according to each application. exist. The multiple transactions 212-1 to 212-n obtain system table information necessary from the system table management module 216 in the process of executing a query. The system table management module 216 converts system table information in a disk structure format obtained through the storage management buffer management module 224 into a memory structure, which is shared by multiple transactions 212-1 through 212-n. Consistency and concurrency are supported through the lock management module 214 of the query handler. The buffer manager 224 of the storage manager loads a system table and general data (user table) in a disk structure into main memory to perform buffer management. The lock management module 222 of the storage manager part stores information of a general data file. Only responsible for maintaining consistency and concurrency. The disk 230 physically stores a system table 232 and a general data file 234. The information once loaded into the system table management module 216 is maintained in the system table management module 216 unless the corresponding user file is deleted.
도 3 은 본 발명에 따라 시스템 테이블 관리모듈에서 관리하는 자료 구조의 예이다. 시스템 테이블 관리 모듈(216)은 시스템 테이블(232)을 종류 별로 모두 관리하는데, 도 3에서 예시한 테이블 종류는 테이블 정보를 나타내는 시스템 테이블(310)과 인덱스 정보를 나타내는 시스템 테이블들(320)에 대해서만 예를 들었다. 시스템 테이블 리스트내의 각 엔트리에 래치(311,312)가 존재하고, 현재 사용중인 시스템 테이블 노드(레코드)들이 링크되어 있다. 3 is an example of a data structure managed by a system table management module according to the present invention. The system table management module 216 manages all the system tables 232 by type. The table type illustrated in FIG. 3 is only for the system table 310 indicating the table information and the system tables 320 indicating the index information. For example. Each entry in the system table list has latches 311 and 312, and the system table nodes (records) currently in use are linked.
도 3을 참조하면, 테이블 정보를 나타내는 시스템 테이블(310)의 경우, 해쉬 테이블로 관리되는 시스템 테이블 리스트와 똑 같은 해쉬 값들로 리스트에 연결된 시스템 테이블 레코드들로 구성된다. 참조번호 313은 "employee"라는 사용자 테이블에 대한 정보를 저장하는 시스템 테이블 레코드이다. 똑 같은 해쉬 값을 가지는 레코드들(314)은 링크드 리스트(linked list)로 운영된다.Referring to FIG. 3, the system table 310 representing table information includes system table records linked to a list with the same hash values as the system table list managed by the hash table. Reference numeral 313 is a system table record that stores information about the user table named "employee". Records 314 having the same hash value operate on a linked list.
데이터베이스 관리 시스템이 처음 기동될 때는, 시스템 테이블 관리를 위해 시스템 테이블 리스트들만 만들고, 시스템 테이블 리스트의 엔트리 개수는 각 시스템 테이블에 속한 레코드 개수(m)만큼 만들고, 해쉬 함수는 사용자 테이블 식별자 값에 m를 나눈 나머지 값을 해쉬 값으로 사용하여, 충돌 현상이 최대한 발생하지 않도록 하였다. 참조번호 320은 인덱스 정보 테이블에 있는 레코드 개수가 m 개인 경우의 시스템 기동시 초기화된 모습을 나타내고 있다.When the database management system is first started, it creates only system table lists for system table management, the number of entries in the system table list by the number of records (m) in each system table, and the hash function adds m to the user table identifier value. The remaining divided value was used as a hash value to prevent collisions as much as possible. Reference numeral 320 denotes an initialization state at system startup when the number of records in the index information table is m.
시스템 테이블 레코드를 시스템 테이블 리스트의 한 엔트리에 여러 트랜잭션들이 검색, 삭제, 삽입 연산을 동시에 수행하는 경우, 시스템 테이블 리스트와 연결된 레코드를 찾거나 연결 정보를 변경하고자 할 때는 참조번호 311, 312와 같이 래치를 사용하고, 실제 레코드 정보 자체를 획득하거나 변경하고자 할 때는 참조번호 315와 같은 잠금 기능을 이용하여 일관성 및 동시성을 지원한다. When multiple system searches, deletes, and inserts a system table record into an entry in the system table list at the same time; In order to obtain or change the actual record information itself, a lock function such as 315 is used to support consistency and concurrency.
도 4는 본 발명에 따라 사용자 테이블에 대한 정보가 데이터베이스 내에 있을 때, 해당되는 시스템 테이블의 레코드를 찾는 시스템 테이블 탐색 절차이다. 4 is a system table search procedure for finding a record of a corresponding system table when information about a user table is in a database according to the present invention.
먼저, 트랜잭션으로부터 시스템 테이블에 대한 정보 요청이 들어오면, 사용자 테이블 식별자 값으로 해쉬 함수를 사용하여 해쉬 엔트리를 결정한다(401,402). 해쉬 엔트리가 결정되면 해당 엔트리의 래치(latch:311,312)를 획득함으로써, 다른 트랜잭션이 동시에 이 엔트리에 접근하는 것을 방지한다(403). 엔트리에 관한 래치을 획득하고 나면, 이 엔트리에 연결되어 있는 시스템 테이블 레코드를 탐색한다(404).First, when a request for information about a system table comes from a transaction, a hash entry is determined using a hash function as a user table identifier value (401, 402). If a hash entry is determined, a latch (311, 312) of the entry is obtained, thereby preventing other transactions from accessing this entry at the same time (403). After obtaining the latch for the entry, the system table record associated with the entry is searched (404).
탐색 결과 해당 시스템 테이블 레코드가 발견되면, 테이블 정보를 획득하기 위하여 읽기 잠금 권한을 획득하는 과정을 거친다(405). 이는 도 7에서 자세히 설명한다. 획득이 완료된 이후에는 알고자 하는 정보를 읽어 간 다음, 해당 엔트리 래치(311,312)를 반납한다(409, 410). If a corresponding system table record is found as a result of the search, a read lock right is acquired to acquire table information (405). This is described in detail in FIG. 7. After the acquisition is completed, the information to be read is read and the corresponding entry latches 311 and 312 are returned (409 and 410).
만일, 해당 해쉬 엔트리에 레코드가 존재하지 않는 경우, 레코드 내용을 저장하기 위한 새로운 노드를 생성하여 엔트리에 추가시킨다(406). 시스템 테이블 정보를 획득하기 위하여 읽기 잠금 획득 과정을 거친 다음, 저장 관리기(220)로부터 시스템 테이블 레코드를 전달받는다(407). 이때 디스크 구조 형식의 레코드 정보를 질의 처리기(210)가 사용하는 메모리 구조 형식으로 변환하여 새로운 노드에 반영한다(408). 필요한 정보를 모두 읽어 간 다음, 해당 엔트리 래치(311,312)를 반납한다(409,410).If a record does not exist in the corresponding hash entry, a new node for storing the record content is created and added to the entry (406). After acquiring a read lock to acquire system table information, the system manager receives a system table record from the storage manager 220 (step 407). In this case, the record information of the disk structure format is converted into the memory structure format used by the query processor 210 and reflected to the new node (408). After reading all the necessary information, the entry latches 311 and 312 are returned (409 and 410).
도 5는 본 발명에 따라 사용자 테이블을 삭제하는 경우, 사용자 테이블에 관련된 시스템 테이블 정보도 변경되어야 하며, 이에 대한 시스템 테이블 관리기의 동작 절차이다. 5, when deleting a user table, system table information related to the user table should also be changed, which is an operation procedure of the system table manager.
도 5를 참조하면, 사용자 테이블에 관련된 시스템 테이블 레코드가 시스템 테이블 관리 리스트(310)에 있는 지를 알기 위해서, 먼저 해쉬 엔트리를 선택하고, 래치를 획득한다(501,502). Referring to FIG. 5, in order to know if a system table record related to a user table is in the system table management list 310, a hash entry is first selected and a latch is obtained (501, 502).
해당 엔트리에서 시스템 테이블 레코드를 탐색한 다음, 시스템 테이블 레코드가 없는 경우에는 아직 접근하고 있는 트랜잭션이 없다는 의미이므로, 곧바로 저장 관리기(220)에서 해당 레코드 부분을 삭제하도록 한다(503,506).After the system table record is searched in the corresponding entry, if there is no system table record, it means that there is no transaction being accessed. Therefore, the storage manager 220 immediately deletes the corresponding record portion (503, 506).
해당 엔트리에서 레코드가 있는 경우에는 다른 트랜잭션이 현재 사용중일 가능성이 있으므로, 쓰기 잠금 권한을 획득한 이후(504), 해당 레코드 노드를 삭제한다(505). 레코드 노드 삭제가 끝난 이후에는 저장 관리기(220)에서 해당 레코드를 삭제하고(506), 엔트리의 래치를 반납한다(507). 레코드 노드 삭제 절차는 도 7에서 상세히 설명한다.If there is a record in the entry, another transaction may be currently in use. Thus, after obtaining the write lock right (504), the record node is deleted (505). After deleting the record node, the storage manager 220 deletes the record (506) and returns the latch of the entry (507). The record node deletion procedure will be described in detail with reference to FIG. 7.
도 6은 본 발명에 따라 사용자 테이블을 새롭게 생성할 경우, 이에 대한 시스템 테이블 관리기의 동작 절차이다. 사용자 테이블에 관련된 레코드가 시스템 테이블 관리 리스트(310)에 있는 지를 알기 위해서, 먼저 해쉬 엔트리를 선택하고, 래치를 획득한다(601,602). 이어 해당 엔트리에서 시스템 테이블 레코드를 탐색한 다음, 레코드가 있는 경우에는 이미 똑 같은 테이블이 존재한다는 뜻이기 때문에 획득한 래치를 반납하고 오류로 반환하고 끝낸다(603~605). 6 illustrates an operation procedure of the system table manager when a user table is newly created according to the present invention. To know if a record associated with the user table is in the system table management list 310, first select a hash entry and obtain a latch (601, 602). It then searches for the system table record in that entry and, if there is a record, returns the acquired latch, returns it as an error, and ends because the same table already exists (603-605).
해당 엔트리에서 시스템 테이블 레코드를 탐색하여 레코드가 없는 경우에는 저장 관리기(220)에서 사용자 테이블 생성 및 관련 시스템 테이블 정보도 변경한 다음, 질의 처리기(210)에서 관리하는 시스템 테이블 리스트(310)에 노드를 추가하고, 관련 시스템 테이블 정보를 저장한다(606,607). 이어 잠금 권한을 획득하고, 해당 엔트리의 래치를 반납한다(608.609). 획득한 잠금 권한은 트랜잭션이 끝날 때 반납된다. 사용자 테이블 구조 변경도 유사한 개념으로 처리된다.If there is no record by searching the system table record in the corresponding entry, the storage manager 220 also changes the user table creation and related system table information, and then places the node in the system table list 310 managed by the query processor 210. Add and store relevant system table information (606,607). The lock is then acquired and the latch of the entry is returned (608.609). The acquired lock authority is returned at the end of the transaction. Changing the user table structure is a similar concept.
도 7은 본 발명에 따라 잠금 획득을 위한 처리 과정을 도시한 흐름도이다.7 is a flowchart illustrating a processing procedure for obtaining a lock according to the present invention.
도 7을 참조하면, 해쉬 엔트리의 래치을 획득한 상태에서 시스템 테이블 리스트 탐색을 통해 해당 테이블을 찾으면, 현재 테이블 노드에 걸려있는 읽기/쓰기 잠금 모드와 현 트랜잭션이 수행하고자 하는 잠금 모드를 비교하여 공유 가능 여부를 판단한다(701~703).Referring to FIG. 7, when a table is found through a system table list search while a latch of a hash entry is acquired, the table can be shared by comparing a read / write lock mode currently held in a table node with a lock mode that the current transaction is to perform. It is determined whether or not (701 ~ 703).
잠금 모드 종류는 '읽기 모드'와 '쓰기 모드'로 나누고, 읽기 모드끼리는 공유할 수 있지만, 쓰기 모드는 어떠한 다른 모드와도 공유할 수 없도록 한다. 공유가 가능한 경우에도 노드의 대기 리스트에 대기 중인 트랜잭션이 존재하는지를 검사한다. The lock mode is divided into 'read mode' and 'write mode', and the read modes can be shared, but the write mode cannot be shared with any other mode. Even if sharing is possible, check for pending transactions in the node's wait list.
만약, 공유가 가능하고 대기 중인 트랜잭션이 없다면 요구한 잠금 모드를 노드에 기록하고, 현재 접근한 트랜잭션 수 값에 1 증가시킴으로서 잠금을 획득한다(705). If the share is available and there are no waiting transactions, the lock is obtained by recording the requested lock mode in the node and increasing the value of the currently accessed transaction by one (705).
만약, 대기 리스트에 트랜잭션이 존재하는 경우 또는 공유가 불가능한 경우에는 트랜잭션 식별자 값을 대기 리스트에 연결시키고(703), 엔트리의 래치를 반납한다(704). 그리고 해당 트랜잭션은 블록된다. If a transaction exists in the wait list or sharing is not possible, the transaction identifier value is linked to the wait list (703), and the latch of the entry is returned (704). The transaction is blocked.
잠금을 획득한 트랜잭션 수행이 끝난 경우에는 대기 리스트에 있는 것 중에 첫 트랜잭션이 쓰기 모드로 기다리는 경우에는 첫 트랜잭션 하나만 깨우고, 읽기 모드로 기다리는 경우에는 기다리는 트랜잭션들 중에서 읽기 모드의 것을 모두 깨워서, 다시 잠금 획득 절차를 수행하도록 한다.When the transaction that has acquired the lock is finished, if the first transaction in the waiting list waits in the write mode, only the first transaction is awakened, and if it waits in the read mode, it wakes up all of the read mode among the waiting transactions and acquires the lock again. Follow the procedure.
상술한 바와 같이 본 발명은 데이터베이스 관리 시스템의 질의 처리기 레벨에서 다중 트랜잭션들이 동시에 시스템 테이블을 접근할 수 있도록 함으로써 다음과 같은 효과가 있다.As described above, the present invention has the following effects by allowing multiple transactions to access the system table at the query processor level of the database management system.
첫째, 시스템 테이블은 접근하는 형식이 일정하기 때문에 일반적으로 파일 레벨, 레코드 레벨 모두 관리하는 것을 레코드 레벨만 관리하도록 함으로 해서 성능 개선을 얻을 수 있다.First, since system tables are accessed in a constant format, performance can be improved by managing only the record level to manage both the file level and the record level.
둘째, 일반적으로 시스템 테이블 공유를 버퍼 공간에서 지원함으로 해서 항상 찾고자 하는 테이블 정보가 메모리에 없을 수도 있었지만, 본 발명에서는 한번 읽은 테이블 정보는 항상 메모리에 관리함으로 해서 검색 성능을 높일 수 있다.Second, in general, since system table sharing is supported in a buffer space, table information to be always found may not be in memory. However, in the present invention, table information read once is always managed in memory, thereby improving search performance.
셋째, 기존 방식은 트랜잭션마다 처음 접근하는 시스템 테이블 정보는 반드시 디스크 구조 형식에서 메모리 구조 형식로의 변환 과정을 매번 수행하였지만, 본 발명에서는 데이터베이스 관리 시스템 차원에서 시스템 테이블 정보는 한번만 구조 형식을 변환하도록 함으로 해서 시스템 테이블 정보 접근 속도를 높일 수 있다.Third, in the conventional method, the system table information that is first accessed per transaction must be converted every time from the disk structure format to the memory structure format. However, in the present invention, the system table information is converted only once in the database management system. This can speed up system table information access.
도 1은 다중 트랜잭션이 수행되는 과정에서 모든 테이블들에 대한 동시성 제어가 저장 관리기에서 처리되는 종래의 데이터베이스 관리 시스템의 구조를 도시한 도면. 1 is a diagram illustrating a structure of a conventional database management system in which concurrency control for all tables is processed in a storage manager while multiple transactions are performed.
도 2는 본 발명에 따른 다중 트랜잭션이 수행되는 과정에서 시스템 테이블들에 대해서만 질의 처리기에서 관리되는 데이터베이스 관리 시스템의 구조를 도시한 도면.2 is a diagram illustrating a structure of a database management system managed by a query processor only for system tables in a process of performing multiple transactions according to the present invention.
도 3은 본 발명에서 제공하는 시스템 테이블 정보를 관리하기 위해 필요로 하는 자료 구조의 예.3 is an example of a data structure required for managing system table information provided by the present invention.
도 4는 본 발명에서 제공하는 시스템 테이블 관리 모듈에서 특정 레코드를 탐색하는 과정을 도시한 흐름도.4 is a flowchart illustrating a process of searching for a specific record in the system table management module provided by the present invention.
도 5는 본 발명에 따른 시스템 테이블 관리 자료 구조에서 사용자 파일 삭제로 인해 시스템 테이블의 한 레코드를 삭제하는 과정을 도시한 흐름도.5 is a flowchart illustrating a process of deleting one record of a system table due to deletion of a user file in a system table management data structure according to the present invention.
도 6은 본 발명에 따라 시스템 테이블 관리 자료 구조에서 사용자 파일 생성으로 인해 시스템 테이블의 한 레코드를 삽입하는 과정을 도시한 흐름도.6 is a flowchart illustrating a process of inserting a record of a system table due to user file creation in a system table management data structure according to the present invention.
도 7은 본 발명에 따른 선택된 레코드에 잠금을 획득하는 과정을 도시한 흐름도.7 is a flow chart illustrating a process of obtaining a lock on a selected record in accordance with the present invention.
<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>
201-1~201-n: 응용 프로그램 210: 질의 처리기201-1 through 201-n: Application 210: Query Handler
212-1~212-n: 트랜잭션 214: 잠금관리모듈212-1 ~ 212-n: Transaction 214: Lock management module
216: 시스템 테이블 관리모듈 220: 저장 관리기216: system table management module 220: storage manager
222: 잠금관리모듈 224: 버퍼관리모듈222: lock management module 224: buffer management module
230: 디스크 232: 시스템 테이블230: Disk 232: System Table
234: 사용자 테이블234: user table
Claims (17)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2003-0087748A KR100507782B1 (en) | 2003-12-04 | 2003-12-04 | Database management system and the method of controlling consistency of system table in DBMS |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2003-0087748A KR100507782B1 (en) | 2003-12-04 | 2003-12-04 | Database management system and the method of controlling consistency of system table in DBMS |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| KR20050054380A true KR20050054380A (en) | 2005-06-10 |
| KR100507782B1 KR100507782B1 (en) | 2005-08-17 |
Family
ID=37249720
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR10-2003-0087748A Expired - Fee Related KR100507782B1 (en) | 2003-12-04 | 2003-12-04 | Database management system and the method of controlling consistency of system table in DBMS |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR100507782B1 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008157091A1 (en) * | 2007-06-20 | 2008-12-24 | Microsoft Corporation | Exception ordering in contention management to support speculative sequential semantics |
| US8010550B2 (en) | 2006-11-17 | 2011-08-30 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8024714B2 (en) | 2006-11-17 | 2011-09-20 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100951099B1 (en) | 2008-07-24 | 2010-04-07 | 인하대학교 산학협력단 | Method of managing data storage and recording medium having recorded thereon a program for performing the method |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR19990032182A (en) * | 1997-10-16 | 1999-05-06 | 정선종 | Buffer management device for variable length files and its method |
| KR100243113B1 (en) * | 1997-11-06 | 2000-02-01 | 정선종 | How to ensure atomicity of esquel-level update operations in database management systems |
-
2003
- 2003-12-04 KR KR10-2003-0087748A patent/KR100507782B1/en not_active Expired - Fee Related
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7860847B2 (en) | 2006-11-17 | 2010-12-28 | Microsoft Corporation | Exception ordering in contention management to support speculative sequential semantics |
| US8010550B2 (en) | 2006-11-17 | 2011-08-30 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8024714B2 (en) | 2006-11-17 | 2011-09-20 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8402447B2 (en) | 2006-11-17 | 2013-03-19 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| WO2008157091A1 (en) * | 2007-06-20 | 2008-12-24 | Microsoft Corporation | Exception ordering in contention management to support speculative sequential semantics |
Also Published As
| Publication number | Publication date |
|---|---|
| KR100507782B1 (en) | 2005-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9262458B2 (en) | Method and system for dynamically partitioning very large database indices on write-once tables | |
| US7577658B2 (en) | Hierarchical locking in B-tree indexes | |
| US6321235B1 (en) | Global caching and sharing of SQL statements in a heterogeneous application environment | |
| US6792432B1 (en) | Database system with methods providing high-concurrency access in B-Tree structures | |
| US6144983A (en) | Method and apparatus for dynamic lock granularity escalation and de-escalation in a computer system | |
| US6449607B1 (en) | Disk storage with modifiable data management function | |
| US20160267132A1 (en) | Abstraction layer between a database query engine and a distributed file system | |
| US20050033720A1 (en) | Database management system with efficient version control | |
| US20120059808A1 (en) | Accessing data entities | |
| US9922086B1 (en) | Consistent query of local indexes | |
| CN112131200B (en) | Cifs sharing-based distributed mass file query system and method | |
| US20130290636A1 (en) | Managing memory | |
| CN112867999A (en) | Version-based table locking | |
| US6484172B1 (en) | Concurrency control method for high-dimensional index structure using latch and lock | |
| US20060161539A1 (en) | Method and system of database management with shared area | |
| US6571250B1 (en) | Method and system for processing queries in a data processing system using index | |
| KR100507782B1 (en) | Database management system and the method of controlling consistency of system table in DBMS | |
| US7412465B2 (en) | Method for append mode insertion of rows into tables in database management systems | |
| US12253974B2 (en) | Metadata processing method and apparatus, and a computer-readable storage medium | |
| KR20030047996A (en) | Method, system and data structures for implementing nested databases | |
| AU2001272863A1 (en) | Method, system and data structures for implementing nested databases | |
| KR100349667B1 (en) | A concurrency control method for high-dimensional index structures | |
| US12386861B2 (en) | Method and system for efficient data management in distributed database system | |
| CN120196288B (en) | Data storage method, system, electronic device and storage medium | |
| CA2249066C (en) | Sharing of dynamic sql statements in a heterogeneous application environment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A201 | Request for examination | ||
| PA0109 | Patent application |
St.27 status event code: A-0-1-A10-A12-nap-PA0109 |
|
| PA0201 | Request for examination |
St.27 status event code: A-1-2-D10-D11-exm-PA0201 |
|
| D13-X000 | Search requested |
St.27 status event code: A-1-2-D10-D13-srh-X000 |
|
| PG1501 | Laying open of application |
St.27 status event code: A-1-1-Q10-Q12-nap-PG1501 |
|
| D14-X000 | Search report completed |
St.27 status event code: A-1-2-D10-D14-srh-X000 |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
St.27 status event code: A-1-2-D10-D22-exm-PE0701 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
St.27 status event code: A-2-4-F10-F11-exm-PR0701 |
|
| PR1002 | Payment of registration fee |
St.27 status event code: A-2-2-U10-U11-oth-PR1002 Fee payment year number: 1 |
|
| PG1601 | Publication of registration |
St.27 status event code: A-4-4-Q10-Q13-nap-PG1601 |
|
| PR1001 | Payment of annual fee |
St.27 status event code: A-4-4-U10-U11-oth-PR1001 Fee payment year number: 4 |
|
| FPAY | Annual fee payment |
Payment date: 20090727 Year of fee payment: 5 |
|
| PR1001 | Payment of annual fee |
St.27 status event code: A-4-4-U10-U11-oth-PR1001 Fee payment year number: 5 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-5-5-R10-R13-asn-PN2301 St.27 status event code: A-5-5-R10-R11-asn-PN2301 |
|
| LAPS | Lapse due to unpaid annual fee | ||
| PC1903 | Unpaid annual fee |
St.27 status event code: A-4-4-U10-U13-oth-PC1903 Not in force date: 20100804 Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE |
|
| PC1903 | Unpaid annual fee |
St.27 status event code: N-4-6-H10-H13-oth-PC1903 Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE Not in force date: 20100804 |
|
| PN2301 | Change of applicant |
St.27 status event code: A-5-5-R10-R13-asn-PN2301 St.27 status event code: A-5-5-R10-R11-asn-PN2301 |
|
| P22-X000 | Classification modified |
St.27 status event code: A-4-4-P10-P22-nap-X000 |