KR20240040262A - Automatic registration system for static data and its operation method - Google Patents

Automatic registration system for static data and its operation method Download PDF

Info

Publication number
KR20240040262A
KR20240040262A KR1020220119065A KR20220119065A KR20240040262A KR 20240040262 A KR20240040262 A KR 20240040262A KR 1020220119065 A KR1020220119065 A KR 1020220119065A KR 20220119065 A KR20220119065 A KR 20220119065A KR 20240040262 A KR20240040262 A KR 20240040262A
Authority
KR
South Korea
Prior art keywords
database server
synchronization
materialized view
data
database
Prior art date
Application number
KR1020220119065A
Other languages
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 KR1020220119065A priority Critical patent/KR20240040262A/en
Publication of KR20240040262A publication Critical patent/KR20240040262A/en

Links

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/23Updating
    • G06F16/2393Updating materialised views
    • 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/23Updating
    • G06F16/2308Concurrency control
    • 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
    • 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)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 일 실시예에 따라서, 스태틱 데이터의 자동 등록 시스템 및 그 동작방법이 개시된다. 상기 방법은: 제 1 데이터베이스 서버의 원격에 위치한 제 2 데이터베이스 서버에 존재하는 실체화 뷰(Materialized View)에 대한 동기화를 수행할 것을 결정하는 단계; 동기화 수행 결정에 응답하여, 상기 제 2 데이터베이스 서버로 전송될 동기화 명령을 생성하는 단계; 및 상기 생성된 동기화 명령을 상기 제 2 데이터베이스 서버로 전송하여, 상기 제 2 데이터베이스 서버로 하여금 상기 제 2 데이터베이스 서버에 존재하는 상기 실체화 뷰와 상기 제 1 데이터베이스 서버에 존재하는 상기 마스터 테이블 간의 동기화를 수행하도록 하는 단계를 포함할 수 있다.According to an embodiment of the present invention, an automatic registration system for static data and a method of operating the same are disclosed. The method includes: determining to perform synchronization on a materialized view existing in a second database server located remotely from the first database server; In response to a decision to perform synchronization, generating a synchronization command to be transmitted to the second database server; and transmitting the generated synchronization command to the second database server, causing the second database server to perform synchronization between the materialized view existing in the second database server and the master table existing in the first database server. It may include steps to do so.

Description

스태틱 데이터의 자동 등록 시스템 및 그 동작방법{Automatic registration system for static data and its operation method}Automatic registration system for static data and its operation method}

본 발명은 스태틱 데이터의 자동 등록 시스템 및 그 동작방법에 관한 것으로 클라우드 시스템과 같은 온라인 문서 작성기로 작성한 데이터를 자동으로 동기화하여 등록시켜 주는 시스템 및 그 동작방법에 관한 것이다.The present invention relates to an automatic registration system for static data and a method of operating the same. It relates to a system and a method of operating the same that automatically synchronize and register data created with an online document writer such as a cloud system.

스태틱 데이터(static data, 정적 데이터)란 메모리에 데이터를 로드한 상태에서 필요할 때마다 데이터를 호출하여 사용하는 데이터를 의미하며, 서버에서 실시간으로 변환되어 적용되는 다이내믹 데이터(dynamic data, 동적 데이터)와 구분될 수 있다.Static data refers to data that is loaded into memory and used by calling the data whenever necessary, and dynamic data that is converted and applied in real time on the server. can be distinguished.

데이터베이스 관리 시스템(DBMS)에서 데이터들은 데이터 저장소에 저장될 수 있다. 관계형 데이터베이스 관리 시스템(RDBMS)에서는 이러한 데이터 저장소는 테이블로 지칭될 수 있다. 이러한 테이블은 하나 이상의 로우들을 포함하고 하나 이상의 로우들 각각은 하나 이상의 컬럼들을 포함할 수 있다.In a database management system (DBMS), data can be stored in a data store. In a relational database management system (RDBMS), these data stores may be referred to as tables. This table includes one or more rows, and each of the one or more rows may include one or more columns.

데이터베이스가 수많은 양의 데이터를 포함하고 있는 경우, 사용자가 관심있어 하는 데이터를 리트리브하기 위한 쿼리를 수행하는데 있어서 상대적으로 긴 시간이 소요될 수 있다. 데이터베이스가 쿼리에 응답하는데 시간이 많이 소요되는 경우에는 데이터베이스의 성능에 있어서 악영향을 미칠 수 있다.If a database contains a large amount of data, it may take a relatively long time to perform a query to retrieve data of interest to the user. If the database takes a lot of time to respond to queries, it can have a negative impact on the performance of the database.

이러한 상황에서는 자주 그리고 다수의 사용자에 의해 액세스되는 컬럼 또는 테이블 등으로의 직접적인 액세스를 제한하는 것이 바람직하다. 이러한 문제는, 해당 컬럼 또는 테이블로의 직접적인 액세스가 아닌, "뷰(view)"를 통하여 해당 컬럼 또는 테이블로의 간접적인 액세스를 수행하는 경우 해결될 수 있다. 이러한 "뷰"는 하나 이상의 마스터 테이블로부터 유도된 마스터 테이블과 같은 형태의 물리적으로 존재하지 않는 가상의 또는 논리적인 테이블을 의미할 수 있다. 즉, 뷰를 실행하는 경우 정의된 쿼리의 결과 세트가 메모리 상에 생성되며, 세션이 종료되는 경우 해당 결과 세트는 사라지게 된다.In these situations, it is desirable to limit direct access to columns or tables that are accessed frequently and by multiple users. This problem can be solved by performing indirect access to the column or table through a “view” rather than direct access to the column or table. This “view” may refer to a virtual or logical table that does not physically exist in the same form as the master table, derived from one or more master tables. In other words, when a view is executed, the result set of the defined query is created in memory, and when the session ends, the result set disappears.

한편, 동기화 프레임워크는 다양한 장치 또는 기기가 데이터를 장치 또는 동기화 서버 및/또는 외부 파트너로부터 인터넷을 통하는 것과 같은 네트워크 연결을 통해 송신하는 것을 허용한다. 동기화는 사용자의 요청에 따라, 주기적 간격으로, 또는 실시간으로 데이터의 트리거링 동기화를 통해 달성될 수 있다. 예를 들어, 동기화 이벤트는 제시되는 데이터와 관련된 정보를 동기화하기 위해(예를 들어, "나의 마지막 페이지 판독을 기록하기 위해") 사용자에 의해 발생되는 표시된 지시 또는 명령에 대응할 수 있다.Meanwhile, the synchronization framework allows various devices or appliances to transmit data from the device or a synchronization server and/or an external partner over a network connection, such as over the Internet. Synchronization can be achieved through triggering synchronization of data upon user request, at periodic intervals, or in real time. For example, a synchronization event may correspond to a displayed instruction or command issued by the user to synchronize information associated with the data being presented (e.g., “to record my last page read”).

본 발명은 효율적인 방식으로 데이터베이스들 간의 쿼리 결과 동기화를 구현하기 위함이다.The purpose of the present invention is to implement synchronization of query results between databases in an efficient manner.

본 발명은 데이터베이스들 간의 실체화 뷰에 대한 고속 리프레시(fast refresh)를 구현하기 위함이다.The purpose of the present invention is to implement fast refresh of materialized views between databases.

본 발명의 일 실시예에 따라서, 스태틱 데이터의 자동 등록 방법이 개시된다. 상기 방법은: 제 1 데이터베이스 서버의 원격에 위치한 제 2 데이터베이스 서버에 존재하는 실체화 뷰(Materialized View)에 대한 동기화를 수행할 것을 결정하는 단계; 동기화 수행 결정에 응답하여, 상기 제 2 데이터베이스 서버로 전송될 동기화 명령을 생성하는 단계; 및 상기 생성된 동기화 명령을 상기 제 2 데이터베이스 서버로 전송하여, 상기 제 2 데이터베이스 서버로 하여금 상기 제 2 데이터베이스 서버에 존재하는 상기 실체화 뷰와 상기 제 1 데이터베이스 서버에 존재하는 상기 마스터 테이블 간의 동기화를 수행하도록 하는 단계를 포함할 수 있다.According to an embodiment of the present invention, a method for automatically registering static data is disclosed. The method includes: determining to perform synchronization on a materialized view existing in a second database server located remotely from the first database server; In response to a decision to perform synchronization, generating a synchronization command to be transmitted to the second database server; and transmitting the generated synchronization command to the second database server, causing the second database server to perform synchronization between the materialized view existing in the second database server and the master table existing in the first database server. It may include steps to do so.

본 발명의 일 실시예에 따라서, 제 2 데이터베이스 서버에서 수행되는 데이터베이스들 간의 쿼리 결과를 동기화하기 위한 방법이 개시된다. 상기 방법은: 상기 제 2 데이터베이스 서버의 원격에 위치한 제 1 데이터베이스 서버로부터의 동기화 명령을 수신하는 단계; 및 상기 수신된 동기화 명령에 응답하여, 상기 제 2 데이터베이스 서버에 존재하는 상기 실체화 뷰와 상기 제 1 데이터베이스 서버에 존재하는 상기 마스터 테이블 간의 동기화를 수행하는 단계를 포함할 수 있다.According to an embodiment of the present invention, a method for synchronizing query results between databases performed on a second database server is disclosed. The method includes: receiving a synchronization command from a first database server located remotely from the second database server; And in response to the received synchronization command, it may include performing synchronization between the materialized view existing in the second database server and the master table existing in the first database server.

본 발명의 일 실시예에 따라서, 효율적인 방식으로 데이터베이스들 간의 쿼리 결과 동기화가 구현될 수 있다.According to an embodiment of the present invention, synchronization of query results between databases can be implemented in an efficient manner.

본 발명의 일 실시예에 따라서, 데이터베이스들 간의 실체화 뷰에 대한 고속 리프레시(fast refresh)가 구현될 수 있다.According to one embodiment of the present invention, fast refresh of materialized views between databases can be implemented.

도 1은 본 발명의 일 실시예에 따른 스태틱 데이터의 자동 등록 시스템에 대한 개략도를 도시한다.
도 2는 본 발명의 일 실시예에 따른 제 1 데이터베이스 서버에 대한 개략도를 도시한다.
도 3은 본 발명의 일 실시예에 따른 제 2 데이터베이스 서버에 대한 개략도를 도시한다.
도 4는 본 발명의 일 실시예에 따라 제 1 데이터베이스 서버에서 수행되는 데이터베이스들 간의 쿼리 결과를 동기화하기 위한 순서도를 도시한다.
1 shows a schematic diagram of an automatic registration system for static data according to an embodiment of the present invention.
Figure 2 shows a schematic diagram of a first database server according to one embodiment of the present invention.
Figure 3 shows a schematic diagram of a second database server according to one embodiment of the present invention.
Figure 4 shows a flowchart for synchronizing query results between databases performed on a first database server according to an embodiment of the present invention.

본 개시의 다양한 양태는 일반적으로 데이터 동기화에 관한 것이다. 더 구체적으로, 본 개시의 다양한 양태는 일반적으로 다양한 장치를 가로질러 데이터가 동기화되는 방법에 관한 것이다. 이러한 접근 방법은 데이터 동기화 프레임워크에 의해 데이터의 동기화를 허용하며, 개인용 컴퓨터(personal personal computer(PC)), 휴대용 장치, 개인 휴대 정보 단말기(personal digital assistant(PDA)), 태블릿, 스마트폰, 과학 기구, 매장 장치 등과 같은 임의의 연결된 장치 또는 기기는 유선 및 무선 연결 둘 다를 포함하는 매우 다양한 통신 네트워크 토폴로지를 통해 맥락적 동기화를 수행한다.Various aspects of the present disclosure relate generally to data synchronization. More specifically, various aspects of the present disclosure generally relate to how data is synchronized across various devices. This approach allows synchronization of data by a data synchronization framework, including personal computers (PCs), handheld devices, personal digital assistants (PDAs), tablets, smartphones, and scientific devices. Any connected device or appliance, such as an appliance, store device, etc., performs contextual synchronization through a wide variety of communication network topologies, including both wired and wireless connections.

본 명세서에 설명되는 본 개시의 양태는 하나의 기계로부터 다른 기계로 송신될 데이터 그룹을 예측한다. 더욱이, 본 개시의 다른 양태는 각각의 장치에서의 사용자 활동 및 시스템 정보에 기초하여 각각의 송신 내에서 데이터에 우선 순위를 부여한다. 게다가, 다른 양태는 사용자가 주어진 장치 상의 데이터에 즉시 액세스를 요구하는 것을 표시하는 사용자 행동을 식별하고, 따라서 다른 장치 상에서 이용 가능한 새로운 또는 수정된 데이터를 사용자가 그것을 요구하는 시간에만 그것을 이용 가능하게 하기 위해 그러한 장치에 동기화시킨다.Aspects of the disclosure described herein anticipate groups of data to be transmitted from one machine to another. Moreover, another aspect of the present disclosure prioritizes data within each transmission based on user activity and system information on each device. Additionally, another aspect is identifying user behavior that indicates that the user requires immediate access to data on a given device, thereby making new or modified data available on other devices only at the time the user requests it. synchronize to such devices.

본 개시에 따른 일 예에서, 데이터를 동기화하는 방법이 제공된다. 방법은 네트워크 상의 복수의 장치에서 속성 세트를 감시하는 단계와, 감시된 속성 세트에 기초하여 동기화를 위한 데이터 그룹을 선택하는 단계와, 우선순위 레벨을 각각의 선택된 데이터 및 각각의 장치에 할당하는 단계와, 우선 순위 레벨에 기초하여 선택된 데이터 그룹 상에서 수행될 동기화 동작에 우선 순위를 부여하는 단계와, 동기화의 우선 순위 부여에 따라 선택된 데이터 그룹을 동기화하는 단계를 포함한다.In one example according to the present disclosure, a method for synchronizing data is provided. The method includes monitoring a set of attributes in a plurality of devices on a network, selecting a group of data for synchronization based on the monitored attribute set, and assigning a priority level to each selected data and each device. and assigning priority to a synchronization operation to be performed on the selected data group based on the priority level, and synchronizing the selected data group according to the priority assignment of synchronization.

본 개시에 따른 다른 예에서, 시스템이 제공된다. 시스템은 네트워크 상의 복수의 장치에서 속성 세트를 감시하는 감시 모듈과, 감시된 속성 세트에 기초하여 동기화를 위한 데이터 그룹을 선택하고 우선 순위 레벨을 각각의 선택된 데이터 및 각각의 장치에 할당하는 예측 모듈과, 우선 순위 레벨에 기초하여 선택된 데이터 그룹 상에서 수행될 동기화 동작에 우선 순위를 부여하는 데이터 매니저를 포함한다. 데이터 매니저는 또한 동기화의 우선 순위 부여에 따라 선택된 데이터 그룹을 동기화한다.In another example according to the present disclosure, a system is provided. The system includes a monitoring module that monitors a set of attributes in a plurality of devices on a network, a prediction module that selects a group of data for synchronization based on the monitored attribute set and assigns a priority level to each selected data and each device; , and a data manager that gives priority to synchronization operations to be performed on the selected data group based on the priority level. The data manager also synchronizes selected data groups according to synchronization priority.

도 1은 본 발명의 일 실시예에 따른 스태틱 데이터의 자동 등록 시스템(100)에 대한 개략도를 도시한다.1 shows a schematic diagram of a system 100 for automatic registration of static data according to an embodiment of the present invention.

도 1에서 도시되는 바와 같이, 스태틱 데이터의 자동 등록 시스템(100)은 클라이언트(110), 제 1 데이터베이스 서버(120), 및 제 2 데이터베이스 서버(130)를 포함할 수 있다.As shown in FIG. 1, the automatic registration system 100 for static data may include a client 110, a first database server 120, and a second database server 130.

도 1에서 도시되는 바와 같이, 클라이언트(110)는 네트워크를 통하여 통신하기 위한 매커니즘을 갖는 스태틱 데이터의 자동 등록 시스템에서의 노드(들)를 의미할 수 있다. 예를 들어, 클라이언트(110)는 PC, 랩탑 컴퓨터, 워크스테이션, 단말 및/또는 네트워크 접속성을 갖는 임의의 전자 디바이스를 포함할 수 있다. 또한, 클라이언트(110)는 에이전트(Agent), API(Application Programming Interface) 및 플러그-인(Plug-in) 중 적어도 하나에 의해 구현되는 임의의 서버를 포함할 수도 있다. 예를 들어, 도 1에서의 클라이언트(110)는 제 2 데이터베이스 서버(130)를 사용하는 사용자와 관련될 수 있다. 이러한 예시에서, 클라이언트(110)는 제 1 데이터베이스 서버(120)에서의 테이블을 참조하는 실체화 뷰를 제 2 데이터베이스 서버(130)를 통해 확인할 수 있다.As shown in FIG. 1, the client 110 may refer to node(s) in an automatic registration system for static data that has a mechanism for communicating through a network. For example, client 110 may include a PC, laptop computer, workstation, terminal, and/or any electronic device with network connectivity. Additionally, the client 110 may include any server implemented by at least one of an agent, an application programming interface (API), and a plug-in. For example, client 110 in FIG. 1 may be associated with a user using second database server 130. In this example, the client 110 may check a materialized view referencing a table in the first database server 120 through the second database server 130.

데이터베이스 서버(120 및 130)는, 예를 들어, 마이크로프로세서, 메인프레임 컴퓨터, 디지털 싱글 프로세서, 휴대용 디바이스 및 디바이스 제어기 등과 같은 임의의 타입의 컴퓨터 시스템 또는 컴퓨터 디바이스를 포함할 수 있다. 이러한 데이터베이스 서버(120 및 130)들 각각은 DBMS(Database Management System)(120a 및 130a) 및 영구 저장 매체(persistent storage)(120b 및 130b)를 포함할 수 있다. 제 1 데이터베이스 서버(120) 및 제 2 데이터베이스 서버(130)는 서로 원격에 위치한 이종의 데이터베이스 서버를 의미할 수 있다. 더불어, 도 1에서는 2개의 데이터베이스 서버를 도시하고 있으나, 이보다 많은 데이터베이스 서버들 또한 본 발명의 범위에 포함될 수 있다는 점이 당해 출원분야에 있어서 통상의 지식을 가진 자에게 명백할 것이다.Database servers 120 and 130 may include any type of computer system or computer device, such as, for example, microprocessors, mainframe computers, digital single processors, portable devices, and device controllers. Each of these database servers 120 and 130 may include a database management system (DBMS) 120a and 130a and persistent storage (persistent storage) 120b and 130b. The first database server 120 and the second database server 130 may refer to heterogeneous database servers located remotely from each other. In addition, although Figure 1 shows two database servers, it will be clear to those skilled in the art that more database servers may also be included in the scope of the present invention.

도 1에서는 도시되지 않았지만, 데이터베이스 서버(120 및 130)는 버퍼 캐시를 포함하는 하나 이상의 메모리를 포함할 수 있다. 또한, 도 1에서는 도시되지 않았지만, 데이터베이스 서버(120 및 130)는 하나 이상의 프로세서를 포함할 수 있다. 따라서, DBMS(120a 및 120b)는 상기 메모리 상에서 상기 프로세서에 의하여 동작될 수 있다.Although not shown in Figure 1, database servers 120 and 130 may include one or more memories that include a buffer cache. Additionally, although not shown in FIG. 1, the database servers 120 and 130 may include one or more processors. Accordingly, DBMS (120a and 120b) can be operated by the processor on the memory.

여기서, 메모리는 동적 램(DRAM, dynamic random access memory), 정적 램(SRAM, static random access memory) 등의 랜덤 액세스 메모리(RAM)와 같은, 프로세서가 직접 접근하는 주된 저장 장치로서 전원이 꺼지면 저장된 정보가 순간적으로 지워지는 휘발성(volatile) 저장 장치를 의미할 수 있지만, 이들로 한정되는 것은 아니다. 이러한 메모리는 프로세서에 의하여 동작 될 수 있다. 메모리는 데이터 값을 포함하는 데이터 테이블(data table)을 임시로 저장할 수 있다. 상기 데이터 테이블은 데이터 값을 포함할 수 있으며, 본 발명의 일 실시예에서 상기 데이터 테이블의 데이터 값은 메모리로부터 영구 저장 매체에 기록될 수 있다. 추가적인 양상에서, 메모리는 버퍼 캐시를 포함하며, 상기 버퍼 캐시의 데이터 블록에는 데이터가 저장될 수 있다. 상기 데이터는 백그라운드 프로세스에 의하여 영구 저장 매체에 기록될 수 있다.Here, memory is the main storage device directly accessed by the processor, such as random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), and stores information when the power is turned off. may refer to a volatile storage device that is instantaneously erased, but is not limited to these. These memories can be operated by a processor. Memory can temporarily store a data table containing data values. The data table may include data values, and in one embodiment of the present invention, the data values of the data table may be written from memory to a permanent storage medium. In a further aspect, the memory includes a buffer cache, where data may be stored in data blocks of the buffer cache. The data may be recorded to a permanent storage medium by a background process.

영구 저장 매체(120b 및 130b)는, 예를 들어 자기(magnetic) 디스크, 광학(optical) 디스크 및 광자기(magneto-optical) 저장 디바이스뿐만 아니라 플래시 메모리 및/또는 배터리-백업 메모리에 기초한 저장 디바이스와 같은, 임의의 데이터를 지속적으로 할 수 있는 비-휘발성(non-volatile) 저장 매체를 의미한다. 이러한 영구 저장 매체(120b 및 130b)는 다양한 통신 수단을 통하여 데이터베이스 서버(120 및 130)의 프로세서 및 메모리와 통신할 수 있다. 추가적인 실시예에서, 이러한 영구 저장 매체(120b 및 130b)는 데이터베이스 서버(120 및 130) 외부에 위치하여 데이터베이스 서버(120 및 130)와 통신가능할 수도 있다.Permanent storage media 120b and 130b may include, for example, magnetic disks, optical disks, and magneto-optical storage devices, as well as storage devices based on flash memory and/or battery-backed memory. It refers to a non-volatile storage medium that can continuously store arbitrary data. These persistent storage media (120b and 130b) can communicate with the processors and memories of the database servers (120 and 130) through various communication means. In additional embodiments, these persistent storage media 120b and 130b may be located external to and communicable with database servers 120 and 130.

DBMS(120a 및 130a)는 데이터베이스 서버(120 및 130)에서 필요한 데이터를 검색, 삽입, 수정 및/또는 삭제 등과 같은 동작들을 수행하는 것을 허용하기 위한 프로그램으로서, 전술한 바와 같이, 데이터베이스 서버(120 및 130)의 메모리에서 프로세서에 의하여 구현될 수 있다.DBMS (120a and 130a) is a program that allows performing operations such as searching, inserting, modifying and/or deleting necessary data in the database servers (120 and 130). As described above, the database servers (120 and 130) 130) can be implemented by a processor in memory.

클라이언트(110)와 데이터베이스 서버(120 및 130) 또는 데이터베이스 서버들(120 및 130)은 네트워크(미도시)를 통하여 서로 통신할 수 있다. 본 발명의 일 실시예에 따른 네트워크는 공중전화 교환망(PSTN:Public Switiched Telephone Network), xDSL(x Digital Subscriber Line), RADSL(Rate Adaptive DSL), MDSL(Multi Rate DSL), VDSL(Very High Speed DSL), UADSL(Universal Asymmetric DSL), HDSL(High Bit Rate DSL) 및 근거리 통신망(LAN) 등과 같은 다양한 유선 통신 시스템들을 사용할 수 있다.The client 110 and the database servers 120 and 130 or the database servers 120 and 130 may communicate with each other through a network (not shown). The network according to an embodiment of the present invention includes Public Switched Telephone Network (PSTN), x Digital Subscriber Line (xDSL), Rate Adaptive DSL (RADSL), Multi Rate DSL (MDSL), and Very High Speed DSL (VDSL). ), UADSL (Universal Asymmetric DSL), HDSL (High Bit Rate DSL), and local area network (LAN) can be used.

또한, 본 명세서에서 제시되는 네트워크는 CDMA(Code Division Multi Access), TDMA(Time Division Multi Access), FDMA(Frequency Division Multi Access), OFDMA(Orthogonal Frequency Division Multi Access), SC-FDMA(Single Carrier-FDMA) 및 다른 시스템들과 같은 다양한 무선 통신 시스템들을 사용할 수 있다. 또한, 본 명세서에서의 네트워크는 데이터베이스 링크(dblink)를 포함할 수 있으며, 이에 따라 제 1 데이터베이스 서버(120) 및 제 2 데이터베이스 서버(130)는 이러한 데이터베이스 링크를 통해 서로 통신하여 다른 데이터베이스 서버로부터의 데이터를 가져올 수 있다. 일례로, 상기 데이터베이스 링크는 제 1 데이터베이스 서버(120)로부터 제 2 데이터베이스 서버(130)로의 데이터베이스 링크를 포함할 수 있다. 본 명세서에서 설명된 기술들은 위에서 언급된 네트워크들뿐만 아니라, 다른 네트워크들에서도 사용될 수 있다.In addition, the networks presented in this specification include Code Division Multi Access (CDMA), Time Division Multi Access (TDMA), Frequency Division Multi Access (FDMA), Orthogonal Frequency Division Multi Access (OFDMA), and Single Carrier-FDMA (SC-FDMA). ) and other systems may be used. Additionally, the network in this specification may include a database link (dblink), whereby the first database server 120 and the second database server 130 communicate with each other through this database link to receive information from other database servers. Data can be imported. For example, the database link may include a database link from the first database server 120 to the second database server 130. The techniques described herein can be used in the networks mentioned above, as well as other networks.

도 1에서 도시되는 바와 같이, 제 1 데이터베이스 서버(120)는 제 2 데이터베이스 서버(130)의 원격에 위치할 수 있다. 또한, 제 1 데이터베이스 서버(120) 및 제 2 데이터베이스 서버는 서로 호환되지 않는 데이터베이스 서버를 의미할 수 있다. 이러한 데이터베이스 서버들 중 하나의 데이터베이스 서버(예컨대, 제 1 데이터베이스 서버(120))는 마스터 테이블(즉, 쿼리에서 사용되는 FROM 절에 포함된 테이블)을 포함하고 있으며, 다른 데이터베이스 서버(예컨대, 제 2 데이터베이스 서버(130))는 상기 마스터 테이블에 대한 실체화 뷰(쿼리 결과가 저장된 테이블)를 포함하고 있다. 여기서의 실체화 뷰는 실체화 뷰 테이블, Mview 또는 컨테이너 테이블과 상호호환가능하게 사용될 수 있다.As shown in FIG. 1, the first database server 120 may be located remotely from the second database server 130. Additionally, the first database server 120 and the second database server may mean database servers that are incompatible with each other. One of these database servers (e.g., first database server 120) contains a master table (i.e., a table included in the FROM clause used in the query), and another database server (e.g., second database server 120) contains a master table (i.e., a table included in the FROM clause used in the query). The database server 130 includes a materialized view (a table storing query results) for the master table. The materialized view here can be used interchangeably with a materialized view table, Mview, or container table.

본 명세서에서의 쿼리 결과 동기화(리프레시)란 실체화 뷰 쿼리의 결과를 실체화 뷰 테이블에 반영하는 것을 의미할 수 있다. 이러한 반영 방식은 실체화 뷰 테이블의 내용을 비우고 쿼리 전체 결과를 인서트하는 방식인 완전 리프레시(complete refresh) 방식 및 마스터 테이블의 변경 사항(diff)만을 변경하는 방식인 고속 리프레시(fast refresh) 방식을 포함할 수 있다. 완전 리프레시 방식의 경우 고속 리프레시 방식에 비하여 예를 들어 대량의 데이터를 처리하는 경우 많은 양의 처리 시간을 필요로 하기 때문에, 일반적으로 고속 리프레시 방식이 바람직하다.Query result synchronization (refresh) in this specification may mean reflecting the results of a materialized view query in a materialized view table. This reflection method may include a complete refresh method that empties the contents of the materialized view table and inserts the entire query result, and a fast refresh method that changes only the changes (diff) of the master table. You can. Since the complete refresh method requires a large amount of processing time compared to the high-speed refresh method, for example, when processing a large amount of data, the high-speed refresh method is generally preferable.

도 1에서 도시되는 바와 같이 제 1 및 제 2 데이터베이스 서버들은 원격에 위치하여 있기 때문에, 쿼리 결과의 동기화(즉, 리프레시)를 구현하는데 있어서 어려움이 존재한다. 즉, 고속 리프레시 방식에서는, 쿼리에서 사용되는 FROM 절에 포함된 테이블(즉, 마스터 테이블)에서의 변경이 쿼리 결과가 저장된 테이블(즉, 실체화 뷰)에 반영되기 위하여, 마스터 테이블에서의 변경 내용이 저장된 로그성 테이블들에 포함된 메타데이터들을 원격에 위치한 이종의 서버가 해석할 수 있어야 한다. 하지만, 다른 제조사에 의해 독립적으로 제작된 데이터베이스 서버들 간의 코딩 규칙, 권한 규칙, 통신 규칙, 암호화 규칙 등이 공유되기는 현실적으로 불가능하다. 따라서, 전술한 이종의 데이터베이스 서버들 간의 실체화 뷰의 고속 리프레시 대신에, 실체화 뷰 테이블의 데이터들을 모두 삭제하고 실체화 뷰와 관련된 쿼리를 다시 수행해서 상기 쿼리의 전체 결과 데이터를 실체화 뷰 테이블에 전부 삽입해야하는 방식(즉, complete refresh 방식)이 가능할 수 있다. 하지만, 이러한 방식은, 대용량 데이터를 처리하는데 있어서는 과도하게 시간이 많이 걸리게 될 뿐만 아니라 데이터베이스 서버의 성능에도 악영향을 미칠 수 있다.As shown in FIG. 1, because the first and second database servers are located remotely, there is difficulty in implementing synchronization (i.e., refresh) of query results. That is, in the high-speed refresh method, changes in the table (i.e., master table) included in the FROM clause used in the query must be reflected in the table (i.e., materialized view) where the query results are stored. Metadata included in stored log tables must be able to be interpreted by heterogeneous servers located remotely. However, it is realistically impossible to share coding rules, permission rules, communication rules, encryption rules, etc. between database servers independently produced by different manufacturers. Therefore, instead of the above-described high-speed refresh of materialized views between heterogeneous database servers, all data in the materialized view table must be deleted, queries related to the materialized view must be re-performed, and all result data of the query must be inserted into the materialized view table. method (i.e., complete refresh method) may be possible. However, this method not only takes an excessive amount of time to process large amounts of data, but can also have a negative impact on the performance of the database server.

도 2는 본 발명의 일 실시예에 따른 제 1 데이터베이스 서버(120)에 대한 개략도를 도시한다.Figure 2 shows a schematic diagram of a first database server 120 according to one embodiment of the present invention.

도 2에서 도시되는 바와 같이, 제 1 데이터베이스 서버(120)는 동기화 결정 모듈(201), 동기화 명령 생성 모듈(203), 통신 모듈(205) 및 저장 모듈(207)을 포함할 수 있다. 제 1 데이터베이스 서버(120) 내의 각각의 모듈들은 서로 통신가능하다. 또한, 예를 들어, 전술한 제 1 데이터베이스 서버(120)의 컴포넌트들은 DBMS(120a) 내에 포함될 수도 있다. 또한, 전술한 제 1 데이터베이스 서버(120)의 컴포넌트들은 예시적인 것이며, 전술한 컴포넌트들 이외의 추가적인 컴포넌트들 또한 제 1 데이터베이스 서버(120)에 포함될 수 있다.As shown in FIG. 2, the first database server 120 may include a synchronization determination module 201, a synchronization command generation module 203, a communication module 205, and a storage module 207. Each module in the first database server 120 can communicate with each other. Additionally, for example, the components of the first database server 120 described above may be included in the DBMS 120a. Additionally, the components of the first database server 120 described above are exemplary, and additional components other than the components described above may also be included in the first database server 120.

동기화 결정 모듈(201)은 제 1 데이터베이스 서버의 원격에 위치한 제 2 데이터베이스 서버에 존재하는 실체화 뷰에 대한 동기화를 수행할 것을 결정할 수 있다. 예를 들어, 동기화 결정 모듈(201)은, 클라이언트(110)로부터의 동기화 요청, 제 2 데이터베이스 서버(130)로부터의 동기화 요청, 사전설정된 동기화 주기, 마스터 테이블의 데이터 변경이 발생되는 상황(예컨대, 커밋(commit) 발생) 중 적어도 하나에 기초하여 동기화를 수행할 지 여부를 결정할 수 있다. 예를 들어, 동기화 결정 모듈(201)은, 제 1 데이터베이스 서버(120)의 로그 테이블 세트를 체크하여 마스터 테이블에서의 데이터 변경이 있었는지 여부를 결정할 수 있다. 동기화 결정 모듈(201)은 데이터 변경이 있는 경우 동기화를 수행할 것을 결정할 수 있다. 또한, 동기화 결정 모듈(201)은 마스터 테이블에서의 데이터 변경이 존재하지 않는다고 결정되는 경우, 동기화를 수행하지 않을 것을 결정할 수 있다.The synchronization decision module 201 may determine whether to perform synchronization on a materialized view existing in a second database server located remotely from the first database server. For example, the synchronization decision module 201 may determine a synchronization request from the client 110, a synchronization request from the second database server 130, a preset synchronization cycle, and a situation in which a data change in the master table occurs (e.g., It is possible to determine whether to perform synchronization based on at least one of the commit occurrences. For example, the synchronization determination module 201 may check the log table set of the first database server 120 to determine whether there have been data changes in the master table. The synchronization decision module 201 may determine whether to perform synchronization if there is a data change. Additionally, the synchronization decision module 201 may determine not to perform synchronization if it is determined that there are no data changes in the master table.

동기화 명령 생성 모듈(203)은, 동기화 수행 결정에 응답하여, 제 2 데이터베이스 서버(139)로 전송될 동기화 명령을 생성할 수 있다. 예를 들어, 동기화 명령 생성 모듈(203)은 제 1 데이터베이스 서버(120)에 존재하는 실체화 뷰 객체(mview object)로부터, 상기 제 2 데이터베이스 서버(130)에 존재하는 실체화 뷰로 액세스하기 위한 연결 정보를 포함하는 메타데이터를 획득할 수 있다. 이러한 실체화 뷰 객체는 제 2 데이터베이스 서버(130)의 실체화 뷰를 참조할 수 있다. 동기화 명령 생성 모듈(203)은 상기 획득된 메타데이터에 기초하여 제 2 데이터베이스 서버(130)로 전송될 동기화 명령을 생성할 수 있다. 여기서의 메타데이터는 예를 들어 실체화 뷰에 대한 쿼리 정보, 제 1 및 제 2 데이터베이스들 간의 통신을 위한 데이터베이스 링크 정보, 및/또는 실체화 뷰 테이블의 네임 정보를 포함할 수 있다. 본 발명의 일 실시예에서, 동기화 명령 생성 모듈(203)에 의해 생성되는 동기화 명령은, 제 1 데이터베이스 테이블에 존재하고 상기 마스터 테이블과 연관된 제 로그 테이블 세트에서의 로그 정보를 상기 제 2 데이터베이스에 존재하는 제 2 실체화뷰 로그 테이블에 삽입(insert)하기 위한 명령을 포함할 수 있다. 추가적으로, 동기화 명령은 제 2 데이터베이스 서버(130)로의 프로시저 호출을 위한 정보를 포함할 수 있다.The synchronization command generation module 203 may generate a synchronization command to be transmitted to the second database server 139 in response to the decision to perform synchronization. For example, the synchronization command creation module 203 provides connection information for accessing a materialized view existing in the second database server 130 from a materialized view object (mview object) existing in the first database server 120. The included metadata can be obtained. This materialized view object may refer to the materialized view of the second database server 130. The synchronization command generation module 203 may generate a synchronization command to be transmitted to the second database server 130 based on the obtained metadata. The metadata here may include, for example, query information about the materialized view, database link information for communication between the first and second databases, and/or name information of the materialized view table. In one embodiment of the invention, the synchronization command generated by the synchronization command generation module 203 stores log information in a first set of log tables that exist in a first database table and is associated with the master table in the second database. It may include a command for inserting into the second materialized view log table. Additionally, the synchronization command may include information for a procedure call to the second database server 130.

통신 모듈(205)은, 제 2 데이터베이스 서버(130) 또는 클라이언트(110)와의 통신 기능을 제공할 수 있다. 예를 들어, 통신 모듈(205)은 생성된 동기화 명령을 제 2 데이터베이스 서버(130)로 전송할 수 있다. 또한, 통신 모듈(205)은 앞서 설명된 임의의 네트워크 및/또는 데이터베이스 링크를 사용하여, 제 2 데이터베이스 서버(130) 또는 클라이언트(110)와 통신할 수 있다. 또한, 통신 모듈(205)은 제 1 데이터베이스 서버(120)를 사용하는 클라이언트로부터의 데이터 저장, 조회 및 인덱스 빌드, 조회 요청 등을 수신할 수 있다. 또한, 통신 모듈(205)은 데이터 저장, 조회 및 인덱스 빌드, 조회 요청에 대한 결과 정보를 전달할 수도 있다. 더불어, 통신 모듈(205)은 제 2 데이터베이스 서버(130)로 프로시저를 호출하는 방식으로 동기화 명령을 제 2 데이터베이스 서버(130)로 전달할 수 있다.The communication module 205 may provide a communication function with the second database server 130 or the client 110. For example, the communication module 205 may transmit the generated synchronization command to the second database server 130. Additionally, communication module 205 may communicate with second database server 130 or client 110 using any of the network and/or database links described above. Additionally, the communication module 205 may receive data storage, inquiry, index build, and inquiry requests from clients using the first database server 120. Additionally, the communication module 205 may deliver result information about data storage, inquiry and index building, and inquiry requests. In addition, the communication module 205 may transmit a synchronization command to the second database server 130 by calling a procedure with the second database server 130.

저장 모듈(207)은, 실체화 뷰 객체, 마스터 테이블, 및 로그 테이블 세트를 포함할 수 있다. 저장 모듈(207)은 제 1 데이터베이스 서버(120)의 테스크 수행과 관련하여 저장되는 모든 데이터를 저장할 수 있다. 저장 모듈(207)은 DBMS(120a) 및/또는 영구저장매체(120b)에 포함될 수 있다. 추가적으로, 저장 모듈(207)은 제 1 데이터베이스 서버(120) 상에 마스터 테이블, 실체화 뷰 객체, 제 1 실체화 뷰 로그 테이블, DD_SLOG 테이블, DD_MLOG 테이블 등을 생성할 수도 있다. 다른 예시로, 이러한 테이블들의 생성은, 제어 모듈(미도시)과 같은 별도의 컴포넌트에 의해 수행될 수도 있다. 또한, 저장 모듈(207)은 데이터의 저장(업데이트 포함)과 관련된 요청을 처리 및 관리할 수 있다. 이러한 저장 모듈(207)은 데이터 및 인덱스 테이블 등을 저장할 것을 결정할 수 있다. 또한, 저장 모듈(207)은 데이터 및/또는 인덱스 테이블에 대한 저장 위치를 결정할 수 있다. 예를 들어, 저장 모듈(207)은 데이터에 대하여 데이터 테이블 상에서의 저장 위치를 결정할 수 있다. 다른 예시로, 저장 모듈(207)은 데이터에 대하여 영구 저장 매체(130a) 상의 저장 위치를 결정할 수 있다.The storage module 207 may include a set of materialized view objects, master tables, and log tables. The storage module 207 may store all data stored in relation to task performance of the first database server 120. The storage module 207 may be included in the DBMS 120a and/or the persistent storage medium 120b. Additionally, the storage module 207 may create a master table, a materialized view object, a first materialized view log table, a DD_SLOG table, and a DD_MLOG table on the first database server 120. As another example, the creation of these tables may be performed by a separate component, such as a control module (not shown). Additionally, the storage module 207 may process and manage requests related to storage (including updates) of data. This storage module 207 can decide to store data, index tables, etc. Additionally, the storage module 207 may determine a storage location for the data and/or index table. For example, the storage module 207 may determine a storage location for data on a data table. As another example, the storage module 207 may determine a storage location on the persistent storage medium 130a for data.

도 3은 본 발명의 일 실시예에 따른 제 2 데이터베이스 서버(130)에 대한 개략도를 도시한다.Figure 3 shows a schematic diagram of a second database server 130 according to one embodiment of the present invention.

도 3에서 도시되는 바와 같이, 제 2 데이터베이스 서버(130)는 동기화 수행 모듈(301), 통신 모듈(303) 및 저장 모듈(305)을 포함할 수 있다. 제 2 데이터베이스 서버(130) 내의 각각의 모듈들은 서로 통신가능하다. 또한, 예를 들어, 전술한 제 2 데이터베이스 서버(130)의 컴포넌트들은 DBMS(130a) 내에 포함될 수도 있다. 또한, 전술한 제 2 데이터베이스 서버(130)의 컴포넌트들은 예시적인 것이며, 전술한 컴포넌트들 이외의 추가적인 컴포넌트들 또한 제 2 데이터베이스 서버(130)에 포함될 수 있다.As shown in FIG. 3, the second database server 130 may include a synchronization performance module 301, a communication module 303, and a storage module 305. Each module in the second database server 130 can communicate with each other. Additionally, for example, the components of the second database server 130 described above may be included in the DBMS 130a. Additionally, the components of the second database server 130 described above are exemplary, and additional components other than the components described above may also be included in the second database server 130.

동기화 수행 모듈(301)은 제 1 데이터베이스 서버(120)로부터 수신된 동기화 명령에 응답하여, 실체화 뷰와 마스터 테이블 간의 동기화(고속 리프레시)를 수행할 수 있다. 예를 들어, 동기화 수행 모듈(301)은 제 1 데이터베이스 서버(120)에 존재하고 마스터 테이블과 연관된 로그 테이블 세트에서의 로그 정보를 제 2 데이터베이스 서버(130)에 존재하는 제 2 실체화 뷰 로그 테이블에 삽입할 수 있다. 또한, 동기화 수행 모듈(301)은 삽입된 로그 정보를 포함하는 제 2 실체화 뷰 로그 테이블과 실체화 뷰 테이블 간의 조인 연산을 수행함으로써 동기화를 수행할 수 있다. 추가적으로, 동기화 수행 모듈(301)은 제 2 데이터베이스 서버(130) 상에 제 2 실체화 뷰 로그 테이블 및 실체화 뷰 테이블을 생성할 수도 있다. 다른 예시로, 이러한 테이블들의 생성은, 저장 모듈(305) 및/또는 제어 모듈(미도시)과 같은 별도의 컴포넌트에 의해 수행될 수도 있다.The synchronization performing module 301 may perform synchronization (fast refresh) between the materialized view and the master table in response to the synchronization command received from the first database server 120. For example, the synchronization performing module 301 stores log information in the log table set that exists in the first database server 120 and is associated with the master table to the second materialized view log table that exists in the second database server 130. Can be inserted. Additionally, the synchronization performing module 301 may perform synchronization by performing a join operation between the second materialized view log table including the inserted log information and the materialized view table. Additionally, the synchronization performing module 301 may create a second materialized view log table and a materialized view table on the second database server 130. As another example, the creation of these tables may be performed by separate components, such as a storage module 305 and/or a control module (not shown).

통신 모듈(303)은, 제 1 데이터베이스 서버(120) 또는 클라이언트(110)와의 통신 기능을 제공할 수 있다. 예를 들어, 통신 모듈(303)은 제 1 데이터베이스 서버(120)로부터 동기화 명령을 수신할 수 있다. 또한, 통신 모듈(303)은 앞서 설명된 임의의 네트워크 및/또는 데이터베이스 링크를 사용하여, 제 1 데이터베이스 서버(120) 또는 클라이언트(110)와 통신할 수 있다. 또한, 통신 모듈(303)은 제 2 데이터베이스 서버(130)를 사용하는 클라이언트로부터의 데이터 저장, 조회 및 인덱스 빌드, 조회 요청 등을 수신할 수 있다. 또한, 통신 모듈(303)은 데이터 저장, 조회 및 인덱스 빌드, 조회 요청, 및 동기화 수행에 대한 결과 정보를 전달할 수도 있다. 더불어, 통신 모듈(303)은 제 1 데이터베이스 서버(120)로부터 프로시저 호출을 수신할 수 있다.The communication module 303 may provide a communication function with the first database server 120 or the client 110. For example, the communication module 303 may receive a synchronization command from the first database server 120. Additionally, communication module 303 may communicate with first database server 120 or client 110 using any of the network and/or database links described above. Additionally, the communication module 303 may receive data storage, inquiry, index build, and inquiry requests from a client using the second database server 130. Additionally, the communication module 303 may deliver result information about data storage, inquiry and index building, inquiry request, and synchronization performance. In addition, the communication module 303 may receive a procedure call from the first database server 120.

저장 모듈(305)은, 실체화 뷰 테이블, 제 2 실체화 뷰 로그 테이블을 포함할 수 있다. 저장 모듈(305)은 제 2 데이터베이스 서버(130)의 테스크 수행과 관련하여 저장되는 모든 데이터를 저장할 수 있다. 저장 모듈(305)은 DBMS(130a) 및/또는 영구저장매체(130b)에 포함될 수 있다. 또한, 저장 모듈(305)은 데이터의 저장(업데이트 포함)과 관련된 요청을 처리 및 관리할 수 있다. 이러한 저장 모듈(305)은 데이터 및 인덱스 테이블 등을 저장할 것을 결정할 수 있다. 또한, 저장 모듈(305)은 데이터 및/또는 인덱스 테이블에 대한 저장 위치를 결정할 수 있다. 예를 들어, 저장 모듈(305)은 데이터에 대하여 데이터 테이블 상에서의 저장 위치를 결정할 수 있다. 다른 예시로, 저장 모듈(305)은 데이터에 대하여 영구 저장 매체(130b) 상의 저장 위치를 결정할 수 있다.The storage module 305 may include a materialized view table and a second materialized view log table. The storage module 305 may store all data stored in relation to task performance of the second database server 130. The storage module 305 may be included in the DBMS 130a and/or the persistent storage medium 130b. Additionally, the storage module 305 may process and manage requests related to storage (including updates) of data. This storage module 305 can decide to store data, index tables, etc. Additionally, the storage module 305 may determine a storage location for the data and/or index table. For example, the storage module 305 may determine a storage location for data on a data table. As another example, storage module 305 may determine a storage location on persistent storage medium 130b for data.

도 4는 본 발명의 일 실시예에 따라 제 1 데이터베이스 서버(120)에서 수행되는 데이터베이스들 간의 쿼리 결과를 동기화하기 위한 순서도를 도시한다.FIG. 4 shows a flowchart for synchronizing query results between databases performed on the first database server 120 according to an embodiment of the present invention.

도 4에서 도시되는 순서도의 순서는 구현에 따라 가변적일 수 있으며, 일부 순서가 추가되거나 일부 순서가 생략될 수도 있다.The order of the flowchart shown in FIG. 4 may vary depending on implementation, and some orders may be added or some orders may be omitted.

도 4에서 도시되는 바와 같이, 제 1 데이터베이스 서버(120)는 제 1 데이터베이스 서버(120)의 원격에 위치한 제 2 데이터베이스 서버(130)에 존재하는 실체화 뷰에 대한 동기화를 수행할 것을 결정할 수 있다(401). 본 발명의 일 실시예에서, 제 1 데이터베이스 서버(120)는, 클라이언트(110)로부터의 동기화 요청, 제 2 데이터베이스 서버(130)로부터의 동기화 요청, 사전설정된 동기화 주기, 마스터 테이블의 데이터 변경이 발생되는 상황 중 적어도 하나에 기초하여 동기화를 수행할 지 여부를 결정할 수 있다. 또한, 제 1 데이터베이스 서버(120)는, 제 1 데이터베이스 서버(120)의 로그 테이블 세트를 체크하여 마스터 테이블에서의 데이터 변경이 있었는지 여부를 결정할 수 있다. 예를 들어, 제 1 데이터베이스 서버(120)는 이전의(최신) 동기화 시점에 대한 시간 정보를 고려하여, 최신의 동기화 시점 이후의 마스터 테이블에서의 데이터 변경이 있었는지 여부를 결정할 수 있다. 제 1 데이터베이스 서버(120)는 데이터 변경이 있는 경우 동기화를 수행할 것을 결정할 수 있다. 또한, 제 1 데이터베이스 서버(120)는 마스터 테이블에서의 데이터 변경이 존재하지 않는다고 결정되는 경우, 동기화를 수행하지 않을 것을 결정할 수 있다. 동기화를 수행할 것으로 결정된 경우, 제 1 데이터베이스 서버(120)는 로그 테이블 세트에서의 DD_MLOG 테이블에 포함된 각각의 실체화 뷰의 가장 최신의 리프레시 시점(youngest last refresh time)을 현 시점(즉, sysdata)으로 변경할 수 있다. 추가적인 실시예에서, 제 1 데이터베이스 서버(120)에서의 전술한 동기화 수행여부 결정은 제 2 데이터베이스 서버(130)로의 프로시저를 호출한 이후에 수행될 수도 있다.As shown in FIG. 4, the first database server 120 may decide to perform synchronization on the materialized view existing in the second database server 130 located remotely from the first database server 120 ( 401). In one embodiment of the present invention, the first database server 120 generates a synchronization request from the client 110, a synchronization request from the second database server 130, a preset synchronization period, and a change in data in the master table. It may be determined whether to perform synchronization based on at least one of the following situations. Additionally, the first database server 120 may check the log table set of the first database server 120 to determine whether there has been a change in data in the master table. For example, the first database server 120 may consider time information about the previous (latest) synchronization point and determine whether there has been a change in data in the master table after the latest synchronization point. The first database server 120 may decide to perform synchronization when there is a change in data. Additionally, the first database server 120 may determine not to perform synchronization when it is determined that there are no data changes in the master table. When it is determined to perform synchronization, the first database server 120 displays the youngest last refresh time of each materialized view included in the DD_MLOG table in the log table set at the current time (i.e., sysdata). It can be changed to . In an additional embodiment, the determination of whether to perform the above-described synchronization in the first database server 120 may be performed after calling a procedure to the second database server 130.

본 발명의 일 실시예에서, 본 발명의 일 실시예에서, 제 1 데이터베이스 서버(120)는 제 1 데이터베이스 서버(120)에 존재하는 실체화 뷰 객체를 참조하며 실체화 뷰로의 액세스를 위한 연결정보를 포함하는 메타데이터를 획득할 수 있으며(403), 제 1 데이터베이스 서버(120)는 동기화 수행 결정에 응답하여, 상기 제 2 데이터베이스 서버(130)로 전송될 동기화 명령을 생성할 수 있다(405). 제 1 데이터베이스 서버(120)에는 제 2 데이터베이스 서버(130)에 존재하는 실체화 뷰를 가리키는 실체화 뷰 객체가 생성될 수 있다. 본 발명에서의 실체화 뷰 객체는 예를 들어 실체화 뷰와 관련된 메타데이터를 저장하는 별도의 테이블을 포함할 수 있다. 이러한 실체화 뷰 객체는 실체화 뷰에 대한 쿼리 정보, 제 1 및 제 2 데이터베이스 서버들 간의 통신을 위한 데이터베이스 링크 정보, 및/또는 실체화 뷰의 테이블 네임 정보와 같은 메타데이터들을 포함할 수 있다. 일반적으로 실체화 뷰가 위치한 장소(예컨대, 제 2 데이터베이스 서버(130))에 위치하는 실체화 뷰 객체가 제 1 데이터베이스 서버(120) 상에 위치하기 때문에, 마스터 테이블을 가지고 있는 제 1 데이터베이스 서버(120)가 실체화 뷰를 가지고 있는 제 2 데이터베이스 서버(130)를 제어할 수 있어서, 이종의 데이터베이스 서버들 간에 고속 리프레시가 구현될 수 있다. 즉, 실체화 뷰를 보고자 하는 클라이언트(110)가 사용하고 있는 제 2 데이터베이스 서버(130)가 동기화 명령을 생성하는 것이 아니라, 실제로 실체화 뷰가 참조하고 있는 마스터 테이블을 가지고 있는 제 1 데이터베이스 서버(120)가 자신이 가지고 있는 실체화 뷰 객체를 사용하여 동기화 명령을 생성할 수 있다. 다시 말하면, 제 1 데이터베이스 서버(120) 상의 실체화 뷰 객체를 위치시킴으로써, 상기 제 1 데이터베이스 서버(120)에 위치한 로그 테이블 세트(예컨대, DD_SLOG 테이블 및/또는 DD_MLOG 테이블)을 실체화 뷰 객체가 참고함으로써, 동기화 수행 여부의 결정 및/또는 동기화 수행 명령의 생성이 제 1 데이터베이스 서버(120) 상에서 수행될 수 있다. 고속 리프레시의 로직 생성 주체는 제 1 데이터베이스 서버(120)이고 실체화 뷰의 실제 저장소는 제 2 데이터베이스 서버(130)가 될 수 있다. 따라서, 제 2 데이터베이스 서버(130)가 이종인 제 1 데이터베이스 서버(120)의 로그 테이블 세트를 해석하지 못하기 때문에 발생되는 이종의 DB 간의 고속 리프레시가 불가능하다는 문제점이 해결될 수 있다.In one embodiment of the present invention, the first database server 120 references a materialized view object existing in the first database server 120 and includes connection information for access to the materialized view. metadata may be obtained (403), and the first database server 120 may generate a synchronization command to be transmitted to the second database server 130 in response to the decision to perform synchronization (405). A materialized view object pointing to a materialized view existing in the second database server 130 may be created in the first database server 120. The materialized view object in the present invention may include, for example, a separate table that stores metadata related to the materialized view. This materialized view object may include metadata such as query information about the materialized view, database link information for communication between the first and second database servers, and/or table name information of the materialized view. Since the materialized view object, which is generally located in the place where the materialized view is located (e.g., the second database server 130), is located on the first database server 120, the first database server 120 having the master table Since the second database server 130 having the materialized view can be controlled, high-speed refresh can be implemented between heterogeneous database servers. In other words, the second database server 130 used by the client 110 wanting to view the materialized view does not generate the synchronization command, but the first database server 120 that actually has the master table referenced by the materialized view. You can create a synchronization command using your own materialized view object. In other words, by locating a materialized view object on the first database server 120, the materialized view object references a set of log tables (e.g., DD_SLOG table and/or DD_MLOG table) located on the first database server 120, Determination of whether to perform synchronization and/or generation of a synchronization performance command may be performed on the first database server 120. The logic generator for high-speed refresh may be the first database server 120, and the actual storage of the materialized view may be the second database server 130. Accordingly, the problem that high-speed refresh between heterogeneous DBs is impossible, which occurs because the second database server 130 cannot interpret the log table set of the heterogeneous first database server 120, can be solved.

예를 들어, 이러한 동기화 명령은, 제 2 데이터베이스 서버(130)로의 프로시저 호출을 포함할 수 있다. 여기서의 프로시저는, 제 2 데이터베이스 서버(130)에 저장될 수 있으며 그리고 제 1 데이터베이스 서버(120)로부터 발행된 동기화 명령(예컨대, SQL 문)을 해석 및 수행할 수 있다. 또한, 동기화 명령은, 실체화 뷰로의 액세스를 위한 연결 정보를 포함할 수 있다. 또한, 동기화 명령은, 제 2 데이터베이스 서버(130)를 제어하기 위한 DML(database manipulation language)를 포함할 수 있다(예컨대, INSERT INTO CONT_TBL@DBLINK). 즉, 동기화 명령은, 제 1 데이터베이스 서버(120)에 존재하고 마스터 테이블과 연관된 로그 테이블 세트에서의 로그 정보를 제 2 데이터베이스 서버(130)에 존재하는 제 2 실체화 뷰 로그 테이블 또는 실체화 뷰 테이블(즉, 컨테이너 테이블)에 삽입하기 위한 명령을 포함할 수 있다.For example, this synchronization command may include a procedure call to the second database server 130. The procedure here may be stored in the second database server 130 and may interpret and perform synchronization commands (eg, SQL statements) issued from the first database server 120. Additionally, the synchronization command may include connection information for access to the materialized view. Additionally, the synchronization command may include a database manipulation language (DML) for controlling the second database server 130 (eg, INSERT INTO CONT_TBL@DBLINK). That is, the synchronization command synchronizes log information in the log table set that exists in the first database server 120 and is associated with the master table to the second materialized view log table or materialized view table (i.e., , container table).

그리고나서, 제 1 데이터베이스 서버(120)는 생성된 동기화 명령을 제 2 데이터베이스 서버(130)로 전송함으로써, 제 2 데이터베이스 서버(130)로 하여금 고속 리프레시를 수행하도록 할 수 있다(407).Then, the first database server 120 transmits the generated synchronization command to the second database server 130, thereby allowing the second database server 130 to perform high-speed refresh (407).

추가적으로, 동기화 수행이 완료되는 경우, 제 1 데이터베이스 서버(120)는, DD_SLOG 테이블에서의 마지막 동기화 시점을 현재 시점으로 변경하고, DD_MLOG 테이블에서의 최소 값(youngest last refresh time) 및 최대 값(oldest last refresh time) 정보를 변경하고, 그리고 제 1 실체화 뷰 로그 테이블에서 불필요한 변경 데이터를 제거할 수 있다. 예를 들어, 제 2 데이터베이스 서버(130)로부터의 완료 메시지를 수신하거나 또는 제 1 데이터베이스 서버(120)가 동기화 명령을 제 2 데이터베이스 서버(130)로 송신하는 경우, 동기화 수행이 완료되었다고 결정될 수 있다.Additionally, when synchronization is completed, the first database server 120 changes the last synchronization time in the DD_SLOG table to the current time and sets the minimum value (youngest last refresh time) and maximum value (oldest last) in the DD_MLOG table. refresh time) information can be changed, and unnecessary change data can be removed from the first materialized view log table. For example, when a completion message is received from the second database server 130 or when the first database server 120 transmits a synchronization command to the second database server 130, it may be determined that the synchronization performance is complete. .

위의 개시가 이전 예를 참조하여 도시되고 설명되었지만, 다른 형태, 상세, 및 구현은 이하의 특허청구범위에 정의되는 본 개시의 사상 및 범위를 벗어나지 않으면서 이루어질 수 있다는 점이 이해되어야 한다.Although the above disclosure has been shown and described with reference to the preceding examples, it should be understood that other forms, details, and implementations may be made without departing from the spirit and scope of the disclosure, as defined by the following claims.

Claims (3)

스태틱 데이터의 자동 등록 방법으로서,
상기 제 1 데이터베이스 서버의 원격에 위치한 제 2 데이터베이스 서버에 존재하는 실체화 뷰(materialized view)에 대한 동기화를 수행할 것을 결정하는 단계;
동기화 수행 결정에 응답하여, 상기 제 2 데이터베이스 서버로 전송될 동기화 명령을 생성하는 단계; 및
상기 생성된 동기화 명령을 상기 제 2 데이터베이스 서버로 전송하여, 상기 제 2 데이터베이스 서버로 하여금 상기 제 2 데이터베이스 서버에 존재하는 상기 실체화 뷰와 상기 제 1 데이터베이스 서버에 존재하는 상기 마스터 테이블 간의 동기화를 수행하도록 하는 단계;
를 포함하며,
상기 동기화 명령은:
상기 제 1 데이터베이스 서버에 존재하고 상기 마스터 테이블과 연관된 로그 테이블 세트에서의 로그 정보를 상기 제 2 데이터베이스 서버에 존재하는 제 2 실체화뷰 로그 테이블에 삽입(insert)하기 위한 명령을 포함하는, 스태틱 데이터의 자동 등록 방법.
As a method of automatically registering static data,
determining to perform synchronization on a materialized view existing in a second database server located remotely from the first database server;
In response to a decision to perform synchronization, generating a synchronization command to be transmitted to the second database server; and
Transmitting the generated synchronization command to the second database server to cause the second database server to perform synchronization between the materialized view existing in the second database server and the master table existing in the first database server steps;
Includes,
The above synchronization command is:
Of static data, including a command for inserting log information from a set of log tables that exists in the first database server and is associated with the master table into a second materialized view log table that exists in the second database server. How to auto-enroll.
제 1 항에 있어서,
상기 로그 테이블 세트는,
상기 마스터 테이블의 데이터 변경 내용을 포함하는 제 1 실체화 뷰 로그 테이블;
상기 마스터 테이블을 참조하고 있는 실체화 뷰에 대한 정보 및 상기 실체화 뷰에 대한 마지막 동기화 시점에 대한 정보 중 적어도 하나를 저장하는 DD(data dictionary)_SLOG 테이블; 및
상기 실체화 뷰에 대한 마지막 동기화 시점에 대한 최대 값(youngest last refresh time) 및 최소 값(oldest last refresh time) 정보를 저장하는 DD_MLOG 테이블;
중 적어도 하나를 포함하는, 스태틱 데이터의 자동 등록 방법.
According to claim 1,
The log table set is,
a first materialized view log table containing data changes in the master table;
a DD (data dictionary)_SLOG table that stores at least one of information about the materialized view referencing the master table and information about the last synchronization time for the materialized view; and
A DD_MLOG table that stores maximum (youngest last refresh time) and minimum (oldest last refresh time) information regarding the last synchronization time for the materialized view;
A method of automatically registering static data, including at least one of the following.
제 2 항에 있어서,
상기 동기화의 수행이 완료되는 경우,
상기 DD_SLOG 테이블에서의 마지막 동기화 시점을 현재 시점으로 변경하는 단계;
상기 DD_MLOG 테이블에서의 최대 값(youngest last refresh time) 및 최소 값(oldest last refresh time) 정보를 변경하는 단계; 및
상기 제 1 실체화 뷰 로그 테이블에서 불필요한 변경 데이터를 제거하는 단계;
를 포함하는, 스태틱 데이터의 자동 등록 방법.
According to claim 2,
When the synchronization is completed,
Changing the last synchronization time in the DD_SLOG table to the current time;
Changing maximum value (youngest last refresh time) and minimum value (oldest last refresh time) information in the DD_MLOG table; and
removing unnecessary change data from the first materialized view log table;
A method for automatically registering static data, including.
KR1020220119065A 2022-09-21 2022-09-21 Automatic registration system for static data and its operation method KR20240040262A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220119065A KR20240040262A (en) 2022-09-21 2022-09-21 Automatic registration system for static data and its operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220119065A KR20240040262A (en) 2022-09-21 2022-09-21 Automatic registration system for static data and its operation method

Publications (1)

Publication Number Publication Date
KR20240040262A true KR20240040262A (en) 2024-03-28

Family

ID=90482836

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220119065A KR20240040262A (en) 2022-09-21 2022-09-21 Automatic registration system for static data and its operation method

Country Status (1)

Country Link
KR (1) KR20240040262A (en)

Similar Documents

Publication Publication Date Title
US10324924B2 (en) Synchronizing query result between heterogeneous databases
CN109906448B (en) Method, apparatus, and medium for facilitating operations on pluggable databases
US11468027B2 (en) Method and apparatus for providing efficient indexing and computer program included in computer readable medium therefor
KR102127522B1 (en) Computer program stored in computer readable medium, database server and audit performing server
US10275489B1 (en) Binary encoding-based optimizations at datastore accelerators
US7890541B2 (en) Partition by growth table space
US8756196B2 (en) Propagating tables while preserving cyclic foreign key relationships
US11314719B2 (en) Method for implementing change data capture in database management system
EP2380090B1 (en) Data integrity in a database environment through background synchronization
CN110737682A (en) cache operation method, device, storage medium and electronic equipment
US10824612B2 (en) Key ticketing system with lock-free concurrency and versioning
US7281014B2 (en) Method and apparatus for moving data between storage devices
CN106874281A (en) Realize the method and apparatus that data base read-write is separate
US20070174360A1 (en) Storage system embedding database
US10146833B1 (en) Write-back techniques at datastore accelerators
KR101747270B1 (en) Method, server and computer program stored in computer readable medium for synchronizing query result
EP3061011B1 (en) Method for optimizing index, master database node and subscriber database node
JP6035934B2 (en) Data store management device, data providing system, and data providing method
KR20240040262A (en) Automatic registration system for static data and its operation method
KR102214697B1 (en) A computer program for providing space managrment for data storage in a database management system
KR20170101835A (en) Method, server and computer program stored in computer readable medium for synchronizing query result
US11789971B1 (en) Adding replicas to a multi-leader replica group for a data set
CN113127717A (en) Key retrieval method and system
CN110019113B (en) Database service processing method and database server
US11055266B2 (en) Efficient key data store entry traversal and result generation