KR102174957B1 - Transaction control method to synchronize DML statements in relational database to NoSQL database - Google Patents

Transaction control method to synchronize DML statements in relational database to NoSQL database Download PDF

Info

Publication number
KR102174957B1
KR102174957B1 KR1020190009227A KR20190009227A KR102174957B1 KR 102174957 B1 KR102174957 B1 KR 102174957B1 KR 1020190009227 A KR1020190009227 A KR 1020190009227A KR 20190009227 A KR20190009227 A KR 20190009227A KR 102174957 B1 KR102174957 B1 KR 102174957B1
Authority
KR
South Korea
Prior art keywords
nosql
data
transaction
rdbms
sync
Prior art date
Application number
KR1020190009227A
Other languages
Korean (ko)
Other versions
KR20200092095A (en
Inventor
이우준
이현기
Original Assignee
주식회사 웨어밸리
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 웨어밸리 filed Critical 주식회사 웨어밸리
Priority to KR1020190009227A priority Critical patent/KR102174957B1/en
Publication of KR20200092095A publication Critical patent/KR20200092095A/en
Application granted granted Critical
Publication of KR102174957B1 publication Critical patent/KR102174957B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 일실시예는 관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법을 개시한다. 개시된 트랜잭션 제어 방법은, 동기화 프록시 서버가 소스 RDBMS의 트랜잭션 DML 데이터를 NoSQL DBMS로 동기화하는 방법에 있어서, 상기 동기화 프록시 서버가 소스 RDBMS의 메타정보, 복구이력을 위한 Sync_iid와 Sync_uid 컬럼을 추가하고, 트랜잭션을 제어하기 위한 저장소와 자료구조를 생성하며, 복제 NoSQL DBMS로 적재하기 위한 저장소와 자료구조를 생성하여 동기화 동작의 초기화 작업을 수행하는 준비 단계; 상기 동기화 프록시 서버가 네트워크에서 패킷을 수신하여 분석한 후, NoSQL 데이터 변환 실패 처리를 위해 INSERT, UPDATE의 DML을 변경하여 소스 RDBMS의 트랜잭션을 내부적으로 관리하고 처리하는 트랜잭션 제어 단계; 상기 동기화 프록시 서버가 트랜잭션의 커밋(Commit) 연산된 데이터가 클라이언트에게 전송완료된 후에 해당 NoSQL 변환을 처리하는 NoSQL 변환 단계; 및 상기 NoSQL 변환 단계에서 변환된 DML NoSQL 데이터를 복제 NoSQL DBMS에 적재하는 NoSQL 적재 단계를 포함한다.An embodiment of the present invention discloses a transaction control method for synchronizing DML statements of a relational database to a NoSQL database. The disclosed transaction control method is a method in which a synchronization proxy server synchronizes transaction DML data of a source RDBMS to a NoSQL DBMS, wherein the synchronization proxy server adds the meta information of the source RDBMS, Sync_iid and Sync_uid columns for recovery history, and A preparatory step of creating a storage and a data structure for controlling the data, and performing an initialization operation of a synchronization operation by creating a storage and a data structure for loading into the replication NoSQL DBMS; A transaction control step of internally managing and processing a transaction of a source RDBMS by changing the DML of INSERT and UPDATE in order for the synchronization proxy server to receive the packet from the network and analyze it, and to process a NoSQL data conversion failure; A NoSQL conversion step of processing a corresponding NoSQL conversion after the synchronization proxy server completes transmission of the transaction-committed data to the client; And a NoSQL loading step of loading the DML NoSQL data converted in the NoSQL conversion step into a replica NoSQL DBMS.

Description

관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법{Transaction control method to synchronize DML statements in relational database to NoSQL database}Transaction control method to synchronize DML statements in relational database to NoSQL database}

본 발명은 이기종 데이터베이스 시스템의 동기화 기술에 관한 것으로, 더욱 상세하게는 RDBMS의 트랜잭션 변경 데이터를 NoSQL 데이터베이스로 복제 시 RDBMS의 스키마, 컬럼의 고정된 포맷의 데이터를 형식이 자유로운 NoSQL 데이터베이스에 저장하기 위해 트랜잭션 제어 방법에 관한 것이다.The present invention relates to a synchronization technology for heterogeneous database systems, and more particularly, to store data in fixed format of schema and columns of RDBMS in a NoSQL database when replicating transaction change data of RDBMS to NoSQL database. It relates to the control method.

일반적으로, 데이터베이스시스템(DBMS)은 트랜잭션을 통한 안정적인 데이터 관리가 중요한 이슈였기 때문에 데이터를 저장하는 데에는 주로 관계형 데이터베이스(RDBMS)가 사용되었다. 하지만 최근들어 웹 2.0 환경과 빅데이터가 등장하면서 RDBMS는 '데이터를 처리하는 데 필요한 비용의 증가'라는 난관에 부딪히게 되었다. 즉, 데이터와 트래픽의 양이 기하급수적으로 증가함에 따라 한 대에서 실행되도록 설계된 관계형 데이터베이스를 사용할 경우 장비의 성능을 향상시키는 데(Scale-up: 수직적 확장) 비용이 기하급수적으로 증가하게 되었다.In general, the database system (DBMS) is a relational database (RDBMS) mainly used to store data because stable data management through transactions was an important issue. However, with the emergence of web 2.0 environments and big data in recent years, RDBMS faced the challenge of'increasing the cost required to process data'. In other words, as the amount of data and traffic increases exponentially, when using a relational database designed to run on a single machine, the cost of improving the performance of the equipment (Scale-up: vertical expansion) increases exponentially.

이러한 문제점을 해결하기 위해 기존의 RDBMS가 보장하는 분산 컴퓨팅 시스템의 특징인 일관성(Consistency)과 유효성(Availablity) 중 일부를 포기하되 파티션 허용치(Partition tolerance)를 보장함으로써 RDBMS와 달리 수평적 확장(Scale-out)이 가능한 NoSQL(Not Only SQL)이라는 기술이 나타나게 되었다.In order to solve this problem, unlike RDBMS, by giving up some of the features of the distributed computing system, which are the features of the existing RDBMS, consistency and availability, but ensuring partition tolerance, Scale- Out), a technology called NoSQL (Not Only SQL) appeared.

그러나 NoSQL은 일관성과 유효성 중 일부를 포기함으로써 ACID(Atomicity: 원자성, Consistenty: 일관성, Isolation: 고립성, Durability: 지속성) 특성을 갖는 트랜잭션을 제공하지 못하는 문제점이 발생하게 되었다.However, because NoSQL gave up some of the consistency and validity, there was a problem that it could not provide a transaction with ACID (Atomicity: atomicity, Consistenty: consistency, Isolation: isolation, Durability: persistence) characteristics.

이러한 문제점을 해결하기 위해 대한민국특허청 등록특허공보(B1)에 등록번호 제10-1755276호로 공고된 'NoSQL에 기반한 트랜잭션 관리 방법 및 시스템'은 데이터베이스에 저장되어 있는 데이터를 데이터베이스가 제공하는 인터페이스를 이용해 접근할 수 있는 물리키와 물리키에 대응해서 트랜잭션 관리 시스템 내에서 관리되고 트랜잭션 관리 시스템이 제공하는 인터페이스를 이용해 해당 데이터를 접근할 수 있는 가상키의 관계 정보를 관리하는 가상의 데이터베이스인 도메인을 관리하는 도메인 관리부와, 각 도메인 내에 관리되는 복수의 가상키와 이에 대응하는 물리키 관계를 저장하는 키매칭맵을 데이터로 갖는 매칭블록을 관리하는 매칭블록관리부와, 어느 하나의 도메인에서 작업단위를 구성하는 일련의 연산들의 집합인 트랜잭션에 따라 연산을 수행하는 트랜잭션수행부와, 데이터의 추가 및 변경 작업 중 적어도 하나를 포함하는 트랜잭션의 수행에 이용되는 복수의 가상키와 이에 대응하는 물리키 관계를 저장하는 작업키맵을 관리하는 작업키관리부와, 트랜잭션의 수행에 따라 삭제되는 가상키에 대한 정보인 삭제키목록을 관리하는 삭제키관리부로 구성된다.In order to solve this problem, the'NoSQL-based transaction management method and system' announced in Korean Patent Office Registered Patent Publication (B1) as registration number 10-1755276 is accessed using an interface provided by the database. It manages the domain, which is a virtual database that manages the relationship information of the virtual key that can access the data using the interface provided by the transaction management system and managed within the transaction management system in response to the physical key and the physical key. A domain management unit, a matching block management unit that manages a matching block having as data a key matching map that stores a plurality of virtual keys managed in each domain and a physical key relationship corresponding thereto, and a unit of work in any one domain. A transaction execution unit that performs an operation according to a transaction, which is a set of operations, and stores a plurality of virtual keys used to perform a transaction including at least one of data addition and change operations, and a physical key relationship corresponding thereto. It consists of a work key management unit that manages the work key map, and a deletion key management unit that manages a list of deletion keys, which is information about virtual keys that are deleted according to the execution of a transaction.

상기 등록특허는 NoSQL을 기반으로 가상키(Vitual Key)를 관리하는 가상의 DBMS인 도메인을 통해 사용자가 접근하도록 하여 다수의 키에 대한 데이터 정합성을 지원하는 트랜잭션 기능을 제공하는 방식이므로, 프록시 서버를 통해 RDBMS 원본 데이터를 NoSQL DBMS로 변환하여 복제 및 동기화시키는데 적용할 수 없는 문제점이 있다.The above registered patent provides a transaction function that supports data consistency for multiple keys by allowing users to access through a domain, which is a virtual DBMS that manages virtual keys based on NoSQL. There is a problem that cannot be applied to replicate and synchronize by converting the original RDBMS data to a NoSQL DBMS.

본 발명의 목적은 RDBMS의 트랜잭션 변경 데이터를 NoSQL 데이터베이스로 복제 시 원본과 전혀 다른 데이터가 복제될 수 있으므로 이러한 문제를 해결하고, RDBMS의 스키마, 컬럼의 고정된 포맷의 데이터를 형식이 자유로운 NoSQL 데이터베이스로 저장하기 위하여 관계형 데이터베이스의 데이터 조작 언어(DML:Data Manipulation Language) 문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법을 제공하는 것이다.The object of the present invention is to solve this problem because completely different data from the original can be replicated when replicating transaction-modified data from an RDBMS to a NoSQL database, and to convert data in a fixed format of the schema and columns of the RDBMS to a NoSQL database with a free format. To store, it provides a transaction control method for synchronizing DML (Data Manipulation Language) statements of a relational database to a NoSQL database.

본 발명의 일실시예는 관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법을 개시한다.An embodiment of the present invention discloses a transaction control method for synchronizing DML statements of a relational database to a NoSQL database.

개시된 트랜잭션 제어 방법은, 동기화 프록시 서버가 RDBMS의 트랜잭션 DML 데이터를 NoSQL DBMS로 동기화하는 방법에 있어서, 상기 동기화 프록시 서버가 RDBMS의 메타정보, 복구이력을 위한 sync_iid와 sync_uid 컬럼을 추가하고, 트랜잭션을 제어하기 위한 저장소와 자료구조를 생성하며, NoSQL DBMS로 적재하기 위한 저장소와 자료구조를 생성하여 동기화 동작의 초기화 작업을 수행하는 준비 단계; 상기 동기화 프록시 서버가 네트워크에서 패킷을 수신하여 분석한 후, NoSQL 데이터 변환 실패 처리를 위해 INSERT, UPDATE의 DML을 변경하여 RDBMS의 트랜잭션을 내부적으로 관리하고 처리하는 트랜잭션 제어 단계; 상기 동기화 프록시 서버가 트랜잭션의 커밋(Commit) 연산된 데이터가 클라이언트에게 전송완료된 후에 해당 NoSQL 변환을 처리하는 NoSQL 변환 단계; 및 상기 NoSQL 변환 단계에서 변환된 DML NoSQL 데이터를 NoSQL DBMS에 적재하는 NoSQL 적재 단계를 포함하는 것을 특징으로 한다.The disclosed transaction control method is a method in which a synchronization proxy server synchronizes transaction DML data of an RDBMS to a NoSQL DBMS, wherein the synchronization proxy server adds meta information of the RDBMS, sync_iid and sync_uid columns for recovery history, and controls transactions. A preparatory step of creating a storage and a data structure for loading, creating a storage and data structure for loading into a NoSQL DBMS, and performing an initialization operation of a synchronization operation; A transaction control step of internally managing and processing a transaction of an RDBMS by changing the DML of INSERT and UPDATE in order for the synchronization proxy server to receive the packet from the network and analyze it, and to process a NoSQL data conversion failure; A NoSQL conversion step of processing a corresponding NoSQL conversion after the synchronization proxy server completes transmission of the transaction-committed data to the client; And a NoSQL loading step of loading the DML NoSQL data converted in the NoSQL conversion step into a NoSQL DBMS.

상기 준비 단계는 소스 RDBMS의 메타 정보, 복구 이력을 위한 Sync_iid와 Sync_uid 컬럼을 추가하는 단계와, 소스 RDBMS의 트랜잭션을 제어하기 위한 저장소와 자료 구조 생성하는 단계와, 복제 NoSQL DBM로 적재하기 위한 저장소와 자료 구조를 생성하는 단계를 포함한다.The preparation steps include adding Sync_iid and Sync_uid columns for meta information of the source RDBMS and recovery history, creating a storage and data structure for controlling the transaction of the source RDBMS, and a storage for loading into the replica NoSQL DBM. Creating a data structure.

또한, 상기 트랜잭션 제어 단계는 동기화 프록시 서버가 네트워크로부터 소스 RDBMS의 패킷을 수집하여 분석하는 단계와, 신규 세션이면, 세션키를 생성하여 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 저장하는 단계와, 신규 세션이 아니면, 데이터 조작 언어(DML)인지를 판단하여 데이터 조작 언어(DML)가 아니면 부분 롤백(Roll Back)이나 커밋(COMMIT) 혹은 롤백(Roll Back)을 처리하는 단계와, INSERT 데이터 조작 언어(DML)이면 수신 패킷에 Sync_iid 컬럼을 추가하고, 값(VALUE)에 Table.sync_iid를 추가한 확장패킷으로 변경하는 단계와, UPDATE 데이터 조작 언어(DML)이면, 수신 패킷에 Sync_uid 컬럼을 추가하고, 값(VALUE)에 Table.sync_uid를 추가한 확장패킷으로 변경하는 단계와, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)가 할당되어 있지 않으면 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 영역을 할당하고, 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 영역에 접근할 참조값을 생성하는 단계와, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 영역에 해당 DML 데이터와 DML 타입에 따른 Sync_iid 또는 Sync_uid값을 함께 저장한 후 확장패킷을 소스 RDBMS로 전송하는 단계를 포함한다.In addition, in the transaction control step, the synchronization proxy server collects and analyzes the packet of the source RDBMS from the network, and if it is a new session, a session key is generated and stored in the session unit transaction management data storage (TR-SESSION-MAP). Steps, determining whether it is a data manipulation language (DML) if it is not a new session, and processing a partial rollback, commit, or rollback if it is not a data manipulation language (DML), and INSERT In the case of data manipulation language (DML), the Sync_iid column is added to the received packet, and the step of changing to an extended packet with Table.sync_iid added to the value (VALUE), and in the case of UPDATE data manipulation language (DML), the Sync_uid column is added to the received packet. The steps of adding and changing to an extended packet with Table.sync_uid added to the value (VALUE), and if the RDBMS transaction data storage (RDB-TR-DATA) is not allocated, the RDBMS transaction data storage (RDB-TR-DATA) Allocating an area and creating a reference value to access the allocated area of the RDBMS transaction data store (RDB-TR-DATA) in the session unit transaction management data store (TR-SESSION-MAP), and the RDBMS transaction data store (RDB- TR-DATA) storing the corresponding DML data and a Sync_iid or Sync_uid value according to the DML type together in an allocation area of the DML, and then transmitting the extended packet to the source RDBMS.

상기 NoSQL 변환 단계는 트랜잭션 제어기로부터 트랜잭션 데이터 처리신호가 수신되면, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)에서 해당 트랜잭션 데이터를 하나씩 읽어 오는 단계와, 읽어온 트랜잭션 데이터가 INSERT이면, NoSQL INSERT 문장 변환기를 불러와 INSERT NoSQL 변환 절차를 수행하고, 변환된 소스 RDBMS의 ROW 데이터의 Sync-iid 값을 Table.commit_iid값으로 갱신하는 단계와, 읽어온 트랜잭션 데이터가 UPDATE이면, NoSQL UPDATE 문장 변환기를 불러와 UPDATE NoSQL 변환 절차를 수행하고, 변환된 소스 RDBMS의 ROW 데이터의 Sync-uid 값을 Table.commit_uid값으로 갱신하는 단계와, 읽어온 트랜잭션 데이터가 DELETE이면, NoSQL DELETE 문장 변환기를 불러와 DELETE NoSQL 변환 절차를 수행하는 단계를 포함하고, 읽어온 트랜잭션 데이터가 마지막(End)이면, NoSQL 적재기에 적재 신호를 전송하는 단계를 더 포함할 수 있다.In the NoSQL conversion step, when a transaction data processing signal is received from the transaction controller, the transaction data is read one by one from the RDBMS transaction data storage (RDB-TR-DATA), and if the read transaction data is INSERT, the NoSQL INSERT statement converter Execute the INSERT NoSQL conversion procedure by calling and updating the Sync-iid value of the ROW data of the converted source RDBMS to the Table.commit_iid value.If the read transaction data is UPDATE, call the NoSQL UPDATE statement converter and UPDATE Perform the NoSQL conversion procedure, update the sync-uid value of the converted source RDBMS ROW data to the Table.commit_uid value, and if the read transaction data is DELETE, call the NoSQL DELETE statement converter and perform the DELETE NoSQL conversion procedure. Including the step of performing, and if the read transaction data is the end (End), it may further include the step of transmitting a loading signal to the NoSQL loader.

본 발명의 실시예에 따르면, RDBMS의 트랜잭션 변경 데이터를 NoSQL 데이터베이스로 복제 시, RDBMS의 스키마, 컬럼의 고정된 데이터 포맷의 데이터를, 형식이 자유로운 NoSQL 데이터베이스로 변환하여 관계형 데이터베이스의 DML 문장을 NoSQL 데이터베이스로 동기화할 수 있는 효과가 있다.According to an embodiment of the present invention, when replicating transaction change data of an RDBMS to a NoSQL database, data in a fixed data format of the schema and columns of the RDBMS are converted to a NoSQL database with a free form, and the DML statements of the relational database are converted to a NoSQL database. There is an effect that can be synchronized with.

도 1은 본 발명의 실시예에 따른 이기종 데이터베이스의 동기화 시스템의 전체 구성을 도시한 개략도,
도 2는 본 발명의 실시예에 따라 관계형 데이터베이스의 DML 문장을 NoSQL 데이터베이스로 동기화하기 위한 전체 절차를 도시한 순서도,
도 3a 및 3b는 도 2에 도시된 준비단계의 세부 절차를 도시한 순서도,
도 4a 및 4b는 도 2에 도시된 트랜잭션 제어 단계의 세부 절차를 도시한 순서도,
도 5는 도 2에 도시된 NoSQL 변환 단계의 세부 절차를 도시한 순서도,
도 6은 도 5에 도시된 INSERT NoSQL 변환 절차를 도시한 순서도,
도 7은 도 5에 도시된 UPDATE NoSQL 변환 절차를 도시한 순서도,
도 8은 도 5에 도시된 DELETE NoSQL 변환 절차를 도시한 순서도,
도 9는 본 발명의 실시예에 따른 NoSQL 변환 실패시 처리 절차를 도시한 순서도,
도 10은 도 2에 도시된 NoSQL 적재 단계의 세부 절차를 도시한 순서도,
도 11은 본 발명의 실시예에 따라 소스 RDBMS가 NoSQL Document로 변환된 예이다.
1 is a schematic diagram showing the overall configuration of a synchronization system for heterogeneous databases according to an embodiment of the present invention;
2 is a flow chart showing an entire procedure for synchronizing DML sentences of a relational database to a NoSQL database according to an embodiment of the present invention;
3A and 3B are flowcharts showing detailed procedures of the preparation step shown in FIG. 2;
4A and 4B are flow charts showing detailed procedures of the transaction control step shown in FIG. 2;
5 is a flow chart showing a detailed procedure of the NoSQL conversion step shown in FIG. 2;
6 is a flow chart showing the INSERT NoSQL conversion procedure shown in FIG. 5;
7 is a flow chart showing the UPDATE NoSQL conversion procedure shown in FIG. 5;
8 is a flow chart showing the DELETE NoSQL conversion procedure shown in FIG. 5;
9 is a flow chart showing a processing procedure when a NoSQL conversion fails according to an embodiment of the present invention;
10 is a flow chart showing a detailed procedure of the NoSQL loading step shown in FIG. 2;
11 is an example in which a source RDBMS is converted to a NoSQL document according to an embodiment of the present invention.

본 발명과 본 발명의 실시에 의해 달성되는 기술적 과제는 다음에서 설명하는 본 발명의 바람직한 실시예들에 의하여 보다 명확해질 것이다. 다음의 실시예들은 단지 본 발명을 설명하기 위하여 예시된 것에 불과하며, 본 발명의 범위를 제한하기 위한 것은 아니다. The present invention and the technical problem achieved by the implementation of the present invention will become more apparent by the preferred embodiments of the present invention described below. The following examples are merely illustrative for explaining the present invention, and are not intended to limit the scope of the present invention.

도 1은 본 발명의 실시예에 따른 이기종 데이터베이스의 동기화 시스템의 전체 구성을 도시한 개략도로서, 소스 데이터베이스인 관계형 데이터베이스(RDBMS;30)의 데이터와 이를 복제한 복제대상 NoSQL DBMS(40)의 데이터를 동기화시키는 것이다.1 is a schematic diagram showing the overall configuration of a synchronization system for heterogeneous databases according to an embodiment of the present invention, and data of a relational database (RDBMS) 30 as a source database and data of a replication target NoSQL DBMS 40 Is to synchronize.

도 1을 참조하면, RDBMS DML 발생 클라이언트(10)는 RDBMS 방식의 업무용 PC들과 서버들로서, RDBMS DML 트랜잭션이 발생하면 동기화 프록시 서버(20)에 트랜잭션의 반영이나 취소를 요청한다(S1). 여기서, DML(Data Manipulation Language)은 데이터베이스 내의 데이터를 검색, 저장, 수정 및 삭제를 하는데 사용되는 일련의 명령어들로서, 본 발명의 실시예에서는 INSERT, UPDATE, DELETE를 예로들어 설명한다.Referring to FIG. 1, the RDBMS DML generation client 10 is RDBMS type business PCs and servers, and when an RDBMS DML transaction occurs, it requests the synchronization proxy server 20 to reflect or cancel the transaction (S1). Here, DML (Data Manipulation Language) is a series of commands used to search, store, modify, and delete data in a database. In an embodiment of the present invention, INSERT, UPDATE, and DELETE are described as examples.

동기화 프록시 서버(20)는 준비모듈(22), 트랜잭션 제어기(24), NoSQL 변환기(26), NoSQL 적재기(28)를 포함하고, 클라이언트(10)에서 발생되는 DML 트랜잭션 패킷을 수신하면 이를 분석하여 INSERT나 UPDATE 데이터이면 Sync_id 데이터를 추가한 후 소스 RDBMS(30)로 전송한다(S2). 여기서, Sync_id는 본 발명의 실시예에서 데이터 복제를 위해 DML 트랜잭션을 구분하기 위한 식별자로서, INSERT이면 Sync_iid로, UPDATE이면 Sync_uid로 표시한다.The synchronization proxy server 20 includes a preparation module 22, a transaction controller 24, a NoSQL converter 26, and a NoSQL loader 28, and analyzes the DML transaction packet generated by the client 10 when it is received. If it is INSERT or UPDATE data, Sync_id data is added and then transmitted to the source RDBMS (30) (S2). Here, Sync_id is an identifier for distinguishing DML transactions for data replication in an embodiment of the present invention, and is indicated as Sync_iid for INSERT and Sync_uid for UPDATE.

그리고 소스 RDBMS(30)로부터 트랜잭션 완료 결과를 수신하면(S3), 그 결과를 클라이언트(10)로 전송(S4)한 후 DML 트랜잭션 데이터를 NoSQL 데이터로 변환하여 NoSQL DBMS(40)에 저장(S5)하여 소스 RDBMS(30)와 복제대상 NoSQL DBMS(40)의 데이터를 동기화시킨다. 여기서, 프록시 서버(proxy server)는 클라이언트가 자신을 통해서 다른 네트워크 서비스에 간접적으로 접속할 수 있게 해 주는 컴퓨터나 응용 프로그램으로서, 서버와 클라이언트 사이에서 중계기로서 대리로 통신을 수행하는 기능을 한다.When the transaction completion result is received from the source RDBMS 30 (S3), the result is transmitted to the client 10 (S4), and the DML transaction data is converted into NoSQL data and stored in the NoSQL DBMS 40 (S5). Thus, the data of the source RDBMS 30 and the replication target NoSQL DBMS 40 are synchronized. Here, a proxy server is a computer or application program that allows a client to indirectly access other network services through itself, and functions to perform communication by proxy as a relay between the server and the client.

소스 RDBMS(30)는 ACID(원자성, 일관성, 고립성, 지속성)의 트랜잭션을 제공하는 전통적인 관계형 데이터베이스이다. 관계형 데이터베이스로는 Oracle, DB2, MSsql, MySQL 등이 있다. 여기서, 원자성(Atomicity)은 트랜잭션과 관련된 작업들이 부분적으로 실행되다가 중단되지 않는 것을 보장하는 능력이고, 일관성(Consistency)은 트랜잭션이 실행을 성공적으로 완료하면 언제나 일관성 있는 데이터베이스 상태로 유지하는 것을 의미하며, 고립성(Isolation)은 트랜잭션 수행 시 다른 트랜잭션의 연산 작업이 끼어들지 못하도록 보장하는 것을 의미하고, 지속성(Durability)은 성공적으로 수행된 트랜잭션은 영원히 반영되어야 함을 의미한다. 전형적으로 모든 트랜잭션은 로그로 남고, 시스템 장애 발생 전 상태로 되돌릴 수 있으며, 트랜잭션은 로그에 모든 것이 저장된 후에만 커밋(commit) 상태로 간주될 수 있다.The source RDBMS 30 is a traditional relational database that provides ACID (atomic, coherent, isolated, persistent) transactions. Relational databases include Oracle, DB2, MSsql, and MySQL. Here, atomicity is the ability to ensure that transactions related to the transaction are partially executed and not interrupted, and consistency means that when a transaction successfully completes execution, it is always maintained in a consistent database state. , Isolation means that the operation of other transactions cannot be intervened when performing a transaction, and Durability means that successfully executed transactions must be reflected forever. Typically, all transactions remain in the log and can be returned to the state before system failure, and transactions can be considered a commit state only after everything is stored in the log.

복제대상 NoSQL DBMS(40)는 소스 RDBMS(30)를 복제한 복제 DBMS로서, 소스 DBMS인 관계형 데이터베이스 관리시스템(RDBMS)과는 다르게 설계된 비관계형(non-relational) DBMS이다. 노에스큐엘(NoSQL)은 테이블-컬럼과 같은 스키마 없이, 분산 환경에서 단순 검색 및 추가 작업을 위한 키 값을 최적화하고, 지연(latency)과 처리율(throughput)이 우수하다. 그리고 대규모 확대가 가능한 수평적인 확장성의 특징을 가지고 있다. 예컨대, NoSQL Document Store는 Document-oriented database라고 불리가도 하며, 테이블 스키마가 정적이지 않고 유동적이어서 레코드마다 다른 스키마를 가질 수 있다. 일반적으로 JSON같은 document를 이용해 record를 저장하므로 RDBS와 달리 트리형 구조를 저장하거나 찾는데 용이하다. NoSQL Document Store 방식의 대표적인 DB로는 MongoDB, Amazone의 DynamoDB, CouchBase 등이 있다.The replication target NoSQL DBMS 40 is a replication DBMS that replicates the source RDBMS 30, and is a non-relational DBMS designed differently from the relational database management system (RDBMS) that is the source DBMS. NoSQL optimizes key values for simple search and additional work in a distributed environment without a schema like a table-column, and has excellent latency and throughput. And it has a feature of horizontal expandability that can be expanded on a large scale. For example, NoSQL Document Store is sometimes called a document-oriented database, and the table schema is not static but flexible, so each record can have a different schema. In general, records are stored using documents such as JSON, so unlike RDBS, it is easy to save or find a tree-type structure. Representative DBs of the NoSQL Document Store method include MongoDB, Amazone's DynamoDB, and CouchBase.

본 발명의 실시예에 따라 소스 RDBMS(30)와 복제대상 NoSQL DBMS(40)를 동기화하는 프로세스는 기본적으로 프록시 서버(Proxy Server) 모드로 동작한다. 즉, 동기화 프록시 서버(20)가 소스 RDBMS(30)의 네트워크 패킷을 중계하면서 DML(INSERT, UPDATE) 패킷을 복사하고, 패킷을 수정하여 확장패킷을 소스 RDBMS(30)로 전송한다. 그리고 소스 RDBMS(30)의 트랜잭션이 완료된 경우, 동기화 프록시 서버(20)는 저장된 DML 트랜잭션 데이터를 NoSQL DBMS(40)의 Document 저장 데이터 포맷으로 변환하여 복제대상 NoSQL DBMS(40)에 저장한다.The process of synchronizing the source RDBMS 30 and the replication target NoSQL DBMS 40 according to the embodiment of the present invention basically operates in a proxy server mode. That is, the synchronization proxy server 20 copies the DML (INSERT, UPDATE) packet while relaying the network packet of the source RDBMS 30, modifies the packet, and transmits the extended packet to the source RDBMS 30. In addition, when the transaction of the source RDBMS 30 is completed, the synchronization proxy server 20 converts the stored DML transaction data to the document storage data format of the NoSQL DBMS 40 and stores it in the replication target NoSQL DBMS 40.

도 2는 본 발명의 실시예에 따라 관계형 데이터베이스의 DML 문장을 NoSQL 데이터베이스로 동기화하기 위한 전체 절차를 도시한 순서도이다.FIG. 2 is a flow chart showing an entire procedure for synchronizing DML sentences of a relational database to a NoSQL database according to an embodiment of the present invention.

도 2를 참조하면, 준비 단계(S11)는 동기화 동작을 하기 위한 초기화 작업을 진행하는 단계로서, 소스 RDBMS(30)의 메타정보, 복구이력을 위해 DML 패킷에 sync_id(sync-iid 혹은 sync_uid) 컬럼을 추가하고, 다음 표 1과 같이 트랜잭션을 제어하기 위한 저장소와 자료구조를 생성하며, 복제대상 NoSQL DBMS(40)로 적재하기 위한 저장소와 자료구조를 생성한다.Referring to FIG. 2, the preparation step S11 is a step of performing an initialization operation for a synchronization operation, and a sync_id (sync-iid or sync_uid) column in a DML packet for meta information of the source RDBMS 30 and a recovery history Add, create a storage and data structure for controlling transactions as shown in Table 1 below, and create a storage and data structure for loading into the NoSQL DBMS 40 to be replicated.

저장소 식별자Storage identifier 저장소 기능Storage function RDB-META-MAPRDB-META-MAP RDBMS 의 테이블 메타정보 저장소RDBMS table meta information storage RDB-TR-DATARDB-TR-DATA RDBMS 트랜잭션 데이터 저장소RDBMS transaction data store RDB-SYNC-MAPRDB-SYNC-MAP RDBMS의 대상 테이블 동기화정보 저장소Storage of target table synchronization information of RDBMS TR-SESSION-MAPTR-SESSION-MAP 세션 단위의 트랜잭션 관리 데이터 저장소Session-level transaction management data storage NoSQL-TR-DATANoSQL-TR-DATA NoSQL의 복제 데이터 저장소NoSQL's replicated data store

트랜잭션 제어 단계(S12)는 프록시 서버 방식으로 네트워크에서 패킷을 수신하여 분석한 후, 소스 RDBMS(30)의 트랜잭션을 내부적으로 관리하고 처리하는 단계로서, NoSQL 데이터 변환 실패 처리를 위해 INSERT, UPDATE와 같은 DML 패킷에 Sync_id 컬럼을 부가한 확장패킷을 소스 RDBMS(30)로 전송한다. 또한 DELETE 변환 실패시 복구를 위해 레코드 삭제시 Sync-iid 컬럼을 저장하는 트리거(trigger)를 생성한다. 여기서, 트랜잭션은 데이터베이스에서 하나의 논리적 기능을 수행하기 위한 일련의 연산집합으로서, 작업의 단위가 된다. 트랙잭션 연산중 롤백(Rollback)은 트랜잭션 중 오류가 발생되어 트랜잭션을 무효로 하기 위해 완료된 데이터베이스 수정사항을 원래상태로 되돌리는 연산이고, 커밋(Commit)은 트랜잭션 처리가 정상적으로 종료되어 트랜잭션이 수행한 변경 내용을 데이터베이스에 반영하는 연산이다.The transaction control step (S12) is a step that internally manages and processes the transaction of the source RDBMS 30 after receiving and analyzing a packet from the network using a proxy server method.In order to handle NoSQL data conversion failures, such as INSERT, UPDATE, etc. The extension packet with the Sync_id column added to the DML packet is transmitted to the source RDBMS 30. In addition, a trigger that saves the Sync-iid column when deleting a record is created for recovery in case of a DELETE conversion failure. Here, a transaction is a set of operations for performing one logical function in the database, and becomes a unit of work. During a transaction operation, rollback is an operation that returns the database modifications completed to invalidate the transaction due to an error occurring during the transaction.Commit is the transaction processing is normally terminated and the changes made by the transaction are restored. This operation is reflected in the database.

NoSQL 변환 단계(S13)는 트랜잭션의 커밋(Commit) 연산된 데이터가 클라이언트(10)에게 전송완료된 후에 해당 NoSQL 변환을 처리하는 단계로서, RDBMS의 트랜잭션 DML을 해당 INSERT NoSQL Document Store, UPDATE NoSQL Document Store, DELETE NoSQL Document Store 저장 방식으로 변환하는 것이다.The NoSQL conversion step (S13) is a step that processes the NoSQL conversion after the transaction's committed data is transferred to the client 10, and the transaction DML of the RDBMS is applied to the INSERT NoSQL Document Store, UPDATE NoSQL Document Store, It is converted to DELETE NoSQL Document Store storage method.

NoSQL 적재 단계(S14)는 NoSQL 변환 단계(S13)에서 변환된 DML NoSQL 데이터를 복제대상 NoSQL DBMS(40)에 적재하는 단계이다.The NoSQL loading step (S14) is a step of loading the DML NoSQL data converted in the NoSQL conversion step (S13) into the replication target NoSQL DBMS (40).

도 3a 및 도 3b는 도 2에 도시된 준비 단계(S11)의 세부 절차를 도시한 순서도이다. 준비 단계(S11)에서는 기본적으로 동기화 동작하기 위한 초기화 작업을 진행한다. 기본적으로 소스 RDBMS(30)와 복제대상 NoSQL DBMS(40)의 동기화을 위한 초기화 작업 진행한다. 첫번째로, 소스 RDBMS(30)의 메타 정보, 복구 이력을 위한 sync_iid와 sync_uid 컬럼을 추가하고, 두번째로 소스 RDBMS(30)의 트랜잭션을 제어하기 위한 저장소와 자료 구조 생성하며, 세번째로 복제대상 NoSQL DBMS(40)로 적재하기 위한 저장소와 자료 구조를 생성한다.3A and 3B are flowcharts illustrating detailed procedures of the preparation step S11 shown in FIG. 2. In the preparation step S11, an initialization operation for a synchronization operation is basically performed. Basically, the initialization work for synchronization between the source RDBMS 30 and the replication target NoSQL DBMS 40 is performed. Firstly, sync_iid and sync_uid columns are added for meta information of the source RDBMS (30) and recovery history, secondly, a repository and data structure to control transactions of the source RDBMS (30) are created, and thirdly, a NoSQL DBMS to be replicated Create a repository and data structure for loading into (40).

도 3a 및 도 3b를 참조하면, 동기화 프록시 서버(20)가 복제대상 NoSQL DBMS(40)로부터 데이터베이스 테이블 목록(항목)과 복제 대상 테이블 정보를 가져온다(S101).3A and 3B, the synchronization proxy server 20 fetches a list of database tables (items) and table information to be replicated from the replication target NoSQL DBMS 40 (S101).

이어 동기화 프록시 서버(20)가 가져온 복제대상 정보에 근거하여 소스 RDBMS(30)로부터 RDBMS의 메타정보를 가져와 RDBMS 메타 정보 저장소(RDB-META-MAP)에 저장한다(S102). 통상적으로 메타 정보 저장소(RDB-META-MAP)는 신속히 접근할 수 있도록 해쉬(HASH) 메모리 형태로 저장한다.Then, based on the replication target information obtained by the synchronization proxy server 20, the meta information of the RDBMS is obtained from the source RDBMS 30 and stored in the RDBMS meta information storage (RDB-META-MAP) (S102). In general, the meta information storage (RDB-META-MAP) is stored in the form of a hash memory for quick access.

그리고 INSERT와 UPDATE 복구를 위해 소스 RDMBS(30)의 복제 대상 테이블마다 Sync_iid와 Sync_uid 컬럼을 추가하고, 디폴트(default) 값을 0으로 설정한다. DELETE 복구를 위해서는 Record 삭제시 Sync-iid 컬럼을 저장하는 트리거(trigger)를 생성한다(S103).In addition, for INSERT and UPDATE recovery, Sync_iid and Sync_uid columns are added for each replication target table of the source RDMBS 30, and the default value is set to 0. For DELETE recovery, a trigger for storing the Sync-iid column is created when the record is deleted (S103).

이어, RDBMS 함수, 연산자, 조건 구문을 NoSQL 함수, 연산자, 조건 구문으로 변환하는 NoSQL 변환기(26)를 로드하고, RDBMS 메타 정보를 바탕으로 복제 대상 NoSQL 테이블을 동기화한다(S104,S105).Next, the NoSQL converter 26 that converts RDBMS functions, operators, and conditional statements into NoSQL functions, operators, and conditional statements is loaded, and the NoSQL tables to be replicated are synchronized based on the RDBMS meta information (S104, S105).

이어 Mongo DB Document JSON 변환모듈이나 DynamoDB Document JSON 변환 모듈과 같이 복제대상 NoSQL DBMS 종류에 따른 데이터 변환 엔진모듈을 로드하고, RDBMS 트랜잭션 데이터를 저장하기 위한 저장소(RDB-TR-DATA)를 매모리와 디스크에 생성한다(S106,S107).Next, load the data conversion engine module according to the type of NoSQL DBMS to be replicated, such as the Mongo DB Document JSON conversion module or DynamoDB Document JSON conversion module, and store the RDBMS transaction data (RDB-TR-DATA) in memory and disk. It is created in (S106, S107).

이어 세션 단위로 트랜잭션을 관리하기 위한 저장소(TR-SESSION-MAP)를 생성하고, 최종적으로 NoSQL 변환된 복제 데이터를 저장하기 위한 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)를 생성한다(S108,S109).Then, a storage (TR-SESSION-MAP) for managing transactions in session units is created, and a NoSQL replicated data storage (NoSQL-TR-DATA) is created to store the final NoSQL converted replication data (S108, S109). ).

그리고 RDBMS의 대상 테이블 동기화 정보 저장소(RDB-SYNC-MAP)을 생성한 후 RDBMS의 대상 테이블의 마지막 동기화 정보(sync_id)를 가져와 동기화 정보 저장소(RDB-SYNC-MAP)에 저장한다. 없을 경우 'KEY = TABLE명 + sync_id'로 키값을 생성한다(S110).And after creating the target table synchronization information storage (RDB-SYNC-MAP) of the RDBMS, the last synchronization information (sync_id) of the target table of the RDBMS is retrieved and stored in the synchronization information storage (RDB-SYNC-MAP). If not, a key value is created with'KEY = TABLE name + sync_id' (S110).

이어 트랜잭션 제어기(24), NoSQL 변환기(26), NoSQL 적재기(28) 등을 생성 및 시작한다(S111).Subsequently, the transaction controller 24, the NoSQL converter 26, the NoSQL loader 28, and the like are created and started (S111).

도 4a 및 4b는 도 2에 도시된 트랜잭션 제어 단계(S12)의 세부 절차를 도시한 순서도이다. 트랜잭션 제어 단계(S12)는 동기화 프록시 서버(20)가 네트워크에서 패킷을 수신하여 분석한 후 소스 RDBMS(30)의 트랜잭션을 내부적으로 관리하고 처리하는 것이며, NoSQL 데이터 변환 실패 처리를 위해 INSERT, UPDATE DML 패킷을 변경하여 소스 RDBMS(30)으로 전송한다.4A and 4B are flowcharts illustrating detailed procedures of the transaction control step S12 shown in FIG. 2. The transaction control step (S12) is to internally manage and process the transaction of the source RDBMS 30 after the synchronization proxy server 20 receives the packet from the network and analyzes it.In order to handle NoSQL data conversion failure, INSERT, UPDATE DML The packet is changed and transmitted to the source RDBMS 30.

도 4a 및 도 4b를 참조하면, 동기화 프록시 서버(20)가 네트워크로부터 프록시 모드로 RDBMS(30)의 패킷을 수집하고, 수집된 패킷을 분석한다(S201,S202).4A and 4B, the synchronization proxy server 20 collects packets of the RDBMS 30 from the network in a proxy mode, and analyzes the collected packets (S201, S202).

분석결과, 신규 세션인가를 판단하여 신규 세션이면 세션키를 생성하여 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 저장한 후, 프록시 서버 모드로 수집된 패킷을 소스 RDBMS(30)로 전송한다(S203~S205).As a result of the analysis, it is determined whether it is a new session, and if it is a new session, a session key is generated and stored in the session-unit transaction management data storage (TR-SESSION-MAP), and then the packet collected in proxy server mode is transmitted to the source RDBMS 30 Do (S203 to S205).

신규 세션이 아니면, 데이터 조작 언어(DML)인지를 판단하여 DML이 아니면 부분 롤백(Roll Back)인지를 판단하여 부분 롤백(Roll Back)이면 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 해당 위치에 롤백 마킹을 처리한 후, 프록시 서버 모드로 수집된 패킷을 소스 RDBMS(30)로 전송한다(S206~S208).If it is not a new session, it determines whether it is a data manipulation language (DML), and if it is not DML, it determines whether it is a partial rollback, and if it is a partial rollback, it is located in the corresponding location of the RDBMS transaction data store (RDB-TR-DATA). After processing the rollback marking, the packet collected in the proxy server mode is transmitted to the source RDBMS 30 (S206 to S208).

부분 롤백이 아니면 커밋(COMMIT)인지를 판단하여 커밋(COMMIT)이면 부분 롤백이 있는 경우 해당 롤백 데이터를 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)에서 삭제 처리한 후, NoSQL 변환기(26)에 세션키와 RDB-TR-DATA 참조값을 포함하는 처리신호를 전송하고, 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에서 RDB-TR-DATA 참조값을 삭제한 후 프록시 서버 모드로 수집된 패킷을 소스 RDBMS(30)로 전송한다(S209~S212).If it is not a partial rollback or a commit (COMMIT), if there is a partial rollback, if there is a partial rollback, the rollback data is deleted from the RDBMS transaction data store (RDB-TR-DATA), and then the session is sent to the NoSQL converter (26). Transmit processing signal including key and RDB-TR-DATA reference value, delete RDB-TR-DATA reference value from session unit transaction management data store (TR-SESSION-MAP), and source the collected packet in proxy server mode It is transmitted to the RDBMS 30 (S209 to S212).

커밋(COMMIT)인지를 판단하여 커밋(COMMIT)이 아니면, 롤백(Roll Back)인지를 판단하여 롤백(Roll Back)이면 해당 세션의 RDBMS 트랜잭션 데이터 자장소(RDB-TR-DATA)의 모든 데이터를 삭제하고, 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에서 RDB-TR-DATA 참조값을 삭제한 후 프록시 서버 모드로 수집된 패킷을 소스 RDBMS(30)로 전송한다(S213~S215).Determining whether it is a commit (COMMIT) and determining whether it is not a commit (COMMIT) or a rollback (Roll Back), and if a rollback (Roll Back), deletes all data in the RDBMS transaction data storage location (RDB-TR-DATA) of the session And, after deleting the RDB-TR-DATA reference value from the session unit transaction management data storage (TR-SESSION-MAP), the packet collected in the proxy server mode is transmitted to the source RDBMS 30 (S213 to S215).

한편, 데이터 조작 언어(DML)인지를 판단하는 단계(S206)에서 DML이면, 도 4b에 도시된 바와 같이, INSERT인지를 판단하여 INSERT이면, 수신 패킷에 Sync_iid 컬럼을 추가하고, 값에 Table.sync_iid를 추가한 확장패킷으로 변경한다(S216,S217).On the other hand, if it is DML in step S206 of determining whether it is a data manipulation language (DML), as shown in FIG. 4B, it is determined whether it is INSERT, and if it is INSERT, a Sync_iid column is added to the received packet, and Table.sync_iid is added to the value Is changed to the added expansion packet (S216, S217).

INSERT가 아니면 UPDATE인지를 판단하여 UPDATE이면, 수신 패킷에 Sync_uid 컬럼을 추가하고, 값(VALUE)에 Table.sync_uid를 추가한 확장패킷으로 변경한다(S218,S219).It determines whether it is UPDATE or INSERT, and if it is UPDATE, the Sync_uid column is added to the received packet, and the value is changed to an extended packet with Table.sync_uid added to the value (S218, S219).

UPDATE가 아니거나 수신 패킷을 확장패킷으로 변경한 후, DML에 따른 Table.sync-iid 또는 Table.sync_uid 값을 1 증가시킨다(S220).After it is not an UPDATE or the received packet is changed to an extended packet, the value of Table.sync-iid or Table.sync_uid according to DML is increased by 1 (S220).

이어, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)가 할당되었는지를 판단하여 RDB-TR-DATA가 할당되어 있지 않으면 RDB-TR-DATA 영역의 저장소를 할당받고, 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 영역에 접근할 참조값(인덱스)을 생성한다(S221,S222).Next, it is determined whether the RDBMS transaction data storage (RDB-TR-DATA) is allocated, and if RDB-TR-DATA is not allocated, the storage of the RDB-TR-DATA area is allocated, and the session-unit transaction management data storage (TR- SESSION-MAP) creates a reference value (index) to access the allocated area of the RDBMS transaction data storage (RDB-TR-DATA) (S221, S222).

그리고 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 데이터 영역에 해당 DML 데이터와 DML 타입에 따른 Sync_iid 또는 Sync_uid값을 함께 저장한 후 변경된 확장패킷을 소스 RDBMS(30)로 전송한다(S223).In addition, after storing the corresponding DML data and the Sync_iid or Sync_uid value according to the DML type in the allocated data area of the RDBMS transaction data storage (RDB-TR-DATA) together, the changed extended packet is transmitted to the source RDBMS 30 (S223).

도 5는 도 2에 도시된 NoSQL 변환 단계의 세부 절차를 도시한 순서도이고, 도 6은 도 5에 도시된 INSERT NoSQL 변환 절차를 도시한 순서도이며, 도 7은 도 5에 도시된 UPDATE NoSQL 변환 절차를 도시한 순서도이고, 도 8은 도 5에 도시된 DELETE NoSQL 변환 절차를 도시한 순서도이며, 도 9는 도 5에 도시된 변환 실패 처리 절차를 도시한 순서도이다. NoSQL 변환 단계(S13)는 소스 RDBMS(30)에서 해당 트랜잭션 데이터 처리가 커밋(COMMIT)된 데이터가 클라이언트에게 전송 완료된 후 NoSQL 변환기(26)에 의해 수행된다. 변환 처리는 크게 INSERT, UPDATE, DELETE RDBMS 데이터를 INSERT, UPDATE, DELETE NoSQL Document store 형식으로 변환하는 것이다.5 is a flow chart showing a detailed procedure of the NoSQL conversion step shown in FIG. 2, FIG. 6 is a flow chart showing the INSERT NoSQL conversion process shown in FIG. 5, and FIG. 7 is a UPDATE NoSQL conversion process shown in FIG. FIG. 8 is a flow chart showing a DELETE NoSQL conversion procedure shown in FIG. 5, and FIG. 9 is a flow chart showing a conversion failure processing procedure shown in FIG. 5. The NoSQL conversion step (S13) is performed by the NoSQL converter 26 after data for which the transaction data processing is committed in the source RDBMS 30 is transferred to the client. The conversion process is to convert INSERT, UPDATE, DELETE RDBMS data into INSERT, UPDATE, DELETE NoSQL Document store format.

도 5를 참조하면, NoSQL 변환기(26)는 트랜잭션 제어기(24)로부터 변환 처리신호를 대기하다가 트랜잭션 데이터 처리신호가 수신되면, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)에서 해당 트랜잭션 데이터를 하나씩 읽어 온다(S301,S302).5, the NoSQL converter 26 waits for a conversion processing signal from the transaction controller 24 and, when a transaction data processing signal is received, reads the corresponding transaction data one by one from the RDBMS transaction data storage (RDB-TR-DATA). Comes (S301, S302).

읽어온 트랜잭션 데이터가 INSERT이면 NoSQL INSERT 문장 변환기를 불러와 도 6에 도시된 바와 같이 INSERT NoSQL 변환 절차를 수행하고, 변환된 RDBMS의 ROW 데이터의 Sync-iid 값을 Table.commit_iid값으로 갱신한다(S305~S307).If the read transaction data is INSERT, the NoSQL INSERT statement converter is called, the INSERT NoSQL conversion procedure is performed as shown in FIG. 6, and the Sync-iid value of the ROW data of the converted RDBMS is updated to the Table.commit_iid value (S305 ~S307).

도 6을 참조하면, NoSQL INSERT 문장 변환기는 Sync_iid가 commit_iid 보다 작은 경우에는 이미 처리된 데이터이므로 리턴하고, Sync_iid가 commit_iid 보다 클 경우 SQL 파싱 및 분석하여 SQL 구문 트리를 생성한다(S401,S402). 이어 테이블 정보 추출하고, View 테이블이면 실제 테이블 명을 사용한다(S403). 소스 RDBMS 메타 정보 저장소(RDB-META-MAP)에서 해당 테이블의 메타 정보를 가져온다(S404).Referring to FIG. 6, when Sync_iid is less than commit_iid, the NoSQL INSERT statement converter returns since data has already been processed, and when Sync_iid is greater than commit_iid, SQL parses and analyzes to generate a SQL statement tree (S401, S402). Then, table information is extracted, and if it is a View table, the actual table name is used (S403). Meta information of the table is retrieved from the source RDBMS meta information storage (RDB-META-MAP) (S404).

이어 파싱 분석과 메타 정보 등으로부터 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환 가능한지를 검사하여 변환 가능하면, INSERT 쿼리(Query)에서 메타 정보를 추출한다(S405,S406).Subsequently, from parsing analysis and meta information, it checks whether the SQL statement (function, procedure, view) can be converted into a NoSQL document, and if it can be converted, meta information is extracted from the INSERT query (S405, S406).

이어 INSERT 퀴리(Query)나 바인드(Bind) 형식에서 데이터를 추출하고, 추출된 메타 정보와 추출된 데이터를 바탕으로 복제대상 NoSQL DBMS 저장 형태의 Document 데이터를 생성한다(S407,S408). 예컨대, 복제대상 NoSQL DBMS(40)가 Mongo DB이면 추출된 메타 정보와 추출된 데이터를 Mongo DB Documnet 데이터로 생성하고, 복제대상 NoSQL DBMS(40)가 Dynamo DB이면 추출된 메타 정보와 추출된 데이터를 Dynamo DB Documnet 데이터로 생성한다.Then, data is extracted from the INSERT query or bind format, and based on the extracted meta information and the extracted data, the document data in the form of storing the NoSQL DBMS to be copied is created (S407, S408). For example, if the NoSQL DBMS 40 to be replicated is Mongo DB, the extracted meta information and the extracted data are created as Mongo DB Documnet data, and if the NoSQL DBMS 40 to be replicated is Dynamo DB, the extracted meta information and the extracted data are Dynamo DB Creates with Documnet data.

그리고 생성된 NoSQL Document 데이터를 세션 키값으로 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 저장한다(S409).Then, the generated NoSQL Document data is stored as a session key value in a NoSQL replicated data storage (NoSQL-TR-DATA) (S409).

한편, 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환할 수 없으면, 변환 실패 처리기를 호출하여 table, insert, Sync-iid와 같은 인자를 전달하고, 변환 실패 처리기는 도 9에 도시된 바와 같이 변환 실패 처리절차를 수행한다(S410).On the other hand, if the SQL statement (function, procedure, view) cannot be converted to a NoSQL document, the conversion failure handler is called to pass parameters such as table, insert, and Sync-iid, and the conversion failure handler is shown in FIG. As described above, the conversion failure processing procedure is performed (S410).

다시 도 5를 참조하면, 읽어온 트랜잭션 데이터가 UPDATE이면, NoSQL UPDATE 문장 변환기를 불러와 도 7에 도시된 바와 같이 UPDATE NoSQL 변환 절차를 수행하고, 변환된 RDBMS의 ROW 데이터의 Sync-uid 값을 Table.commit_uid값으로 갱신한다(S308~S310). Referring back to FIG. 5, if the read transaction data is UPDATE, a NoSQL UPDATE sentence converter is called, the UPDATE NoSQL conversion procedure is performed as shown in FIG. 7, and the Sync-uid value of the ROW data of the converted RDBMS is table It is updated to the value of .commit_uid (S308 to S310).

도 7을 참조하면, NoSQL UPDATE 문장 변환기는 Sync_uid가 commit_uid 보다 작은 경우에는 이미 처리된 데이터이므로 리턴하고, Sync_uid가 commit_uid 보다 클 경우 SQL 파싱 및 분석하여 SQL 구문 트리를 생성한다(S501,S502). 이어 테이블 정보 추출하고, View 테이블이면 실제 테이블 명을 사용한다(S503). RDBMS 메타 정보 저장소(RDB-META-MAP)에서 해당 테이블의 메타 정보를 가져온다(S504).Referring to FIG. 7, when Sync_uid is smaller than commit_uid, the NoSQL UPDATE statement converter returns data that has already been processed, and when Sync_uid is greater than commit_uid, SQL parses and analyzes to generate SQL syntax trees (S501, S502). Then, table information is extracted, and if it is a view table, the actual table name is used (S503). Meta information of the table is retrieved from the RDBMS meta information storage (RDB-META-MAP) (S504).

이어 파싱 분석과 메타 정보 등으로부터 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환 가능한지를 검사하여 변환 가능하면, SET절과 WHERE 절에서 메타 정보를 추출한다(S505,S506).Then, from parsing analysis and meta information, it checks whether the SQL statement (function, procedure, view) can be converted into a NoSQL document, and if it can be converted, meta information is extracted from the SET clause and the WHERE clause (S505, S506).

이어 UPDATE 퀴리(Query)나 바인드(Bind) 형식에서 데이터를 추출하고, 추출된 메타 정보와 추출된 데이터를 바탕으로 복제대상 NoSQL DBMS 저장형태의 Document 데이터를 생성한다(S507,S508). 예컨대, 복제대상 NoSQL DBMS(40)가 Mongo DB이면 추출된 메타 정보와 추출된 데이터를 Mongo DB Documnet 데이터로 생성하고, 복제대상 NoSQL DBMS(40)가 Dynamo DB이면 추출된 메타 정보와 추출된 데이터를 Dynamo DB Documnet 데이터로 생성한다.Then, data is extracted from the UPDATE query or bind format, and based on the extracted meta-information and the extracted data, the document data of the NoSQL DBMS storage format to be replicated is created (S507, S508). For example, if the NoSQL DBMS 40 to be replicated is Mongo DB, the extracted meta information and the extracted data are created as Mongo DB Documnet data, and if the NoSQL DBMS 40 to be replicated is Dynamo DB, the extracted meta information and the extracted data are Dynamo DB Creates with Documnet data.

그리고 세션 키값으로 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 생성된 NoSQL Document 데이터를 저장한다(S509).Then, the created NoSQL Document data is stored in the NoSQL replicated data store (NoSQL-TR-DATA) as the session key value (S509).

한편, 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환할 수 없으면, 변환 실패 처리기를 호출하여 table, update, Sync-uid와 같은 인자를 전달하고, 변환 실패 처리기는 도 9에 도시된 바와 같이 변환 실패 처리절차를 수행한다(S510).On the other hand, if the SQL statement (function, procedure, view) cannot be converted to a NoSQL document, the conversion failure handler is called to pass parameters such as table, update, and Sync-uid, and the conversion failure handler is shown in FIG. As described above, the conversion failure processing procedure is performed (S510).

다시 도 5를 참조하면, 읽어온 트랜잭션 데이터가 DELETE이면, NoSQL DELETE 문장 변환기를 불러와 도 8에 도시된 바와 같이 DELETE NoSQL 변환 절차를 수행한다(S311,S312). 그리고 읽어온 트랜잭션 데이터가 마지막(End)이면, NoSQL 적재기(28)에 적재 신호를 보낸다(S303,S304).Referring back to FIG. 5, if the read transaction data is DELETE, a NoSQL DELETE sentence converter is called and a DELETE NoSQL conversion procedure is performed as shown in FIG. 8 (S311, S312). And, if the read transaction data is the last (End), a load signal is sent to the NoSQL loader 28 (S303, S304).

도 8을 참조하면, NoSQL DELETE 문장 변환기는 SQL 파싱 및 분석하여 SQL 구문 트리를 생성한다(S601). 이때, Sync_iid가 commit_iid 보다 작은 경우에는 이미 처리된 데이터이므로 리턴하고, Sync_iid가 commit_iid 보다 클 경우에만 수행하는 것이 바람직하다. 즉, DELETE 문장은 레코드 삭제시 Sync-iid 컬럼을 저장하는 트리거(trigger)를 생성하므로 Sync_iid를 이용할 수 있다.Referring to FIG. 8, the NoSQL DELETE sentence converter parses and analyzes SQL to generate an SQL syntax tree (S601). At this time, if Sync_iid is less than commit_iid, it is already processed data, so it is desirable to return it, and to execute it only when Sync_iid is greater than commit_iid. That is, the DELETE statement generates a trigger that stores the Sync-iid column when deleting a record, so Sync_iid can be used.

이어 테이블 정보 추출하고, View 테이블이면 실제 테이블 명을 사용한다(S602). 소스 RDBMS 메타 정보 저장소(RDB-META-MAP)에서 해당 테이블의 메타 정보를 가져온다(S603).Then, table information is extracted, and if it is a View table, the actual table name is used (S602). Meta information of the table is retrieved from the source RDBMS meta information storage (RDB-META-MAP) (S603).

이어 파싱 분석 결과와 테이블의 메타 정보 등을 이용하여 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환 가능한지를 검사하여 변환 가능하면, WHERE 절에서 메타 정보를 추출한다. WHERE 절이 없는 경우에는 전체 데이터 삭제로 처리한다(S604~S606).Then, using the parsing analysis result and meta information of the table, it checks whether the SQL statement (function, procedure, view) can be converted into a NoSQL document, and if it can be converted, the meta information is extracted from the WHERE clause. If there is no WHERE clause, the entire data is deleted (S604~S606).

이어 추출된 메타 정보를 바탕으로 복제대상 NoSQL DBMS 저장 형태의 Document 데이터를 생성한다(S607). 예컨대, 복제대상 NoSQL DBMS(40)가 Mongo DB이면 추출된 메타 정보를 Mongo DB Documnet 데이터로 생성하고, 복제대상 NoSQL DBMS(40)가 Dynamo DB이면 추출된 메타 정보를 Dynamo DB Documnet 데이터로 생성한다.Then, based on the extracted meta information, the document data in the form of storing the NoSQL DBMS to be replicated is created (S607). For example, if the replication target NoSQL DBMS 40 is Mongo DB, the extracted meta information is created as Mongo DB Documnet data, and if the replication target NoSQL DBMS 40 is Dynamo DB, the extracted meta information is created as Dynamo DB Documnet data.

그리고 세션 키값으로 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 생성된 NoSQL Document 데이터를 저장한다(S608).Then, the generated NoSQL Document data is stored in the NoSQL replicated data storage (NoSQL-TR-DATA) as the session key value (S608).

한편, 해당 SQL 문장(함수, 프로시저, View)을 NoSQL Document로 변환할 수 없으면, 변환 실패 처리기를 호출하여 table, delete와 같은 인자를 전달하고, 변환 실패 처리기는 도 9에 도시된 바와 같이 변환 실패 처리절차를 수행한다(S609).On the other hand, if the SQL statement (function, procedure, view) cannot be converted to a NoSQL document, the conversion failure handler is called and parameters such as table and delete are transmitted, and the conversion failure handler is converted as shown in FIG. The failure processing procedure is performed (S609).

도 9를 참조하면, 변환 실패 처리기는 INSERT, UPDATE, DELETE 변환 실패시 소스 RDBMS(30)에서 해당 복구 데이터를 가져와 동기화 한다.Referring to FIG. 9, when an INSERT, UPDATE, and DELETE conversion fails, the conversion failure handler fetches and synchronizes the corresponding recovery data from the source RDBMS 30.

변환 실패 처리기는 변환 실패 DML 절차로부터 NoSQL-TR-DATA 세션키, table 명, DML type, sync_id(sync_iid/uid) 등과 같은 인자를 수신한다(S701).The conversion failure handler receives parameters such as a NoSQL-TR-DATA session key, table name, DML type, and sync_id (sync_iid/uid) from the conversion failure DML procedure (S701).

수신된 인자가 DML INSERT이면, 복구 Sync_iid 값(복구범위)을 계산한 후 복구범위에 해당하는 소스 RDBMS의 해당 테이블의 Sync_iid가 복구 Sync_iid보다 작은 데이터를 모두 가져온다(S702~S704).If the received factor is DML INSERT, after calculating the recovery Sync_iid value (recovery range), all data whose Sync_iid of the corresponding table of the source RDBMS corresponding to the recovery range is less than the recovery Sync_iid are retrieved (S702 to S704).

이어 테이블의 메타 정보와 소스 RDBMS(30)에서 가져온 데이터를 바탕으로 INSERT 형식의 NoSQL Document 데이터를 생성하고, NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 세션 키값으로 생성된 NoSQL Document 데이터를 저장한다(S705).Then, based on the meta information of the table and the data obtained from the source RDBMS (30), INSERT-type NoSQL Document data is created, and the NoSQL Document data created as a session key value is stored in the NoSQL replication data store (NoSQL-TR-DATA). (S705).

수신된 인자가 DML UPDATE이면, 복구 Sync_uid 범위값을 계산하고, 소스 DBMS(30)의 해당 테이블에서 Sync_uid가 복구 Sync_uid 보다 작은 데이터를 모두 가져온다(S706~S708).If the received factor is DML UPDATE, the recovery Sync_uid range value is calculated, and all data whose Sync_uid is smaller than the recovery Sync_uid from the corresponding table of the source DBMS 30 are fetched (S706 to S708).

이어 테이블의 메타 정보와 소스 RDBMS(30)에서 가져온 데이터를 바탕으로 UPDATE 형식의 NoSQL Document 데이터를 생성한다(S709). 이때 갱신조건은 프라이머리 키(PK)를 사용하는 것이 바람직하다.Then, based on the meta-information of the table and the data obtained from the source RDBMS (30), UPDATE-type NoSQL Document data is generated (S709). At this time, it is preferable to use a primary key (PK) as an update condition.

그리고 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 세션 키값으로 생성된 NoSQL Document 데이터를 저장한다(S713).Then, the NoSQL document data generated as the session key value is stored in the NoSQL replicated data storage (NoSQL-TR-DATA) (S713).

수신된 인자가 DML DELETE 이면, 소스 RDBMS(30)의 해당 테이블의 트리거 테이블에서 삭제된 정보(Sync_iid) 목록을 가져온다(S710,S711).If the received argument is DML DELETE, a list of information (Sync_iid) deleted from the trigger table of the corresponding table of the source RDBMS 30 is retrieved (S710, S711).

이어 테이블의 메타 정보와 소스 RDBMS(30)에서 가져온 데이터를 바탕으로 DELETE 형식의 NoSQL Document 데이터를 생성한다(S712). 이때 삭제 조건은 트리거 테이블의 Sync_iid를 사용한다. Next, DELETE-type NoSQL Document data is generated based on the meta information of the table and the data obtained from the source RDBMS 30 (S712). At this time, the deletion condition uses Sync_iid of the trigger table.

그리고 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 세션 키값으로 생성된 NoSQL Document 데이터를 저장한다(S713).Then, the NoSQL document data generated as the session key value is stored in the NoSQL replicated data storage (NoSQL-TR-DATA) (S713).

도 10은 도 2에 도시된 NoSQL 적재 단계의 세부 절차를 도시한 순서도이다.10 is a flow chart showing a detailed procedure of the NoSQL loading step shown in FIG. 2.

도 10을 참조하면, NoSQL 적재기(28)는 NOSQL 적재신호가 수신되면, 복제대상 NoSQL DBMS(40)에 접속한다(S801,S802).Referring to FIG. 10, when the NOSQL load signal is received, the NoSQL loader 28 connects to the replication target NoSQL DBMS 40 (S801, S802).

NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에서 세션 키와 트랜잭션 키의 조합에 해당하는 Document 데이터를 하나씩 순차적으로 읽어 온다(S803).Document data corresponding to a combination of a session key and a transaction key are sequentially read one by one from the NoSQL replicated data store (NoSQL-TR-DATA) (S803).

읽어온 데이터가 있으면 읽어온 데이터를 해당 NoSQL DBMS(40)에 적재하고, 모든 데이터를 읽어와 더 이상 읽어올 데이터가 없으면 해당 NoSQL 복제 데이터 저장소(NoSQL-TR-DATA)에 저장된 Document 데이터를 삭제한다(S804~S806).If there is data read, the read data is loaded into the NoSQL DBMS(40), and if there is no more data to be read, the document data stored in the NoSQL replication data store (NoSQL-TR-DATA) is deleted. (S804 to S806).

도 11은 본 발명의 실시예에 따라 소스 RDBMS가 NoSQL Document로 변환된 예이다. 도 11을 참조하면, RDBMS의 INSERT와 UPDATE 문장이 트랜잭션 제어를 통해 NoSQL Document 형식으로 변환된 것을 알 수 있다.11 is an example in which a source RDBMS is converted to a NoSQL document according to an embodiment of the present invention. Referring to FIG. 11, it can be seen that the INSERT and UPDATE statements of the RDBMS are converted into NoSQL Document format through transaction control.

이상에서 본 발명은 도면에 도시된 일 실시예를 참고로 설명되었으나, 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. In the above, the present invention has been described with reference to one embodiment shown in the drawings, but those of ordinary skill in the art will understand that various modifications and other equivalent embodiments are possible therefrom.

10: RDBMS DML 발생 클라이언트 20: 동기화 프록시 서버
22: 준비모듈 24: 트랜잭션 제어기
26: NoSQL 변환기 28: NoSQL 적재기
30: 소스 RDBMS 40: 복제대상 NoSQL DBMS
10: RDBMS DML generation client 20: Synchronization proxy server
22: preparation module 24: transaction controller
26: NoSQL converter 28: NoSQL loader
30: source RDBMS 40: replication target NoSQL DBMS

Claims (5)

동기화 프록시 서버가 RDBMS의 메타정보, 복구이력을 위한 Sync_iid와 Sync_uid 컬럼을 추가하고, 트랜잭션을 제어하기 위한 저장소와 자료구조를 생성하며, NoSQL DBMS로 적재하기 위한 저장소와 자료구조를 생성하여 동기화 동작의 초기화 작업을 수행하는 준비 단계와, 상기 동기화 프록시 서버가 네트워크에서 패킷을 수신하여 분석한 후, NoSQL 데이터 변환 실패 처리를 위해 INSERT, UPDATE의 DML을 변경하여 RDBMS의 트랜잭션을 내부적으로 관리하고 처리하는 트랜잭션 제어 단계와, 상기 동기화 프록시 서버가 트랜잭션의 커밋(Commit) 연산된 데이터가 클라이언트에게 전송완료된 후에 해당 NoSQL 변환을 처리하는 NoSQL 변환 단계와, 상기 NoSQL 변환 단계에서 변환된 DML NoSQL 데이터를 복제 NoSQL DBMS에 적재하는 NoSQL 적재 단계를 포함하는 관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법에 있어서,
상기 준비 단계는
소스 RDBMS의 메타 정보, 복구 이력을 위한 Sync_iid와 Sync_uid 컬럼을 추가하는 단계와, RDBMS의 트랜잭션을 제어하기 위한 저장소와 자료 구조 생성하는 단계와, NoSQL DBMS로 적재하기 위한 저장소와 자료 구조를 생성하는 단계를 포함하고,
상기 트랜잭션 제어 단계는
동기화 프록시 서버가 네트워크로부터 RDBMS의 패킷을 수집하여 분석하는 단계와, 신규 세션이면, 세션키를 생성하여 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 저장하는 단계와, 신규 세션이 아니면, 데이터 조작 언어(DML)인지를 판단하여 데이터 조작 언어(DML)가 아니면 부분 롤백(Roll Back)이나 커밋(COMMIT) 혹은 롤백(Roll Back)을 처리하는 단계와, INSERT 데이터 조작 언어(DML)이면 수신 패킷에 Sync_iid 컬럼을 추가하고, 값(VALUE)에 Table.sync_iid를 추가한 확장패킷으로 변경하는 단계와, UPDATE 데이터 조작 언어(DML)이면, 수신 패킷에 Sync_uid 컬럼을 추가하고, 값(VALUE)에 Table.sync_uid를 추가한 확장패킷으로 변경하는 단계와, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)가 할당되어 있지 않으면 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 영역을 할당하고, 세션 단위 트랜잭션 관리 데이터 저장소(TR-SESSION-MAP)에 RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 영역에 접근할 참조값을 생성하는 단계와, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)의 할당 영역에 해당 DML 데이터와 DML 타입에 따른 Sync_iid 또는 Sync_uid값을 함께 저장한 후 확장패킷을 소스 RDBMS로 전송하는 단계를 포함하며,
상기 NoSQL 변환 단계는
트랜잭션 제어기로부터 트랜잭션 데이터 처리신호가 수신되면, RDBMS 트랜잭션 데이터 저장소(RDB-TR-DATA)에서 해당 트랜잭션 데이터를 하나씩 읽어 오는 단계와, 읽어온 트랜잭션 데이터가 INSERT이면, NoSQL INSERT 문장 변환기를 불러와 INSERT NoSQL 변환 절차를 수행하고, 변환된 소스 RDBMS의 ROW 데이터의 Sync-iid 값을 Table.commit_iid값으로 갱신하는 단계와, 읽어온 트랜잭션 데이터가 UPDATE이면, NoSQL UPDATE 문장 변환기를 불러와 UPDATE NoSQL 변환 절차를 수행하고, 변환된 소스 RDBMS의 ROW 데이터의 Sync-uid 값을 Table.commit_uid값으로 갱신하는 단계와, 읽어온 트랜잭션 데이터가 DELETE이면, NoSQL DELETE 문장 변환기를 불러와 DELETE NoSQL 변환 절차를 수행하는 단계를 포함하는 것을 특징으로 하는 관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법.
Synchronization proxy server adds Sync_iid and Sync_uid columns for meta information of RDBMS and recovery history, creates storage and data structure to control transactions, and creates storage and data structure for loading into NoSQL DBMS to perform synchronization operation. A transaction in which the RDBMS transaction is internally managed and processed by changing the DML of INSERT and UPDATE to handle NoSQL data conversion failure after the preparation step of performing the initialization operation and the synchronization proxy server receives and analyzes the packet from the network The control step, the NoSQL conversion step of processing the NoSQL conversion after the synchronization proxy server completes the transmission of the transaction's committed data to the client, and the DML NoSQL data converted in the NoSQL conversion step to the replication NoSQL DBMS. In the transaction control method for synchronizing DML statements of a relational database including the loading step of loading NoSQL to a NoSQL database,
The preparation step
The steps of adding Sync_iid and Sync_uid columns for meta information of the source RDBMS and recovery history, creating a storage and data structure to control transactions of the RDBMS, and creating a storage and data structure for loading into a NoSQL DBMS Including,
The transaction control step
The synchronization proxy server collects and analyzes packets of the RDBMS from the network; if it is a new session, generates a session key and stores it in a session-level transaction management data store (TR-SESSION-MAP); and if it is not a new session, Determining whether it is a data manipulation language (DML) and processing a partial rollback, commit, or rollback if it is not a data manipulation language (DML), and receiving an INSERT data manipulation language (DML) Add a Sync_iid column to the packet and change it to an extended packet with Table.sync_iid added to the value (VALUE).In the case of UPDATE data manipulation language (DML), add a Sync_uid column to the received packet, and add the value (VALUE). Steps of changing Table.sync_uid to the added extended packet, and if the RDBMS transaction data storage (RDB-TR-DATA) is not allocated, allocates an area of the RDBMS transaction data storage (RDB-TR-DATA), and performs session-based transactions. Creating a reference value to access the allocated area of the RDBMS transaction data store (RDB-TR-DATA) in the management data store (TR-SESSION-MAP) and the allocation area of the RDBMS transaction data store (RDB-TR-DATA). It includes the step of storing the corresponding DML data and the Sync_iid or Sync_uid value according to the DML type together, and then transmitting the extended packet to the source RDBMS,
The NoSQL conversion step is
When a transaction data processing signal is received from the transaction controller, the transaction data is read one by one from the RDBMS transaction data storage (RDB-TR-DATA). If the read transaction data is INSERT, a NoSQL INSERT statement converter is called and INSERT NoSQL Execute the conversion procedure, update the Sync-iid value of the converted source RDBMS ROW data to the Table.commit_iid value, and if the read transaction data is UPDATE, call the NoSQL UPDATE statement converter and perform the UPDATE NoSQL conversion procedure. And updating the Sync-uid value of the converted source RDBMS's ROW data to the Table.commit_uid value, and if the read transaction data is DELETE, calling a NoSQL DELETE statement converter and performing a DELETE NoSQL conversion procedure. A transaction control method for synchronizing DML statements of a relational database to a NoSQL database, characterized in that.
삭제delete 삭제delete 삭제delete 제1항에 있어서, 상기 NoSQL 변환 단계는
읽어온 트랜잭션 데이터가 마지막(End)이면, NoSQL 적재기에 적재 신호를 전송하는 단계를 더 포함하는 관계형 데이터베이스의 DML문장을 NoSQL 데이터베이스로 동기화하기 위한 트랜잭션 제어 방법.
The method of claim 1, wherein the NoSQL conversion step
A transaction control method for synchronizing DML statements from a relational database to a NoSQL database, further comprising transmitting a load signal to the NoSQL loader when the read transaction data is the end.
KR1020190009227A 2019-01-24 2019-01-24 Transaction control method to synchronize DML statements in relational database to NoSQL database KR102174957B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190009227A KR102174957B1 (en) 2019-01-24 2019-01-24 Transaction control method to synchronize DML statements in relational database to NoSQL database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190009227A KR102174957B1 (en) 2019-01-24 2019-01-24 Transaction control method to synchronize DML statements in relational database to NoSQL database

Publications (2)

Publication Number Publication Date
KR20200092095A KR20200092095A (en) 2020-08-03
KR102174957B1 true KR102174957B1 (en) 2020-11-05

Family

ID=72042972

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190009227A KR102174957B1 (en) 2019-01-24 2019-01-24 Transaction control method to synchronize DML statements in relational database to NoSQL database

Country Status (1)

Country Link
KR (1) KR102174957B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220099380A (en) 2021-01-06 2022-07-13 주식회사 에비드넷 The system and method of making the flow chart database

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102410251B1 (en) * 2020-02-28 2022-06-24 (주)시즐 Apparatus for nonrelationlal database using relational database structure and data standardization method thereof
CN115391457B (en) * 2022-08-23 2023-09-12 昆仑数智科技有限责任公司 Cross-database data synchronization method, device and storage medium
CN116644086B (en) * 2023-05-24 2024-02-20 上海沄熹科技有限公司 SST-based Insert SQL statement implementation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013140488A (en) * 2012-01-04 2013-07-18 Hitachi Ltd System performance analyzer, system performance analysis method and system performance analysis program
KR101672724B1 (en) * 2015-05-08 2016-11-04 주식회사 엘지유플러스 Middle-tier, data processing system including the same, and method of database transferring
KR101917806B1 (en) * 2017-12-22 2018-11-12 주식회사 웨어밸리 Synchronization Error Detection AND Replication Method of Database Replication System Using SQL Packet Analysis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170075092A (en) * 2015-12-22 2017-07-03 주식회사 와이즈넛 MANAGEMENT METHOD FOR DATA STABILITY OF NoSQL ON DISTRIBUTED FILE SYSTEM

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013140488A (en) * 2012-01-04 2013-07-18 Hitachi Ltd System performance analyzer, system performance analysis method and system performance analysis program
KR101672724B1 (en) * 2015-05-08 2016-11-04 주식회사 엘지유플러스 Middle-tier, data processing system including the same, and method of database transferring
KR101917806B1 (en) * 2017-12-22 2018-11-12 주식회사 웨어밸리 Synchronization Error Detection AND Replication Method of Database Replication System Using SQL Packet Analysis

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220099380A (en) 2021-01-06 2022-07-13 주식회사 에비드넷 The system and method of making the flow chart database

Also Published As

Publication number Publication date
KR20200092095A (en) 2020-08-03

Similar Documents

Publication Publication Date Title
KR102174957B1 (en) Transaction control method to synchronize DML statements in relational database to NoSQL database
KR102307371B1 (en) Data replication and data failover within the database system
CN108475271B (en) Application container of container database
US9009116B2 (en) Systems and methods for synchronizing data in a cache and database
US8892509B2 (en) Systems and methods for a distributed in-memory database
US8117153B2 (en) Systems and methods for a distributed cache
EP1840766B1 (en) Systems and methods for a distributed in-memory database and distributed cache
US20090012932A1 (en) Method and System For Data Storage And Management
US6622152B1 (en) Remote log based replication solution
US10191932B2 (en) Dependency-aware transaction batching for data replication
US8504523B2 (en) Database management system
US8401994B2 (en) Distributed consistent grid of in-memory database caches
US11263236B2 (en) Real-time cross-system database replication for hybrid-cloud elastic scaling and high-performance data virtualization
NO20171080A1 (en) Apparatus and methods of data synchronization
CN113535656B (en) Data access method, device, equipment and storage medium
EP3532945A1 (en) Facilitating operations on pluggable databases using separate logical timestamp services
EP2380090B1 (en) Data integrity in a database environment through background synchronization
CN111984696A (en) Novel database and method
JP2017534986A (en) Online scheme and data conversion
Okardi et al. Overview of distributed database system
CN113641686B (en) Data processing method, data processing apparatus, electronic device, storage medium, and program product
US11106698B2 (en) Multi-master with ownership transfer
WO2024027459A1 (en) Method and apparatus for creating global secondary index in distributed database
US20230068358A1 (en) Using self-maintaining structure information for faster data access
CN115700489A (en) Emergency switching method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right