WO2018216839A1 - Database replication method and database replication system - Google Patents

Database replication method and database replication system Download PDF

Info

Publication number
WO2018216839A1
WO2018216839A1 PCT/KR2017/005573 KR2017005573W WO2018216839A1 WO 2018216839 A1 WO2018216839 A1 WO 2018216839A1 KR 2017005573 W KR2017005573 W KR 2017005573W WO 2018216839 A1 WO2018216839 A1 WO 2018216839A1
Authority
WO
WIPO (PCT)
Prior art keywords
slot
query
processed
database
distributor
Prior art date
Application number
PCT/KR2017/005573
Other languages
French (fr)
Korean (ko)
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 CN201780084899.1A priority Critical patent/CN110300964B/en
Publication of WO2018216839A1 publication Critical patent/WO2018216839A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1865Transactional file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present invention relates to a database redundancy method and a database redundancy system, and more particularly, to a database redundancy method and a database redundancy system capable of guaranteeing data integrity while processing transactions in parallel and processing transactions in parallel. .
  • a database is a set of logically related data that is recorded on a computer. Logical relationships between data elements allow you to edit, remove, or modify specific information from the database based on the content of the query.
  • the database can be used to ensure that the edited data is error free, and that new data can be inserted, deleted, or updated. It also allows multiple users to access their data at the same time.
  • It includes a reflector reflecting the front slot and the back slot in a second database.
  • the database duplication method and the database duplication system according to the present invention can increase the transaction speed of data, so that a transaction bottleneck does not occur in a remote server.
  • the present invention guarantees data integrity to remote servers and enables parallel processing of data.
  • FIG. 2 is a table illustrating a slot ID and a transaction ID extracted from the query received by the duplication equipment of FIG. 1.
  • FIG. 3 is a conceptual diagram conceptually illustrating operations of a main distributor and a partial distributor of the database redundancy system of FIG. 1.
  • FIG. 4 is a relation in which a query is processed by the operations of the main distributor and the partial distributor of FIG. 3.
  • FIG. 5 is a flowchart illustrating an operation process of a main distributor of the database replication system of FIG. 1.
  • FIG. 6 is a flowchart illustrating an operation process of a partial distributor of the database replication system of FIG. 1.
  • FIG. 7 is a flowchart illustrating a process of recovering reflectors of the database replication system of FIG. 1.
  • 9 is a view showing the time spent performing transactions of the prior art and database replication system.
  • FIG. 1 is a block diagram of a database redundancy system according to an embodiment of the present invention.
  • the main distributor 202 of the duplication equipment 20 receives a slot ID, a transaction, in a query transmitted from a transmitter of the main equipment 10.
  • a slot S having an ID (Transaction ID) is formed.
  • the primary key (PK: Primary Key) among the formed slots are the same, but the first slot (FS, see FIG. 3) to be processed in the prior order is to be processed in the main distributor 202, the back slot (PS) is processed in the subsequent order , See FIG. 3) to be processed in partial distributor 203.
  • the database redundancy system 1 simultaneously processes a plurality of front slots FS having different primary keys in the main distributor 202, and then simultaneously processes a plurality of back slots PS in the partial distributor 203.
  • the slot is quickly reflected in the second database 205.
  • the database redundancy system 1 may preprocess the redundant data to separate the processing process and thereby duplicate the data without a bottleneck.
  • the database redundancy system 1 includes a detector 102 for detecting a query to be processed in a relation stored in a first database, a transmitter 103 for transmitting a query, and a receiver for receiving a query transmitted from the transmitter 103 ( 201), in the query received from the receiver 201, a slot S having a slot ID and a transaction ID is formed, and among the slots formed, the primary key is the same,
  • the pre-slot FS to be processed is queued, and the post-slot PS to be processed in the subordinate order is the main distributor 202 and the pre-slot FS and the back slot PS to be transmitted to the partial distributor 203 in the second database.
  • a reflector 204 reflecting in 205 is the detector 102 for detecting a query to be processed in a relation stored in a first database, a transmitter 103 for transmitting a query, and a receiver for receiving a query transmitted from the transmitter 103 ( 201), in the query received from the receiver 201, a slot S having a slot
  • the first database 101 may be installed in the main equipment 10 which is a database management system
  • the second database 205 may be installed in the duplication equipment 20 which is a database management system.
  • the database management system can generate and manipulate information according to queries between the user and the database.
  • the detector 102 detects a query to be processed in a relation stored in the first database 101 included in the main device 10. That is, the detector 102 detects the redundant data.
  • the detector 102 may be formed as a query processor.
  • the detector 102 may transmit the detected query to the transmitter 103 included in the main device 10.
  • the main distributor 202 determines what data is to be reflected in the duplication equipment 20 and distributes it to the reflector 204.
  • the main distributor 202 may be included in the duplication equipment 20 and may extract at least one slot S having a slot ID and a transaction ID from a query received from the receiver 201. have.
  • the main distributor 202 proceeds with one commit query after one order query, and generates a slot having one transaction ID.
  • the generated slot may be locked to prevent other transactions from accessing data used by one transaction.
  • the main distributor 202 forms a slot with a slot ID equal to the previously formed slot ID of a slot for which a query including a content for changing previously processed contents is formed. That is, the main distributor 202 may form a back slot for changing a query processed before the same primary key.
  • the main distributor 202 waits for the preslot including the previously processed query and transmits the postslot including the post processed query to the partial distributor 203. That is, the main distributor 202 creates a slot having a slot ID and a transaction ID in the received query, and then waits for some slots and passes the remaining slots to the partial distributor 203.
  • the slot refers to a space capable of storing one record.
  • a slot may include a primary key, a transaction ID, and find a slot having the same primary key and change the content of the relation.
  • the main distributor 202 and the sub-distributor 203 prevent transactions with different IDs from simultaneously processing records when transactions with different transaction IDs want to modify a relation with the same primary key.
  • the main distributor 202 and the partial distributor 203 can process the transaction and ensure independence of the transaction.
  • the operation of the main distributor 202 and the partial distributor 203 will be described in detail later.
  • the reflector 204 serves to reflect the record stored in the slot to the second database 205. That is, the reflector 204 reflects the front slot FS and the rear slot PS in the second database 205. In response to the number of such reflectors 204, a transaction can be processed simultaneously. For example, if the number of reflectors is four, four transactions can be processed simultaneously.
  • FIG. 2 is a table illustrating a slot ID and a transaction ID extracted from a query received by the duplication equipment of FIG. 1
  • FIG. 3 is a conceptual diagram conceptually illustrating operations of a main distributor and a partial distributor of the database replication system of FIG. 1.
  • FIG. 4 is a relation in which a query is processed by the operations of the main distributor and the partial distributor of FIG. 3.
  • the main distributor 202 may determine the slot ID as shown in (b) of FIG. 2 in the received query. Extract the transaction ID. For example, as shown in FIG. 2 (b), the main distributor 202 executes a query for 'inserting a new record having a column value of AA' in the first query and a transaction in the second query. Commit. ', The transaction ID and the slot ID are extracted as 1 for the first query and the second query.
  • the transaction is executed for the third and fourth queries. Extract the ID and slot ID values as 2.
  • the fifth query receives the query 'Change the second column of the record whose column is AA to BB' and the query 'Commit the transaction' to the sixth query
  • the fifth query and For the sixth query the transaction ID value is extracted as 3
  • the slot ID value is extracted as 1.
  • the query 'insert a record whose column is the value CC' in the seventh query and the query 'commit the transaction' are made in the eighth query
  • the value of the transaction ID for the seventh and eighth queries is received. Is extracted as 4, and the value of the slot ID is extracted as 3.
  • the ninth query is received.
  • the transaction ID value is extracted as 5
  • the slot ID value is extracted as 3.
  • the transaction is executed for the 11th and 12th queries.
  • the ID value is extracted as 6 and the slot ID value is extracted as 4.
  • the main distributor 202 may extract one transaction ID and one slot ID in two queries.
  • the ID formed in the slot is formed to have the same value as the ID formed in the slot when the content processed by the slot is associated with the previously processed content.
  • the main distributor 202 has the same primary key (PK) among the slots from which the transaction ID and the slot ID are extracted, but waits for the preslot FS processed in the prior order and processes the back slot PS processed in the subordinate order. ) Is transmitted to the partial distributor 203.
  • PK primary key
  • the main distributor 202 transmits the slots that can be immediately distributed to the reflector 204 to the reflector 204 and otherwise transmits the slots to be processed to the partial distributor 203.
  • the partial distributor 203 transmits the rear slot PS having the same basic key as the primary key of the previous slot to the reflector 204 which processed the front slot FS so that the partial slot 203 can be processed. At this time, the partial distributor 203 waits while the slots passed from the main distributor 202 to the reflector 204 are fully reflected in the relation, and when completed, the partial distributor 203 simultaneously passes the rear slot PS to the reflector 204. It can be processed at the same time.
  • the main distributor 202 and the partial distributor 203 pass the slot from which the transaction ID and the slot ID are extracted to the reflector 204 to be processed, and as shown in FIG. 4 in the second database 205.
  • the AA in the ⁇ column, the second column with the primary key of 1, is changed to BB, and the relation in which the CC, the second column with the 4 is changed to DD, is reflected.
  • the database duplication method detects a query to be processed in the first database 101 of the main device, and starts step (A) of transmitting the query to a receiver of the duplication device including the second database 205.
  • step (B) of extracting a slot having a primary key and a transaction ID having a primary key to be applied to the record of the relation stored in the first database is performed from the query.
  • step (C) of locking the slot is performed.
  • the primary key is the same among the slots, but the previous slot (FS) processed in the prior order is waited at the main distributor, and the subsequent slot processed in the next priority is transferred to the partial distributor (D).
  • step (E) of assigning the front slot FS and the rear slot PS to the reflector 204 is performed. Subsequently, the main reference count is increased to the reflector 204 to which the previous slot FS is assigned, and the sub reference count to the reflector 204 to which the rear slot PS is assigned. Proceed to step (F) to increase.
  • step (G) of releasing the lock of the previous slot and the lock of the next slot is performed.
  • the database duplication method proceeds from the steps (A) to (G) in a series of steps, and can speed up the transaction of the query, so that the bottleneck of the transaction does not occur on the remote server.
  • the operation of the main distributor 202 is operated based on the flowchart of FIG. 5, and the operation of the partial distributor 203 is operated based on the flowchart of FIG. 6.
  • FIG. 5 is a flowchart illustrating an operation process of a main distributor of the database replication system of FIG. 1
  • FIG. 6 is a flowchart illustrating an operation process of a partial distributor of the database replication system of FIG. 1.
  • the main distributor 202 extracts the slot ID and the transaction ID from the received query (S110).
  • the query may include specific information so that the main distributor 202 may extract the transaction ID and the slot ID.
  • the main distributor 202 proceeds with the step of locking the slot for controlling the extracted slot concurrency (S120).
  • the lock is applied to the slot after waiting for a predetermined time (S121).
  • the primary key is the same, but the previous slot (FS) processed in the previous rank is waited, and the primary slot is the same, but the subsequent slot PS processed in the downstream rank is transmitted to the partial distributor 203.
  • the main distributor 202 determines whether there is an appropriate reflector 204 with the slot ID and the transaction ID set in all slots FS (S140). In this case, when the former slot FS is not in use, the reflector 204 information is stored in the former slot FS (S141). Thereafter, the reflector 204 compares the transaction ID set in the query with the transaction ID extracted from the main distributor to determine whether they are the same (S150). At this time, if the reflector is the same because the transaction ID set in the query and the extracted transaction ID are the same, the main reference count is increased. On the other hand, if the reflector 204 is different, the Sub Referebce Count is increased.
  • the reflector 204 information is stored in the rear slot PS (S172).
  • the back slot (PS) is reflected in the reflector 204, it is determined by comparing the transaction ID set in the query and the transaction ID of the back slot (S181). At this time, if the transaction ID set in the query and the transaction ID of the backseat are different, the lock is released and then waited and retried.
  • the partial dispatcher 203 passes the reflector to process the transaction when the waiting transaction becomes available.
  • FIG. 7 is a flowchart illustrating a process of recovering the reflector of the database redundancy system of FIG. 1
  • FIG. 8 is a flowchart schematically illustrating a point at which an operation process of the main distributor of FIG. 4 and a process of recovering the reflector of FIG. 6 are combined.
  • the transaction commit is completed (S210). Thereafter, a process of obtaining all slot information used by the current transaction with reference to the distributor's memory and the like (S220). Next, a step of locking the extracted slot is performed (S230).
  • the lock is applied to the slot after waiting for a predetermined time (S231).
  • the main reference count and the sub reference count is reduced (S240). At this time, the main reference count and the subreference count are reduced by the number of queries executed in the transaction.
  • one transaction ID includes one order query
  • the number of main reference counts and subreference counts of 1 is reduced by one.
  • the method determines whether the main reference count and the sub reference count are 0 (S250). In this case, if each reference count is 0, the process of deleting reflector information of the corresponding slot (S260) and unlocking the slot (S270) are sequentially performed.
  • each reference count is not 0, the step of unlocking the slot is immediately performed. After that, check whether there are any more queries to process.
  • the reflector information may be reassigned in step S140 of FIG. 5 and the query may be continuously performed. Again, with reference to FIG. 7, it is then checked whether the processing is completed for the slot of the query included in the current transaction.
  • This method is repeated to retrieve all the reflectors allocated in the slot and to allow new transactions to access each slot.
  • 9 is a view showing the time spent performing transactions of the prior art and database replication system.
  • the method of waiting for processing the previous transaction uses one reflector even though the records to be processed are different. Thus, after one transaction is processed, the remaining transactions are processed, so it takes a long time to complete the entire transaction.
  • the database duplication method of the present invention can significantly reduce the time spent in duplication of the entire database when there are a lot of transactions and a large number of transactions being executed at the same time by generating a large number of reflectors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a data replication method and a database replication system, wherein the data replication method of the present invention comprises: a step (A) of detecting a query to be processed among first databases of a main device so as to transmit the query to a receiver of a replication device including a second database; a step (B) of extracting, from the query, a slot having a transaction ID and a slot ID having a primary key to be applied to a record of a relation stored in the first database; a step (C) of locking the slot; a step (D) of putting a pre-slot, which has the same primary key in the slot and is processed at a higher priority, on standby at a main distributor and transmitting a post-slot, which has the same primary key and is processed at a lower priority, to a sub distributor; a step (E) of allocating the pre-slot and the post-slot to an applier; a step (F) of increasing a main reference count to an applier to which the pre-slot is allocated and increasing a sub reference count to an applier to which the post-slot is allocated; and a step (G) of releasing the lock of the pre-slot and the lock of the post-slot. In addition, the database replication system of the present invention comprises: a detector for detecting a query to be processed in one relation stored in the first database; a transmitter for transmitting the query; a receiver for receiving the query transmitted by the transmitter; a main distributor for forming a slot having a slot ID and a transaction ID in the query received by the receiver, putting a pre-slot, which has the same primary key in the formed slot and is processed at a higher priority, on standby and transmitting a post-slot, to be processed at a lower priority, to a sub distributor; and an applier for applying the pre-slot and the post-slot to a second database.

Description

데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템Database Redundancy Method and Database Redundancy System
본 발명은 데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템에 관한 것으로서, 더욱 상세하게는 데이터베이스 이중화장비에 트랜잭션을 병렬로 처리하며 트랜잭션을 신속히 처리하면서도 데이터 무결성을 보증할 수 있는 데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템에 관한 것이다.The present invention relates to a database redundancy method and a database redundancy system, and more particularly, to a database redundancy method and a database redundancy system capable of guaranteeing data integrity while processing transactions in parallel and processing transactions in parallel. .
데이터베이스는 컴퓨터에 기록된 데이터들이 논리적이 관계로 연계된 집합을 의미한다. 데이터 요소들 간의 논리적 관계는 질의 된 내용을 기반으로 데이터베이스로부터 특정 정보를 수정, 제거, 변경 등의 편집할 수 있도록 한다.A database is a set of logically related data that is recorded on a computer. Logical relationships between data elements allow you to edit, remove, or modify specific information from the database based on the content of the query.
데이터베이스는 편집된 데이터에 오류가 없도록 하며, 새로운 데이터의 삽입, 삭제, 갱신할 수 있도록 할 수 있다. 또한, 여러 사용자가 동시에 자기가 원하는 데이터를 이용할 수 있도록 한다.The database can be used to ensure that the edited data is error free, and that new data can be inserted, deleted, or updated. It also allows multiple users to access their data at the same time.
데이터베이스에 저장되는 많은 데이터들은 여러 질의 내용을 통해 데이터의 무결성을 보증하며 트랜잭션 되고 있다.Many data stored in the database are transacted by guaranteeing the integrity of the data through various queries.
이러한 방식의 데이터 처리는 사회의 산업 전반에 있어, 업무를 처리하는 많이 사용되고 있다. 특히, 데이터를 신속하고 정확하게 수정 및 생성해야하는 분야에서 중요하게 여겨지고 있다.This type of data processing is widely used to handle tasks throughout the industry of society. In particular, it is considered important in the field of modifying and generating data quickly and accurately.
현재, 데이터 처리의 안정성을 높이기 위해, 물리적으로 떨어져 있는 여러 데이터베이스에 대하여 메인 데이터베이스에 저장되는 데이터를 백업 데이터베이스에 동기화 시키는 과정이 활발히 개발되고 있다. 즉, 데이터의 이중화 기술이 많이 개발되고 있다.Currently, in order to increase the stability of data processing, a process of synchronizing data stored in the main database with a backup database for several physically separated databases is actively developed. That is, a lot of data duplication techniques have been developed.
중요 데이터를 트랜잭션하는 은행 및 한국 거래소 등은 컴퓨터의 오류 및 바이러스 침입에 의한 사고 등에 대비하기 위해 데이터 이중화 기술을 많이 이용하고 있다.Banks and Korean exchanges that transact important data use data duplication technology to prepare for computer errors and accidents caused by virus intrusions.
금융권에서 데이터 이중화 방식의 사용이 점차 늘어남에 따라, 이중화 방식의 데이터 처리의 안전성을 높이는 방법 및 시스템에 대한 연구가 활발히 진행되고 있다. 일례로, 대한민국 등록특허 제10-1605455가 있다.As the use of data duplication in the financial sector is increasing, researches on methods and systems for enhancing the safety of duplication-based data processing are being actively conducted. As an example, there is Republic of Korea Patent No. 10-1605455.
그러나, 전술한 등록특허를 비롯해 개발된 대다수의 기술은 처리되는 데이터의 손실을 방지하는 기술일 뿐, 데이터의 무결성 및 데이터의 처리 속도를 향상시키는 방안은 제시하지 못하고 있는 실정이다.However, many of the technologies developed, including the aforementioned patents, are only technologies for preventing the loss of data to be processed, and there is no way to improve the integrity of data and the processing speed of data.
본 발명이 이루고자 하는 기술적 과제는 이러한 문제점을 해결하기 위한 것으로서, 트랜잭션의 처리 속도를 향상시키고 데이터 무결성을 보증할 수 있는 데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템을 제공하는 것이다.SUMMARY OF THE INVENTION The present invention has been made in an effort to solve such a problem, and to provide a database redundancy method and a database redundancy system capable of improving a transaction processing speed and ensuring data integrity.
본 발명의 기술적 과제는 이상에서 언급한 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The technical problem of the present invention is not limited to the above-mentioned problems, and other technical problems not mentioned will be clearly understood by those skilled in the art from the following description.
상기 기술적 과제를 달성하기 위한 본 발명의 데이터베이스 이중화 방법은 메인장비의 제1데이터베이스 가운데 처리될 쿼리(Query)를 감지하여, 상기 쿼리를 제2데이터베이스를 포함하는 이중화장비의 수신기에 전송하는 (A)단계;The database duplication method of the present invention for achieving the technical problem is to detect a query (Query) to be processed among the first database of the main equipment, and transmits the query to the receiver of the duplication equipment including a second database (A) step;
상기 쿼리로부터 상기 제1데이터베이스에 저장된 릴레이션의 레코드에 적용될 기본키(Primary Key)를 갖는 슬롯 ID와 트랜잭션 ID(Transaction ID)를 갖는 슬롯을 추출하는 (B)단계;(B) extracting, from the query, a slot having a primary key and a transaction ID having a primary key to be applied to a record of the relation stored in the first database;
상기 슬롯을 락(Lock)하는 (C)단계;(C) locking the slot;
상기 슬롯 가운데 기본키(Primary Key)가 동일하되 전순위에 처리되는 전슬롯은 주분배자에서 대기시키고, 상기 기본키가 동일하되 후순위에 처리되는 후슬롯은 부분배자로 전송하는 (D)단계;(D) transmitting a primary slot having the same primary key among the slots but processing the previous slots in the main distributor, and transmitting the subsequent slots having the same primary key but the lower slots to the partial distributors;
상기 전슬롯과 상기 후슬롯을 반영자에 할당하는 (E)단계;Assigning the preslot and the postslot to a reflector (E);
상기 전슬롯이 할당된 상기 반영자로 메인래퍼런스 카운트(Main Reference Count)를 증가시키고, 상기 후슬롯이 할당된 상기 반영자로 서브래퍼런스 카운트(Sub Reference Count)를 증가시키는 (F)단계; 및(F) increasing a main reference count to the reflector to which the previous slot is assigned, and increasing a sub reference count to the reflector to which the rear slot is assigned; And
상기 전슬롯의 락과 상기 후슬롯의 락을 해지하는 (G)단계를 포함한다.(G) releasing the lock of the previous slot and the lock of the rear slot.
상기 주분배자는 상기 전슬롯을 상기 반영자에 각각 전송하여 동시에 수행할 수 있도록 하고, 상기 부분배자는 상기 전슬롯이 처리되면, 상기 후슬롯을 동시에 처리할 수 있도록 한다.The main distributor transmits the previous slots to the reflector, respectively, so that the main distributors can simultaneously perform the previous slots, and when the previous slots are processed, the main distributors can simultaneously process the rear slots.
상기 부분배자는 처리된 상기 전슬롯과 기본키가 동일한 상기 후슬롯을 상기 전슬롯을 처리한 상기 반영자에 전송할 수 있다.The partial distributor may transmit the rear slot having the same primary key as the processed front slot to the reflector that has processed the front slot.
상기 주분배자는 추출된 슬롯이 락이 되지 않을 경우, 상기 슬롯이 락이 될 때까지 대기할 수 있다.When the extracted slot is not locked, the main distributor may wait until the slot is locked.
제1데이터베이스에 저장된 하나의 릴레이션에 처리될 쿼리를 감지하는 감지기;A detector for detecting a query to be processed in one relation stored in the first database;
상기 쿼리를 전송하는 송신기;A transmitter for transmitting the query;
상기 송신기에서 전송되는 상기 쿼리를 수신하는 수신기;A receiver for receiving the query transmitted from the transmitter;
상기 수신기에서 수신된 상기 쿼리에서 슬롯 ID(Slot ID), 트랜잭션 ID(Transaction ID)를 갖는 슬롯을 형성하고, 형성된 상기 슬롯 가운데 기본키(Primary Key)가 동일하되 전순위에 처리되는 전슬롯은 대기시키고, 후순위에 처리될 후슬롯은 부분배자로 전송하는 주분배자; 및In the query received from the receiver, a slot having a slot ID and a transaction ID is formed, and among all the slots formed, the primary key is the same but all slots processed in the previous order are waiting. A main distributor which transmits the subslot to the partial distributor; And
상기 전슬롯과 상기 후슬롯을 제2데이터베이스에 반영하는 반영자를 포함한다.It includes a reflector reflecting the front slot and the back slot in a second database.
상기 주분배자는 주문 쿼리가 진행된 후, 커밋(commit)쿼리를 진행하며 하나의 트랜잭션 ID를 갖는 슬롯을 생성하도록 할 수 있다.The main distributor may perform a commit query after the order query is performed and generate a slot having one transaction ID.
상기 부분배자는 상기 전슬롯이 처리되면, 상기 후슬롯을 동시에 처리할 수 있다.The partial distributor may process the rear slot at the same time when the front slot is processed.
상기 부분배자는 상기 전슬롯의 기본키와 동일한 기본키를 갖는 상기 후슬롯을 상기 전슬롯을 처리한 상기 반영자에 전송할 수 있다.The partial distributor may transmit the rear slot having the same basic key as the primary key of the previous slot to the reflector which processed the previous slot.
본 발명에 따른 데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템은 데이터의 트랜잭션(Transaction)속도를 높여, 원격지 서버에 트랜잭션 병목현상이 발생되지 않도록 할 수 있다.The database duplication method and the database duplication system according to the present invention can increase the transaction speed of data, so that a transaction bottleneck does not occur in a remote server.
또한, 본 발명은 원격지 서버에 데이터 무결성을 보증하며 데이터를 병렬 처리할 수 있도록 한다.In addition, the present invention guarantees data integrity to remote servers and enables parallel processing of data.
도 1은 본 발명의 일 실시예에 의한 데이터베이스 이중화 시스템의 블록도이다.1 is a block diagram of a database redundancy system according to an embodiment of the present invention.
도 2는 도 1의 이중화장비가 수신된 쿼리로부터 슬롯ID 및 트랜잭션 ID를 추출하여 나타낸 표이다.FIG. 2 is a table illustrating a slot ID and a transaction ID extracted from the query received by the duplication equipment of FIG. 1.
도 3은 도 1의 데이터베이스 이중화 시스템의 주분배자와 부분배자의 동작을 개념적으로 도식한 개념도이다.3 is a conceptual diagram conceptually illustrating operations of a main distributor and a partial distributor of the database redundancy system of FIG. 1.
도 4는 도 3의 주분배자와 부분배자의 동작에 의해 쿼리가 처리되며 나타난 릴레이션이다.FIG. 4 is a relation in which a query is processed by the operations of the main distributor and the partial distributor of FIG. 3.
도 5는 도 1의 데이터베이스 이중화 시스템의 주분배자의 동작과정을 나타낸 순서도이다.5 is a flowchart illustrating an operation process of a main distributor of the database replication system of FIG. 1.
도 6은 도 1의 데이터베이스 이중화 시스템의 부분배자의 동작과정을 나타낸 순서도이다.FIG. 6 is a flowchart illustrating an operation process of a partial distributor of the database replication system of FIG. 1.
도 7은 도 1의 데이터베이스 이중화 시스템의 반영자를 회수하는 과정을 나타낸 순서도이다.FIG. 7 is a flowchart illustrating a process of recovering reflectors of the database replication system of FIG. 1.
도 8은 도 4의 주분배자의 작동 과정과 도 6의 반영자의 회수 과정이 결합되는 지점을 개략적으로 나타낸 순서도이다.8 is a flowchart schematically illustrating a point at which an operation process of the main distributor of FIG. 4 and a recovery process of the reflector of FIG. 6 are combined.
도 9는 종래기술과 데이터베이스 이중화 시스템의 트랜잭션 수행에 소비되는 시간을 나타낸 도면이다.9 is a view showing the time spent performing transactions of the prior art and database replication system.
본 발명의 이점 및 특징 그리고 그것들을 달성하기 위한 방법들은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다.Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various forms, and only the present embodiments make the disclosure of the present invention complete and the general knowledge in the technical field to which the present invention belongs. It is provided to fully inform those who have the scope of the invention.
본 발명은 청구범위는 청구항을 비롯해 청구항을 뒷받침하는 설명에 의해 정의될 수 있다. 아울러, 명세서 전체에 걸쳐 동일 참조부호는 동일 구성요소를 지칭한다.The invention may be defined by the claims, including the claims, and the description supporting the claims. In addition, the same reference numerals throughout the specification refer to the same components.
이하, 도 1 내지 도 9를 참조하여 본 발명의 일 실시예에 의한 데이터베이스 이중화 방법 및 데이터베이스 이중화 시스템에 대해 상세히 설명한다.Hereinafter, a database duplication method and a database duplication system according to an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 9.
다만, 설명이 간결하고 명확해 질 수 있도록 도 1 내지 4를 참조하여 데이터베이스 이중화 시스템에 대해 상세히 설명한 후, 이를 바탕으로 도 5 내지 도 9를 참조해 데이터베이스 이중화 방법에 대해 설명하도록 한다.However, after the database replication system is described in detail with reference to FIGS. 1 to 4 so that the description can be simplified and clear, the database replication method will be described with reference to FIGS. 5 to 9.
먼저, 도 1을 참조하여 본 발명의 일 실시예에 따른 데이터베이스 이중화 시스템(1)에 대해 설명한다.First, a database redundancy system 1 according to an embodiment of the present invention will be described with reference to FIG. 1.
도 1은 본 발명의 일 실시예에 의한 데이터베이스 이중화 시스템의 블록도이다.1 is a block diagram of a database redundancy system according to an embodiment of the present invention.
본 발명의 일 실시예에 따른 데이터베이스 이중화 시스템(1)은 이중화장비(20)의 주분배자(202)가 메인장비(10)의 송신기에서 전송된 쿼리(Query)에서 슬롯 ID(Slot ID), 트랜잭션 ID(Transaction ID)를 갖는 슬롯(S)을 형성한다. 그리고, 형성된 슬롯 가운데 기본키(P.K: Primary Key)가 동일하되, 전순위에 처리되는 전슬롯(FS, 도 3참조)은 주분배자(202)에서 처리되도록 하고, 후순위에 처리되는 후슬롯(PS, 도 3참조)은 부분배자(203)에서 처리되도록 한다.In the database redundancy system 1 according to an embodiment of the present invention, the main distributor 202 of the duplication equipment 20 receives a slot ID, a transaction, in a query transmitted from a transmitter of the main equipment 10. A slot S having an ID (Transaction ID) is formed. And, the primary key (PK: Primary Key) among the formed slots are the same, but the first slot (FS, see FIG. 3) to be processed in the prior order is to be processed in the main distributor 202, the back slot (PS) is processed in the subsequent order , See FIG. 3) to be processed in partial distributor 203.
이때, 데이터베이스 이중화 시스템(1)은 주분배자(202)에서 기본키가 상이한 복수 개의 전슬롯(FS)을 동시에 처리한 후, 부분배자(203)에서 복수 개의 후슬롯(PS)을 동시에 처리하며 모든 슬롯을 제2데이터베이스(205)에 신속히 반영한다.In this case, the database redundancy system 1 simultaneously processes a plurality of front slots FS having different primary keys in the main distributor 202, and then simultaneously processes a plurality of back slots PS in the partial distributor 203. The slot is quickly reflected in the second database 205.
즉, 데이터베이스 이중화 시스템(1)은 이중화 데이터를 전처리하여 처리 과정을 분리시켜 병목현상 없이 데이터를 이중화시킬 수 있다.That is, the database redundancy system 1 may preprocess the redundant data to separate the processing process and thereby duplicate the data without a bottleneck.
이러한 데이터베이스 이중화 시스템(1)은 제1데이터베이스에 저장된 하나의 릴레이션에 처리될 쿼리를 감지하는 감지기(102), 쿼리를 전송하는 송신기(103), 송신기(103)에서 전송되는 쿼리를 수신하는 수신기(201), 수신기(201)에서 수신된 쿼리에서 슬롯 ID(Slot ID), 트랜잭션 ID(Transaction ID)를 갖는 슬롯(S)을 형성하고, 형성된 슬롯 가운데 기본키(Primary Key)가 동일하되 전순위에 처리되는 전슬롯(FS)은 대기시키고, 후순위에 처리될 후슬롯(PS)은 부분배자(203)로 전송하는 주분배자(202) 및 전슬롯(FS)과 후슬롯(PS)을 제2데이터베이스(205)에 반영하는 반영자(204)를 포함한다.The database redundancy system 1 includes a detector 102 for detecting a query to be processed in a relation stored in a first database, a transmitter 103 for transmitting a query, and a receiver for receiving a query transmitted from the transmitter 103 ( 201), in the query received from the receiver 201, a slot S having a slot ID and a transaction ID is formed, and among the slots formed, the primary key is the same, The pre-slot FS to be processed is queued, and the post-slot PS to be processed in the subordinate order is the main distributor 202 and the pre-slot FS and the back slot PS to be transmitted to the partial distributor 203 in the second database. And a reflector 204 reflecting in 205.
여기서, 제1데이터베이스(101)는 데이터베이스 관리 시스템인 메인장비(10)에 설치되고, 제2데이터베이스(205)는 데이터베이스 관리 시스템인 이중화장비(20)에 설치될 수 있다. 데이터베이스 관리 시스템은 사용자와 데이터베이스 사이에서 쿼리에 따라 정보를 생성 및 조작할 수 있다.Here, the first database 101 may be installed in the main equipment 10 which is a database management system, and the second database 205 may be installed in the duplication equipment 20 which is a database management system. The database management system can generate and manipulate information according to queries between the user and the database.
이하, 데이터베이스 이중화 시스템(1)을 구성하는 구성요소들에 대해 상세히 설명한다.Hereinafter, the components constituting the database redundancy system 1 will be described in detail.
감지기(102)는 메인장비(10)에 포함된 제1데이터베이스(101)에 저장된 하나의 릴레이션에 처리될 쿼리를 감지한다. 즉, 감지기(102)는 이중화 데이터를 감지한다. 일례로, 감지기(102)는 쿼리 처리기(Query Processor)로 형성될 수 있다.The detector 102 detects a query to be processed in a relation stored in the first database 101 included in the main device 10. That is, the detector 102 detects the redundant data. In one example, the detector 102 may be formed as a query processor.
이러한 감지기(102)는 감지된 쿼리를 메인장비(10)에 포함된 송신기(103)에 전송할 수 있다.The detector 102 may transmit the detected query to the transmitter 103 included in the main device 10.
송신기(103)는 수신된 쿼리를 이중화장비(20)에 포함된 수신기(201)에 전송한다. 수신기(201)는 이중화장비(20)에 포함되어, 송신기(103)에서 송신한 쿼리 즉, 주문 데이터를 수신한다. 이때, 송신기(103)와 수신기(201)는 네트워크로 연결되어 주문 데이터를 원활히 송/수신할 수 있다.The transmitter 103 transmits the received query to the receiver 201 included in the duplication equipment 20. The receiver 201 is included in the duplication equipment 20 and receives a query, that is, order data transmitted from the transmitter 103. In this case, the transmitter 103 and the receiver 201 may be connected to a network to smoothly transmit / receive order data.
주분배자(202)는 이중화장비(20)에 반영되어야 할 데이터가 어떤 것이 있는지 판단하여 반영자(204)에 분배한다. 이러한 주분배자(202)는 이중화장비(20)에 포함되고, 수신기(201)에서 수신된 쿼리에서 슬롯 ID(Slot ID)와 트랜잭션 ID(Transaction ID)를 갖는 슬롯(S)을 적어도 하나 추출할 수 있다.The main distributor 202 determines what data is to be reflected in the duplication equipment 20 and distributes it to the reflector 204. The main distributor 202 may be included in the duplication equipment 20 and may extract at least one slot S having a slot ID and a transaction ID from a query received from the receiver 201. have.
이때, 주분배자(202)는 하나의 주문 쿼리가 진행된 후, 하나의 커밋(commit) 쿼리를 진행하며 하나의 트랜잭션 ID를 갖는 슬롯을 생성한다. 그리고, 생성된 슬롯을 락(lock)하여 하나의 트랜잭션이 사용하는 데이터에 다른 트랜잭션이 접근하지 못하도록 할 수 있다.At this time, the main distributor 202 proceeds with one commit query after one order query, and generates a slot having one transaction ID. The generated slot may be locked to prevent other transactions from accessing data used by one transaction.
또한, 주분배자(202)는 형성된 슬롯 가운데 앞서 처리된 내용을 변경하는 내용을 포함하는 쿼리를 진행하는 슬롯은 앞선 형성된 슬롯 ID와 동일한 슬롯 ID로 슬롯을 형성한다. 즉, 주분배자(202)는 기본키가 동일 앞서 처리되는 쿼리를 변경하는 후슬롯을 형성할 수 있다.In addition, the main distributor 202 forms a slot with a slot ID equal to the previously formed slot ID of a slot for which a query including a content for changing previously processed contents is formed. That is, the main distributor 202 may form a back slot for changing a query processed before the same primary key.
주분배자(202)는 앞서 처리되는 쿼리를 포함하는 전슬롯은 대기시키고, 후처리되는 쿼리를 포함하는 후슬롯은 부분배자(203)로 전송한다. 즉, 주분배자(202)는 수신된 쿼리에서 슬롯 ID와 트랜잭션 ID를 갖는 슬롯을 생성한 후, 일부 슬롯은 대기시키고 나머지 일부 슬롯은 부분배자(203)로 넘긴다.The main distributor 202 waits for the preslot including the previously processed query and transmits the postslot including the post processed query to the partial distributor 203. That is, the main distributor 202 creates a slot having a slot ID and a transaction ID in the received query, and then waits for some slots and passes the remaining slots to the partial distributor 203.
여기서, 슬롯은 1개의 레코드를 저장할 수 있는 공간을 의미한다. 이러한 슬롯은 기본키(Primary Key), 트랜잭션 ID를 포함할 수 있고, 기본키가 동일한 슬롯을 찾아 릴레이션의 내용을 변경할 수 있다.Here, the slot refers to a space capable of storing one record. Such a slot may include a primary key, a transaction ID, and find a slot having the same primary key and change the content of the relation.
주분배자(202)와 부분배자(203)는 서로 다른 트랜잭션 ID를 갖는 트랜잭션이 동일한 기본키를 갖는 릴레이션을 수정하기 원하는 경우, ID가 다른 트랜잭션이 레코드를 동시에 처리하지 못하도록 한다.The main distributor 202 and the sub-distributor 203 prevent transactions with different IDs from simultaneously processing records when transactions with different transaction IDs want to modify a relation with the same primary key.
이와 같이, 주분배자(202)와 부분배자(203)는 트랜잭션을 처리하며 트랜잭션의 독립성을 확보할 수 있다. 이러한 주분배자(202)와 부분배자(203)의 동작에 대해서는 후술하여 구체적으로 설명하도록 한다.As such, the main distributor 202 and the partial distributor 203 can process the transaction and ensure independence of the transaction. The operation of the main distributor 202 and the partial distributor 203 will be described in detail later.
반영자(204)는 슬롯에 저장된 레코드를 제2데이터베이스(205)에 반영하는 역할을 한다. 즉, 반영자(204)는 전슬롯(FS)과 후슬롯(PS)을 제2데이터베이스(205)에 반영한다. 이러한 반영자(204)의 개수에 대응하여 트랜잭션을 동시에 처리할 수 있다. 일례로, 반영자의 개수가 4개인 경우, 4개의 트랜잭션을 동시에 처리할 수 있다.The reflector 204 serves to reflect the record stored in the slot to the second database 205. That is, the reflector 204 reflects the front slot FS and the rear slot PS in the second database 205. In response to the number of such reflectors 204, a transaction can be processed simultaneously. For example, if the number of reflectors is four, four transactions can be processed simultaneously.
이하, 도 2 내지 도 4를 참조하여, 데이터베이스 이중화 시스템이 복수 개의 처리내용을 트랜잭션하는 상태에 대해 설명한다.Hereinafter, a state in which a database duplication system transacts a plurality of processing contents will be described with reference to FIGS. 2 to 4.
도 2는 도 1의 이중화장비가 수신된 쿼리로부터 슬롯ID 및 트랜잭션 ID를 추출하여 나타낸 표이고, 도 3은 도 1의 데이터베이스 이중화 시스템의 주분배자와 부분배자의 동작을 개념적으로 도식한 개념도이고, 도 4는 도 3의 주분배자와 부분배자의 동작에 의해 쿼리가 처리되며 나타난 릴레이션이다.FIG. 2 is a table illustrating a slot ID and a transaction ID extracted from a query received by the duplication equipment of FIG. 1, and FIG. 3 is a conceptual diagram conceptually illustrating operations of a main distributor and a partial distributor of the database replication system of FIG. 1. FIG. 4 is a relation in which a query is processed by the operations of the main distributor and the partial distributor of FIG. 3.
일례로, 도 2의 (a)에 도시된 바와 같이, 12개의 쿼리가 수신기(201)에 수신되면, 주분배자(202)는 수신된 쿼리에서 도 2의 (b)에 도시된 바와 같이 슬롯 ID와 트랜잭션 ID를 추출한다. 일례로, 주분배자(202)는 도 2의 (b)에 도시된 바와 같이, 제1쿼리에‘열(column)의 값이 AA인 새로운 레코드를 삽입’하라는 쿼리와 제2쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제1쿼리와 제2쿼리에 대해서는 트랜잭션 ID와 슬롯 ID의 값을 1로 추출한다.As an example, as shown in (a) of FIG. 2, if twelve queries are received at the receiver 201, the main distributor 202 may determine the slot ID as shown in (b) of FIG. 2 in the received query. Extract the transaction ID. For example, as shown in FIG. 2 (b), the main distributor 202 executes a query for 'inserting a new record having a column value of AA' in the first query and a transaction in the second query. Commit. ', The transaction ID and the slot ID are extracted as 1 for the first query and the second query.
그리고, 제3쿼리에‘열(column)의 값이 BB인 새로운 레코드를 삽입’하라는 쿼리와 제4쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제3쿼리와 제4쿼리에 대해서는 트랜잭션 ID와 슬롯 ID의 값을 2로 추출한다.When the query to insert a new record with the column value BB in the third query and the query to commit the transaction to the fourth query are received, the transaction is executed for the third and fourth queries. Extract the ID and slot ID values as 2.
제5쿼리에‘열(column)이 값이 AA인 레코드의 두 번째 열(column)을 BB로 변경’하라는 쿼리와 제6쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제5쿼리와 제6쿼리에 대해서는 트랜잭션 ID의 값을 3으로 추출하고, 슬롯 ID의 값을 1로 추출한다.When the fifth query receives the query 'Change the second column of the record whose column is AA to BB' and the query 'Commit the transaction' to the sixth query, the fifth query and For the sixth query, the transaction ID value is extracted as 3, and the slot ID value is extracted as 1.
제7쿼리에‘열(column)이 값이 CC인 레코드를 삽입’하라는 쿼리와 제8쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제7쿼리와 제8쿼리에 대해서는 트랜잭션 ID의 값을 4로 추출하고, 슬롯 ID의 값을 3로 추출한다.When the query 'insert a record whose column is the value CC' in the seventh query and the query 'commit the transaction' are made in the eighth query, the value of the transaction ID for the seventh and eighth queries is received. Is extracted as 4, and the value of the slot ID is extracted as 3.
그리고, 제9쿼리에‘열(column)이 값이 CC인 레코드의 두 번째 열(column)을 DD로 변경’하라는 쿼리와 제10쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제9쿼리와 제10쿼리에 대해서는 트랜잭션 ID 값을 5로 추출하고, 슬롯 ID의 값은 3으로 추출한다.In response to a query for changing the second column of the record whose column has the value CC to DD in the ninth query, and receiving the query to commit the transaction in the tenth query, the ninth query is received. For the query and the tenth query, the transaction ID value is extracted as 5, and the slot ID value is extracted as 3.
그리고, 제11쿼리에‘열(column)의 값이 EE인 새로운 레코드를 삽입’하라는 쿼리와 제12쿼리에‘트랜잭션을 커밋한다.’라는 쿼리가 수신되면 제11쿼리와 제12쿼리에 대해서는 트랜잭션 ID값을 6으로 추출하고, 슬롯 ID값을 4로 추출한다.When the query to insert a new record whose column value is EE in the 11th query and the query to commit the transaction to the 12th query are received, the transaction is executed for the 11th and 12th queries. The ID value is extracted as 6 and the slot ID value is extracted as 4.
이러한 방식으로 주분배자(202)는 두 개의 쿼리에 한 개의 트랜잭션 ID 그리고 하나의 슬롯 ID를 추출할 수 있다. 이때, 슬롯에 형성되는 ID은 슬롯이 처리하는 내용이 앞서 처리된 내용과 연관이 있는 경우, 앞서 슬롯에 형성된 ID와 동일한값으로 형성된다.In this manner, the main distributor 202 may extract one transaction ID and one slot ID in two queries. In this case, the ID formed in the slot is formed to have the same value as the ID formed in the slot when the content processed by the slot is associated with the previously processed content.
주분배자(202)는 트랜잭션 ID와 슬롯 ID가 추출된 슬롯 가운데 기본키(P.K: Primary Key)가 동일하되, 전순위에 처리되는 전슬롯(FS)은 대기시키고, 후순위에 처리되는 후슬롯(PS)은 부분배자(203)로 전송한다.The main distributor 202 has the same primary key (PK) among the slots from which the transaction ID and the slot ID are extracted, but waits for the preslot FS processed in the prior order and processes the back slot PS processed in the subordinate order. ) Is transmitted to the partial distributor 203.
즉, 주분배자(202)는 반영자(204)에게 당장 분배할 수 있는 슬롯은 반영자(204)에게 보내고 그렇지 않고 대기 한 후 처리되어야 할 슬롯은 부분배자(203)에 전송하여 처리한다.That is, the main distributor 202 transmits the slots that can be immediately distributed to the reflector 204 to the reflector 204 and otherwise transmits the slots to be processed to the partial distributor 203.
부분배자(203)는 전슬롯의 기본키와 동일한 기본키를 갖는 후슬롯(PS)을 전슬롯(FS)을 처리한 반영자(204)에 전송하여 처리될 수 있도록 한다. 이때, 부분배자(203)는 주분배자(202)에서 반영자(204)로 넘긴 슬롯이 릴레이션에 다 반영되는 동안 대기하고 있다가, 완료되면 반영자(204)에 후슬롯(PS)을 동시에 넘기며 동시에 처리될 수 있도록 한다.The partial distributor 203 transmits the rear slot PS having the same basic key as the primary key of the previous slot to the reflector 204 which processed the front slot FS so that the partial slot 203 can be processed. At this time, the partial distributor 203 waits while the slots passed from the main distributor 202 to the reflector 204 are fully reflected in the relation, and when completed, the partial distributor 203 simultaneously passes the rear slot PS to the reflector 204. It can be processed at the same time.
이와 같이, 주분배자(202)와 부분배자(203)가 트랜잭션 ID와 슬롯 ID가 추출된 슬롯을 반영자(204)에 넘기며 처리되도록 하며, 제2데이터베이스(205)에 도 4에 도시된 바와 같이 기본키가 1인 두 번째 열인 β열의 AA이 BB로 변경되고, 기본기가 4인 두 번째 열인 CC가 DD로 변경된 릴레이션이 반영될 수 있도록 한다.As such, the main distributor 202 and the partial distributor 203 pass the slot from which the transaction ID and the slot ID are extracted to the reflector 204 to be processed, and as shown in FIG. 4 in the second database 205. The AA in the β column, the second column with the primary key of 1, is changed to BB, and the relation in which the CC, the second column with the 4 is changed to DD, is reflected.
이하, 지금까지 설명한 데이터베이스 이중화 시스템(1)에 대한 설명을 바탕으로 본 발명의 일 실시예에 의한 데이터베이스 이중화 방법에 대해 설명하도록 한다.Hereinafter, the database duplication method according to an embodiment of the present invention will be described based on the description of the database duplication system 1 described so far.
데이터베이스 이중화 방법은 메인장비의 제1데이터베이스(101) 가운데 처리될 쿼리(Query)를 감지하여, 쿼리를 제2데이터베이스(205)를 포함하는 이중화장비의 수신기에 전송하는 (A)단계를 시작한다.The database duplication method detects a query to be processed in the first database 101 of the main device, and starts step (A) of transmitting the query to a receiver of the duplication device including the second database 205.
(A)단계 이후, 쿼리로부터 제1데이터베이스에 저장된 릴레이션의 레코드에 적용될 기본키(Primary Key)를 갖는 슬롯 ID와 트랜잭션 ID를 갖는 슬롯을 추출하는 (B)단계를 진행한다.After step (A), step (B) of extracting a slot having a primary key and a transaction ID having a primary key to be applied to the record of the relation stored in the first database is performed from the query.
슬롯 ID와 트랜잭션 ID이 할당된 슬롯이 추출되면, 슬롯을 락(Lock)하는 (C)단계를 진행한다.When the slot to which the slot ID and the transaction ID are allocated is extracted, step (C) of locking the slot is performed.
이후, 슬롯 가운데 기본키가 동일하되, 전순위에 처리되는 전슬롯(FS)은 주분배자에서 대기시키고, 후순위에 처리되는 후슬롯은 부분배자로 전송하는 (D)단계를 진행한다.Thereafter, the primary key is the same among the slots, but the previous slot (FS) processed in the prior order is waited at the main distributor, and the subsequent slot processed in the next priority is transferred to the partial distributor (D).
(D)단계가 완료되면, 전슬롯(FS)과 후슬롯(PS)을 반영자(204)에 할당하는 (E)단계를 진행한다. 이후, 전슬롯(FS)이 할당된 반영자(204)로 메인래퍼런스 카운트(Main Reference Count)를 증가시키고, 후슬롯(PS)이 할당된 반영자(204)로 서브래퍼런스 카운트(Sub Reference Count)를 증가시키는 (F)단계를 진행한다.When step (D) is completed, step (E) of assigning the front slot FS and the rear slot PS to the reflector 204 is performed. Subsequently, the main reference count is increased to the reflector 204 to which the previous slot FS is assigned, and the sub reference count to the reflector 204 to which the rear slot PS is assigned. Proceed to step (F) to increase.
이후, 전슬롯의 락과 후슬롯의 락을 해지하는 (G)단계를 진행한다.Thereafter, step (G) of releasing the lock of the previous slot and the lock of the next slot is performed.
데이터베이스 이중화 방법은 (A)단계 내지 (G)단계를 일련의 단계로 진행하며, 쿼리를 트랜잭션 하는 속도를 높여, 원격지 서버에 트랜잭션의 병목현상이 발생되지 않도록 할 수 있다.The database duplication method proceeds from the steps (A) to (G) in a series of steps, and can speed up the transaction of the query, so that the bottleneck of the transaction does not occur on the remote server.
이와 같은 데이터베이스 이중화 방법에 있어, 주분배자(202)의 작동은 도 5의 순서도를 기준으로 작동되고, 부분배자(203)의 작동은 도 6의 순서도를 기준으로 작동된다.In such a database duplication method, the operation of the main distributor 202 is operated based on the flowchart of FIG. 5, and the operation of the partial distributor 203 is operated based on the flowchart of FIG. 6.
도 5는 도 1의 데이터베이스 이중화 시스템의 주분배자의 동작과정을 나타낸 순서도이고, 도 6은 도 1의 데이터베이스 이중화 시스템의 부분배자의 동작과정을 나타낸 순서도이다.FIG. 5 is a flowchart illustrating an operation process of a main distributor of the database replication system of FIG. 1, and FIG. 6 is a flowchart illustrating an operation process of a partial distributor of the database replication system of FIG. 1.
도 5와 도 6에 도시된 주분배자와 부분배자의 동작과정은 도 2를 참조하여 설명하도록 한다.Operation of the main distributors and partial distributors shown in FIGS. 5 and 6 will be described with reference to FIG. 2.
주분배자(202)는 도 2(b)에 도시된 바와 같이, 수신된 쿼리에서 슬롯 ID와 트랜잭션 ID를 추출한다(S110). 이때, 쿼리는 주분배자(202)가 트랜잭션 ID와 슬롯 ID를 추출할 수 있도록 특정 정보를 포함할 수 있다.As shown in FIG. 2B, the main distributor 202 extracts the slot ID and the transaction ID from the received query (S110). In this case, the query may include specific information so that the main distributor 202 may extract the transaction ID and the slot ID.
이후, 주분배자(202)는 추출된 슬롯의 동시성 제어를 위해 슬롯 락(lock)을 거는 단계를 진행한다(S120). 이때, 부분배자(203) 또는 커밋의 처리로 인하여 슬롯에 락이 걸리지 않은 경우 일정시간 대기한 후 슬롯에 락이 건다(S121). 이후, 락이 걸린 슬롯 가운데 기본키가 동일하되, 전순위에 처리되는 전슬롯(FS)은 대기시키고, 기본키가 동일하되 후순위에 처리되는 후슬롯(PS)은 부분배자(203)로 전송한다.Thereafter, the main distributor 202 proceeds with the step of locking the slot for controlling the extracted slot concurrency (S120). At this time, if the slot is not locked due to the partial distribution 203 or the processing of the commit, the lock is applied to the slot after waiting for a predetermined time (S121). Thereafter, among the locked slots, the primary key is the same, but the previous slot (FS) processed in the previous rank is waited, and the primary slot is the same, but the subsequent slot PS processed in the downstream rank is transmitted to the partial distributor 203.
이때, 부분배자(203)에서 슬롯을 처리 대기 중이라면, 서브래퍼런스 카운트(Sub Reference Count)를 증가시켜, 전송될 후슬롯(PS)이 대기 되도록 한다.At this time, if the slot is waiting to be processed in the partial distributor 203, the sub reference count is increased to allow the post slot PS to be transmitted.
또한, 주분배자(202)는 전슬롯(FS)에 설정된 슬롯 ID와 트랜잭션 ID로 적절한 반영자(204)가 존재하는지 판단한다(S140). 이때, 전슬롯(FS)이 사용 중이 아닐 경우에는 전슬롯(FS)에 반영자(204) 정보를 저장한다(S141). 이후, 반영자(204)에 쿼리에 설정된 트랜잭션 ID와 주분배자에서 추출된 트랜잭션ID를 비교하여 동일한지를 판별한다(S150). 이때, 쿼리에 설정된 트랜잭션 ID와 추출된 트랜잭션 ID가 동일하여 반영자가 동일한 경우, 메인래퍼런스 카운트(Main Reference Count)를 증가시킨다. 반면, 반영자(204)가 상이한 경우, 서브래퍼런스 카운트(Sub Referebce Count)를 증가시킨다.In addition, the main distributor 202 determines whether there is an appropriate reflector 204 with the slot ID and the transaction ID set in all slots FS (S140). In this case, when the former slot FS is not in use, the reflector 204 information is stored in the former slot FS (S141). Thereafter, the reflector 204 compares the transaction ID set in the query with the transaction ID extracted from the main distributor to determine whether they are the same (S150). At this time, if the reflector is the same because the transaction ID set in the query and the extracted transaction ID are the same, the main reference count is increased. On the other hand, if the reflector 204 is different, the Sub Referebce Count is increased.
이후, 메인래퍼런스 카운트와 서브래퍼런스 카운트를 증가시킨 슬롯의 락을 해지하여, 다른 트랜잭션이 접근할 수 있도록 한다.Thereafter, the lock of the slot in which the main reference count and the subreference count are increased is released, so that other transactions can access it.
부분배자(203)는 전술한 주분배자(202)에서 슬릇이 부분배자(203)로 분류되어 작동하는 것으로 시작한다(S151). 이후, 부분배자(203)는 분류된 슬롯의 동시성 제어를 위하여 후슬롯(PS)에 락을 거는 것으로 진행된다(S161).The partial distributor 203 starts from the above-mentioned main distributor 202, where the bowl is classified and operated as the partial distributor 203 (S151). Subsequently, the partial distribution 203 proceeds to lock the rear slot PS for concurrency control of the classified slots (S161).
이때, 커밋의 처리로 인하여 후슬롯(PS)에 락이 걸리지 않은 경우 일정시간 대기한 후, 후슬롯(PS)에 락이 걸리도록 한다(S183).At this time, if the lock is not applied to the rear slot PS due to the process of commit, after waiting for a predetermined time, the lock is applied to the rear slot PS (S183).
락이 걸린 후슬롯(PS) 가운데, 반영자(204)에 후슬롯(PS)이 반영되지 않은 경우, 후슬롯(PS)에 반영자(204) 정보를 저장한다(S172). 한편, 반영자(204)에 후슬롯(PS)이 반영된 경우, 쿼리에 설정된 트랜잭션 ID와 후슬롯의 트랜잭션 ID를 비교하여 동일한지를 판별한다(S181). 이때, 쿼리에 설정된 트랜잭션 ID와 후슬릇의 트랜잭션 ID가 상이한 경우, 락을 해지한 후, 대기 및 재시도한다.If the rear slot PS is not reflected in the rear slot PS that is locked, the reflector 204 information is stored in the rear slot PS (S172). On the other hand, if the back slot (PS) is reflected in the reflector 204, it is determined by comparing the transaction ID set in the query and the transaction ID of the back slot (S181). At this time, if the transaction ID set in the query and the transaction ID of the backseat are different, the lock is released and then waited and retried.
반면, 반영자(204)가 동일한 경우, 서브래퍼런스 카운트(Sub Reference Count)를 증가시킨 후 다음 처리를 진행한다.On the other hand, when the reflectors 204 are the same, the next processing is performed after increasing the sub reference count.
부분배자(203)에서는 대기중이었던 트랜잭션이 반영자(204)에서 처리되며, 대기중이었다는 정보인 서브래퍼러스 카운트를 감소시킨다(S191). 그리고 메인레버러스카운트를 증가시켜 처리중으로 상태를 변경한다(S201).In the partial distributor 203, the transaction that was waiting is processed in the reflector 204, and the sub-lapperus count, which is information that it was waiting, is reduced (S191). The main lever count is increased to change the state during processing (S201).
이후, 후슬롯(PS)이 다른 트랜잭션을 처리할 수 있도록 락을 해지한다. Thereafter, the lock is released so that the back slot PS can process another transaction.
즉, 부분배자(203)는 대기중인 트랜잭션이 처리 가능한 시점이 되면, 반영자로 넘겨 트랜잭션이 처리될 수 있도록 한다.That is, the partial dispatcher 203 passes the reflector to process the transaction when the waiting transaction becomes available.
이하, 도 7 및 도 8을 참조하여 반영자가 회수되는 과정 및 주분배자의 작동 과정과 반영자의 회수 과정의 연결되어 작동하는 것에 대해 설명하도록 한다.Hereinafter, referring to FIGS. 7 and 8, the operation of the reflector and the operation of the main distributor and the operation of the reflector will be described.
도 7은 도 1의 데이터베이스 이중화 시스템의 반영자를 회수하는 과정을 나타낸 순서도이고, 도 8은 도 4의 주분배자의 작동 과정과 도 6의 반영자의 회수 과정이 결합되는 지점을 개략적으로 나타낸 순서도이다.FIG. 7 is a flowchart illustrating a process of recovering the reflector of the database redundancy system of FIG. 1, and FIG. 8 is a flowchart schematically illustrating a point at which an operation process of the main distributor of FIG. 4 and a process of recovering the reflector of FIG. 6 are combined.
제2데이터베이스(205)에 트랜잭션이 반영되면, 트랜잭션 커밋 완료를 진행한다(S210). 이후, 현재 트랜잭션이 사용하고 있는 모든 슬롯 정보를 분배자의 메모리 등을 참조하여 얻는 단계를 진행한다(S220). 다음으로, 추출된 슬롯을 락(lock)하는 단계를 진행한다(S230).If the transaction is reflected in the second database 205, the transaction commit is completed (S210). Thereafter, a process of obtaining all slot information used by the current transaction with reference to the distributor's memory and the like (S220). Next, a step of locking the extracted slot is performed (S230).
이때, 슬롯에 락이 걸리지 않은 경우 일정시간 대기한 후 슬롯에 락이 걸리도록 한다(S231). 반면, 슬롯에 락이 걸리는 경우, 메인래퍼런스 카운트와 서브래퍼런스 카운트를 감소하는 단계로 진입한다(S240). 이때, 트랜잭션 내 실행된 쿼리의 개수만큼 메인래퍼런스 카운트와 서브래퍼런스 카운트를 감소시킨다.At this time, if the lock is not applied to the slot, the lock is applied to the slot after waiting for a predetermined time (S231). On the other hand, when the lock is applied to the slot, the main reference count and the sub reference count is reduced (S240). At this time, the main reference count and the subreference count are reduced by the number of queries executed in the transaction.
본 발명에서는 하나의 트랜잭션 ID에 하나의 주문쿼리를 포함하고 있기 때문에 1인 메인래퍼런스 카운트와 서브래퍼런스 카운트에서 1만큼 감소시켜준다.In the present invention, since one transaction ID includes one order query, the number of main reference counts and subreference counts of 1 is reduced by one.
이후, 메인레퍼런스 카운트와 서브래퍼런스 카운트가 0인지를 판단하는 단계를 진행한다(S250). 이때, 각 래퍼런스 카운트가 0이면 해당 슬롯의 반영자 정보를 삭제하는 단계(S260) 그리고 슬롯의 락을 해지하는 단계(S270)를 순차적으로 진행한다. Thereafter, the method determines whether the main reference count and the sub reference count are 0 (S250). In this case, if each reference count is 0, the process of deleting reflector information of the corresponding slot (S260) and unlocking the slot (S270) are sequentially performed.
반면, 각 래퍼런스 카운트가 0이 아니면 슬롯의 락을 해제하는 단계를 바로 진행한다. 이후, 더 이상 처리할 쿼리가 남아 있는지 확인한다.On the other hand, if each reference count is not 0, the step of unlocking the slot is immediately performed. After that, check whether there are any more queries to process.
더욱이, S260에서 반영자 정보를 슬롯에서 삭제하면, 도 5의 S140단계와 연결되어 반영자를 재할당하고, 쿼리를 계속적으로 수행해 나갈 수 있다. 다시, 도 7과 관련하여, 이후 현재 트랜잭션이 포함하고 있는 쿼리의 슬롯에 대해 처리를 완료했는지 확인한다.Furthermore, if the reflector information is deleted from the slot in S260, the reflector information may be reassigned in step S140 of FIG. 5 and the query may be continuously performed. Again, with reference to FIG. 7, it is then checked whether the processing is completed for the slot of the query included in the current transaction.
이와 같은 방법을 반복하여 슬롯 내 할당된 반영자들을 모두 회수하고, 각 슬롯에 새로운 트랜잭션이 접근할 수 있도록 한다.This method is repeated to retrieve all the reflectors allocated in the slot and to allow new transactions to access each slot.
도 9는 종래기술과 데이터베이스 이중화 시스템의 트랜잭션 수행에 소비되는 시간을 나타낸 도면이다.9 is a view showing the time spent performing transactions of the prior art and database replication system.
도 9의 (a)는 종래의 방식에 따른 트랜잭션 수행에 따른 시간을 나타낸 도면이고, (b)는 본 발명에 따른 트랜잭션 수행에 따른 시간을 나타낸 도면이다.9 (a) is a view showing the time according to the transaction execution according to the conventional method, (b) is a view showing the time according to the transaction execution according to the present invention.
도 9의 (a)에서 보는 바와 같이, 하나의 트랜잭션을 처리 하는데 있어, 앞선 트랜잭션을 처리하는데 까지 대기해야 하는 방법은 처리하는 레코드가 다름에도 하나의 반영자를 이용한다. 따라서, 하나의 트랜잭션이 처리된 이후, 나머지 트랜잭션들이 처리되므로 전체 트랜잭션을 완료하는데 오랜 시간이 걸린다.As shown in (a) of FIG. 9, in processing one transaction, the method of waiting for processing the previous transaction uses one reflector even though the records to be processed are different. Thus, after one transaction is processed, the remaining transactions are processed, so it takes a long time to complete the entire transaction.
반면, 도 9(b)에서 보는 바와 같이, 본 발명의 데이터베이스 이중화 방법은 기본키가 상이한 트랜잭션 ID 1, 트랜잭션 ID 2, 트랜잭션 ID 4 및 트랜잭션 ID 6은 주분배자(202)에서 병렬로 수행한다. 그리고, 트랜잭션 ID 2와 기본키가 동일한 트랜잭션 ID 3과 트랜잭션 ID 4와 동일한 트랜잭션 ID 5를 부분배자(203)에서 병렬로 수행한다.On the other hand, as shown in Figure 9 (b), in the database replication method of the present invention, transaction ID 1, transaction ID 2, transaction ID 4 and transaction ID 6 having different primary keys are performed in parallel in the main distributor 202. In addition, the transaction ID 2 and the transaction ID 5 having the same primary key and the same transaction ID 5 as the transaction ID 4 are performed in parallel in the partial distributor 203.
이와 같이, 주분배자(202)와 부분배자(203)는 트랜잭션을 병렬 처리하되, 부분배자(203)는 주분배자(202)의 트랜잭션이 완료된 후 처리한다. 따라서, 데이터베이스 이중화방법은 트랜잭션의 전체 처리 시간을 줄일 수 있다.As such, the main distributor 202 and the partial distributor 203 process the transaction in parallel, but the partial distributor 203 processes the transaction of the main distributor 202 after completion. Therefore, the database duplication method can reduce the overall processing time of a transaction.
특히, 본 발명의 데이터베이스 이중화 방법은 트랜잭션이 많고, 많은 반영자를 생성하여 동시에 수행되는 트랜잭션이 많아지는 경우, 전체 데이터베이스를 이중화 하는데 소비되는 시간을 현격히 감소시킬 수 있다.In particular, the database duplication method of the present invention can significantly reduce the time spent in duplication of the entire database when there are a lot of transactions and a large number of transactions being executed at the same time by generating a large number of reflectors.
이상 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야 한다.Although embodiments of the present invention have been described above with reference to the accompanying drawings, those skilled in the art to which the present invention pertains may implement the present invention in other specific forms without changing the technical spirit or essential features thereof. I can understand that. Therefore, it should be understood that the embodiments described above are exemplary in all respects and not restrictive.

Claims (8)

  1. 메인장비의 제1데이터베이스 가운데 처리될 쿼리(Query)를 감지하여, 상기 쿼리를 제2데이터베이스를 포함하는 이중화장비의 수신기에 전송하는 (A)단계;(A) detecting a query to be processed among the first databases of the main equipment and transmitting the query to a receiver of the redundant equipment including a second database;
    상기 쿼리로부터 상기 제1데이터베이스에 저장된 릴레이션의 레코드에 적용될 기본키(Primary Key)를 갖는 슬롯 ID와 트랜잭션 ID(Transaction ID)를 갖는 슬롯을 추출하는 (B)단계;(B) extracting, from the query, a slot having a primary key and a transaction ID having a primary key to be applied to a record of the relation stored in the first database;
    상기 슬롯을 락(Lock)하는 (C)단계;(C) locking the slot;
    상기 슬롯 가운데 기본키(Primary Key)가 동일하되 전순위에 처리되는 전슬롯은 주분배자에서 대기시키고, 상기 기본키가 동일하되 후순위에 처리되는 후슬롯은 부분배자로 전송하는 (D)단계;(D) transmitting a primary slot having the same primary key among the slots but processing the previous slots in the main distributor, and transmitting the subsequent slots having the same primary key but the lower slots to the partial distributors;
    상기 전슬롯과 상기 후슬롯을 반영자에 할당하는 (E)단계;Assigning the preslot and the postslot to a reflector (E);
    상기 전슬롯이 할당된 상기 반영자로 메인래퍼런스 카운트(Main Reference Count)를 증가시키고, 상기 후슬롯이 할당된 상기 반영자로 서브래퍼런스 카운트(Sub Reference Count)를 증가시키는 (F)단계; 및(F) increasing a main reference count to the reflector to which the previous slot is assigned, and increasing a sub reference count to the reflector to which the rear slot is assigned; And
    상기 전슬롯의 락과 상기 후슬롯의 락을 해지하는 (G)단계를 포함하는 데이터베이스 이중화 방법.(G) releasing the lock of the previous slot and the lock of the rear slot.
  2. 제1항에 있어서,The method of claim 1,
    상기 주분배자는 상기 전슬롯을 상기 반영자에 각각 전송하여 동시에 수행할 수 있도록 하고, 상기 부분배자는 상기 전슬롯이 처리되면, 상기 후슬롯을 동시에 처리하는 데이터베이스 이중화 방법.And the main distributor transmits the previous slots to the reflectors, respectively, to perform the same time, and the partial distributors process the rear slots simultaneously when the previous slots are processed.
  3. 제2항에 있어서,The method of claim 2,
    상기 부분배자는 처리된 상기 전슬롯과 기본키가 동일한 상기 후슬롯을 상기 전슬롯을 처리한 상기 반영자에 전송하는 데이터베이스 이중화 방법.And the partial distributor transmits the rear slot having the same primary key as the processed front slot to the reflector that has processed the front slot.
  4. 제3항에 있어서,The method of claim 3,
    상기 주분배자는 추출된 슬롯이 락이 되지 않을 경우, 상기 슬롯이 락이 될 때까지 대기하는 데이터베이스 이중화 방법.And when the extracted slot is not locked, waiting for the slot to be locked.
  5. 제1데이터베이스에 저장된 하나의 릴레이션에 처리될 쿼리를 감지하는 감지기;A detector for detecting a query to be processed in one relation stored in the first database;
    상기 쿼리를 전송하는 송신기;A transmitter for transmitting the query;
    상기 송신기에서 전송되는 상기 쿼리를 수신하는 수신기;A receiver for receiving the query transmitted from the transmitter;
    상기 수신기에서 수신된 상기 쿼리에서 슬롯 ID(Slot ID), 트랜잭션 ID(Transaction ID)를 갖는 슬롯을 형성하고, 형성된 상기 슬롯 가운데 기본키(Primary Key)가 동일하되 전순위에 처리되는 전슬롯은 대기시키고, 후순위에 처리될 후슬롯은 부분배자로 전송하는 주분배자; 및In the query received from the receiver, a slot having a slot ID and a transaction ID is formed, and among all the slots formed, the primary key is the same but all slots processed in the previous order are waiting. A main distributor which transmits the subslot to the partial distributor; And
    상기 전슬롯과 상기 후슬롯을 제2데이터베이스에 반영하는 반영자를 포함하는 데이터베이스 이중화 시스템.And a reflector for reflecting the first slot and the second slot in a second database.
  6. 제5항에 있어서,The method of claim 5,
    상기 주분배자는 주문 쿼리가 진행 된 후, 커밋(commit)쿼리를 진행하며 하나의 트랜잭션 ID를 갖는 슬롯을 생성하는 데이터베이스 이중화 시스템.The main distributor performs a commit query after an order query is processed, and creates a slot having a single transaction ID.
  7. 제5항에 있어서,The method of claim 5,
    상기 부분배자는 상기 전슬롯이 처리되면, 상기 후슬롯을 동시에 처리하는 데이터베이스 이중화 시스템.And the partial distributor performs simultaneous processing of the rear slot when the front slot is processed.
  8. 제7항에 있어서,The method of claim 7, wherein
    상기 부분배자는 상기 전슬롯의 기본키와 동일한 기본키를 갖는 상기 후슬롯을 상기 전슬롯을 처리한 상기 반영자에 전송하는 데이터베이스 이중화 시스템.And the partial distributor transmits the rear slot having the same primary key as the primary key of the previous slot to the reflector which processed the previous slot.
PCT/KR2017/005573 2017-05-24 2017-05-29 Database replication method and database replication system WO2018216839A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780084899.1A CN110300964B (en) 2017-05-24 2017-05-29 Database replication method and database replication system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2017-0063860 2017-05-24
KR1020170063860A KR101936787B1 (en) 2017-05-24 2017-05-24 Method for database replication and System for database replication

Publications (1)

Publication Number Publication Date
WO2018216839A1 true WO2018216839A1 (en) 2018-11-29

Family

ID=64396828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/005573 WO2018216839A1 (en) 2017-05-24 2017-05-29 Database replication method and database replication system

Country Status (3)

Country Link
KR (1) KR101936787B1 (en)
CN (1) CN110300964B (en)
WO (1) WO2018216839A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102303895B1 (en) * 2020-03-12 2021-09-23 (주)선재소프트 Database Replication System With Improved Database Replication

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110066595A1 (en) * 2009-09-14 2011-03-17 Software Ag Database server, replication server and method for replicating data of a database server by at least one replication server
US20140172794A1 (en) * 2012-12-19 2014-06-19 Christian BARTHOLOMÄ Replication Mechanisms for Database Environments
KR20150007435A (en) * 2013-07-11 2015-01-21 (주)선재소프트 Method of duplicating database using pararell-processing and computer readable storage media storing the same)
KR101605455B1 (en) * 2014-07-04 2016-03-22 (주)선재소프트 Method for Replicationing of Redo Log without Data Loss and System Thereof
US20170060695A1 (en) * 2015-08-31 2017-03-02 Paypal, Inc. Data replication between databases with heterogenious data platforms

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8073820B2 (en) * 2008-04-07 2011-12-06 Sonics, Inc. Method and system for a database to monitor and analyze performance of an electronic design
US10430298B2 (en) * 2010-10-28 2019-10-01 Microsoft Technology Licensing, Llc Versatile in-memory database recovery using logical log records
CN105574187B (en) * 2015-12-23 2019-02-19 武汉达梦数据库有限公司 A kind of Heterogeneous Database Replication transaction consistency support method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110066595A1 (en) * 2009-09-14 2011-03-17 Software Ag Database server, replication server and method for replicating data of a database server by at least one replication server
US20140172794A1 (en) * 2012-12-19 2014-06-19 Christian BARTHOLOMÄ Replication Mechanisms for Database Environments
KR20150007435A (en) * 2013-07-11 2015-01-21 (주)선재소프트 Method of duplicating database using pararell-processing and computer readable storage media storing the same)
KR101605455B1 (en) * 2014-07-04 2016-03-22 (주)선재소프트 Method for Replicationing of Redo Log without Data Loss and System Thereof
US20170060695A1 (en) * 2015-08-31 2017-03-02 Paypal, Inc. Data replication between databases with heterogenious data platforms

Also Published As

Publication number Publication date
KR101936787B1 (en) 2019-01-14
CN110300964A (en) 2019-10-01
KR20180128580A (en) 2018-12-04
CN110300964B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
US8688634B2 (en) Asynchronous peer-to-peer data replication
US10185632B2 (en) Data synchronization with minimal table lock duration in asynchronous table replication
US7801997B2 (en) Asynchronous interconnect protocol for a clustered DBMS
US6662196B2 (en) Collision avoidance in bidirectional database replication
KR100983300B1 (en) Recovery from failures within data processing systems
Mitchell et al. A distributed algorithm for deadlock detection and resolution
US6185577B1 (en) Method and apparatus for incremental undo
Obermarck Distributed deadlock detection algorithm
US9244996B2 (en) Replicating data across multiple copies of a table in a database system
US5317739A (en) Method and apparatus for coupling data processing systems
US20030220935A1 (en) Method of logical database snapshot for log-based replication
US6298345B1 (en) Database journal mechanism and method that supports multiple simultaneous deposits
JPH04230541A (en) Method for controlling work-unit identifier in chain-dispersion data transaction system
WO2020101343A1 (en) Method for implementing change data capture in database management system
EP0716377B1 (en) Deadlock detection mechanism
JP2007219598A (en) Multiplex database system, its synchronization method, database server, and database server program
US5550973A (en) System and method for failure recovery in a shared resource system having a moving write lock
GB2188177A (en) Computer system for sharing a data resource
WO2018216839A1 (en) Database replication method and database replication system
US8521682B2 (en) Transfer of data from transactional data sources to partitioned databases in restartable environments
CN112015591A (en) Log management method, server and database system
CN108733477A (en) The method, apparatus and equipment of data clusterization processing
CN110121712B (en) Log management method, server and database system
WO2022126918A1 (en) Method and apparatus for automatically synchronizing associated scripts, and computer device and storage medium
JP2514671B2 (en) Data access control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17910817

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17910817

Country of ref document: EP

Kind code of ref document: A1