KR101460950B1 - The Method and device of NoSQL Query based on denormalized table notation - Google Patents
The Method and device of NoSQL Query based on denormalized table notation Download PDFInfo
- Publication number
- KR101460950B1 KR101460950B1 KR20140099681A KR20140099681A KR101460950B1 KR 101460950 B1 KR101460950 B1 KR 101460950B1 KR 20140099681 A KR20140099681 A KR 20140099681A KR 20140099681 A KR20140099681 A KR 20140099681A KR 101460950 B1 KR101460950 B1 KR 101460950B1
- Authority
- KR
- South Korea
- Prior art keywords
- nosql
- relational
- query
- tables
- record
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational 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)
- Computing Systems (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
본 발명은 NoSQL에 표준 SQL 구문을 사용하기 위해, DDL 데이터 스키마로 설계된 관계형 테이블을 비정규화를 통한 NoSQL 테이블로 변환하고, DML 질의로 구성된 관계형 테이블간의 조인(join) 질의를 NoSQL에 적합한 단일 테이블 질의로 변환하여 수행하는 방법 및 장치에 관한 것이다.
In order to use standard SQL syntax in NoSQL, the present invention converts a relational table designed with a DDL data schema into a non-normalized NoSQL table, and performs a join query between relational tables composed of DML queries as a single table query suitable for NoSQL To a method and apparatus for performing the conversion.
Nancy Lynch, Seth Gilbert. Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web servicesNancy Lynch, Seth Gilbert. Brewer's conjecture and the feasibility of consistent, available, partition-tolerant web services
ACM SIGACT News, Volume 33 Issue 2 (2002), pg. 51-59.ACM SIGACT News, Volume 33 Issue 2 (2002), pg. 51-59.
W. Vogels. Eventually Consistent. ACM Queue vol. 6, no. 6, December 2008.
W. Vogels. Eventually Consistent. ACM Queue vol. 6, no. 6, December 2008.
NoSQL의 이론적 배경은 에릭 브루어가 UC 버클리에 제임 중이던 2000년대에 분산 컴퓨팅 이론에 대한 ACM 심포지엄에서 발표한 CAP(Consistency, Availability, Partition Tolerance)이론에 설명되어 있다. CAP 정리에 따르면, 대규모 분산 데이터 시스템에는 슬라이딩 의존성(sliding dependency)과 관계를 맺는 세 가지 요건, 일관성, 가용성, 파티션 허용이 있으며, 분산 시스템은 셋 중에 두 가지만 강력하게 지원할 수 있다. 전통적인 관계형 데이터베이스는 브루어 CAP 정리에 의해, 일관성과 가용성을 중시한 시스템으로 대용량 데이터를 처리하기 위한 파티션 허용을 강력하게 지원할 수 없는 반면, NoSQL은 관계형 데이터베이스와는 달리 파티션 허용을 제공하는 가운데, 일관성을 강하게 지원하는 형태와 가용성을 강하게 지원하는 형태로 나누어진다.
The theoretical background of NoSQL is described in the CAP (Consistency, Availability, and Partition Tolerance) theory, which was published in the ACM symposium on distributed computing theory in the 2000s when Eric Brewer was at UC Berkeley. According to CAP theorem, a large distributed data system has three requirements to be related to the sliding dependency, consistency, availability, and partitioning, and a distributed system can support only two of the three. While traditional relational databases can not strongly support partitioning to handle large amounts of data with a system that focuses on consistency and availability, Bruce's CAP cleanup provides consistent partitioning while providing partition tolerance, unlike relational databases. Strongly supported form, and strongly supported form of availability.
상기와 같이 NoSQL 기술은 대용량 데이터를 저장하기 위해 파티션을 허용하는 대신, 테이블간의 관계를 설정하지 않는다. 따라서, NoSQL은 관계형 데이터베이스의 SQL 구문과 같이 두 개 이상의 테이블간의 조인을 통한 결과를 유출할 수 없으며, 또한 SQL과 같은 표준화된 질의를 가지고 있지 않다. 본 발명은 테이블간의 관계 설정 없이 파티션을 허용하는 NoSQL의 대용량 데이터 저장 능력을 기반으로 전통적인 관계형 데이터베이스가 지원하는 SQL을 NoSQL에 지원하는 방법 및 장치를 제안한다.
As described above, NoSQL technology allows partitioning to store large amounts of data, but does not set the relationship between tables. Therefore, NoSQL can not extract the result of joining between two or more tables like SQL statement of relational database, nor does it have standardized query such as SQL. The present invention proposes a method and apparatus for supporting SQL that is supported by a traditional relational database on NoSQL, based on the large data storage capability of NoSQL that allows partitions without establishing relationships between tables.
이하에서는 본 발명의 몇 가지 실시예에 대한 기본적인 이해를 돕기 위하여 간단한 요약을 제공한다. 이 요약은 광범위한 개관이 아니며, 본 발명의 중요/핵심 구성 요소를 식별하거나 특허청구범위를 한정하고자 하는 것이 아니다. 이는 단지, 이하의 보다 상세한 설명에 대한 서설로서, 몇몇 개념들을 단순한 형태로 제공하기 위한 것이다.
BRIEF DESCRIPTION OF THE DRAWINGS A brief summary is provided to aid a basic understanding of some embodiments of the invention. This summary is not an extensive overview and is not intended to identify key / critical elements of the invention or to limit the scope of the claims. It is intended merely as an introduction to the following more detailed description, to provide some concepts in a simplified form.
본 발명은 대용량 데이터를 처리하기 위해 테이블 분할을 허용하는 분산시스템으로 구성된 NoSQL에 전통적인 관계형 데이터베이스의 SQL을 제공함으로써 표준화된 인터페이스로 대용량 데이터를 처리하는 방법에 관한 것으로, SQL DDL 테이블 스키마로 설계된 관계형 테이블을 비정규화를 통해 NoSQL 테이블로 변환하는 과정과 사용자 질의인 DML에서 관계형 테이블을 비정규화된 단일 NoSQL 테이블로 질의를 변환하는 과정을 수행한다. 이를 위해 본 발명은 DDL로 작성되는 관계형 테이블을 동일한 NoSQL 테이블로 대응시킨다.
The present invention relates to a method of processing large data with a standardized interface by providing SQL of a conventional relational database to NoSQL composed of a distributed system that permits table partitioning to process large amounts of data, Is transformed into a NoSQL table through denormalization, and a query is converted from a user query, DML, into a single denormalized NoSQL table. To this end, the present invention associates relational tables created in DDL with the same NoSQL table.
도 1의 (a)는 관계형 테이블 a(102)와 b(104)가 외부 키를 통해 참조 관계를 가지고 있는 모습이다. 도 1의 (a)와 같은 관계를 가지는 두 개의 관계형 테이블은 비정규화를 통해 (b)의 두 개의 NoSQL 테이블로 대응된다. 도 1의 (a)의 관계형 테이블 a(102)는 (b)의 NoSQL 테이블 A(106)로 대응되고, 도 1의 (a)의 관계형 테이블 b(104)는 (b)의 NoSQL 테이블 B(110)로 대응된다. NoSQL 테이블 A(106)는 관계형 테이블 a(102)에 참조 정보(108)를 제외하면 동일한 구조를 가진다. NoSQL 테이블 A(106)에 저장된 참조 정보(108)는 관계형 테이블 a(102)와 관계형 테이블 b(104)가 외부 키를 통한 참조 관계를 가지고 있기 때문에, 관계형 테이블 a(102)의 임의의 레코드가 관계형 테이블 b(104)에 참조되었는지 여부를 저장한다. 상기 참조 정보(108)는 단순히 참조 관계만을 나타내는 플래그, 카운터를 이용해 참조된 개수, 또는 참조하는 관계형 테이블 b(104)의 레코드 키 값을 배열로 저장한다.
1 (a) shows that relational tables a 102 and
도 1의 (b)의 NoSQL 테이블 B(110)는 (a)의 관계형 테이블 a(102)와 b(104)를 비정규화 시킨 NoSQL 테이블로, 관계형 테이블 b(104)의 임의의 레코드에 관계 있는 관계형 테이블 a(102)의 레코드를 합쳐 한 개의 레코드로 구성시킨 것이다. 따라서, NoSQL 테이블 B(110)의 레코드 개수는 관계형 테이블 b(104)의 레코드 개수와 동일하며, 단지 관계형 레코드 a(102)의 정보가 포함된 크기만을 가진다. NoSQL 테이블 B(110)에 포함된 테이블 a*(112)는 참조하는 관계형 테이블 b가 관계형 테이블 a와 모든 레코드에 대하여 관계를 형성하는 것이 아니기 때문에 관계형 테이블 a(102)와 항상 같은 레코드 수를 가지지는 않는다.
The NoSQL
도 2는 도 1을 확장하여 3개의 관계형 테이블이 전이성(transitive) 관계를 가지고 있는 모습이다. 도 2의 (a)의 관계형 테이블 a(202)와 관계형 테이블 b(204)는 참조 관계를 가지고 있고, 관계형 테이블 b(204)와 관계형 테이블 c(206)가 참조 관계를 가지고 있다. 도 2의 (b)는 (a)로 구성된 관계형 테이블을 비정규화를 통해 3개의 NoSQL 테이블 변환한 구조이다. 도 2의 (b)의 NoSQL 테이블 A(208)는 참조 정보(210)와 관계형 테이블 a(202)를 포함하고, NoSQL 테이블 B(212)는 관계형 테이블 a(202)와 관계형 테이블 b(204)를 비정규화 시킨 NoSQL 테이블로, 도 1의 NoSQL 테이블 B(110)와는 달리 참조 정보(214)를 더 포함하고 있다. 상기와 같이 도 2의 NoSQL 테이블 B(212)가 참조 정보(214)를 가지고 있는 것은 관계형 테이블 b(204)와 관계형 테이블 c(206)가 참조 관계를 가지고 있기 때문이다. 마지막으로 도 2의 NoSQL 테이블 C(218)는 관계형 테이블 a(202), 관계형 테이블 b(204), 그리고 관계형 테이블 c(206)을 비정규화하여 구성시킨다.
FIG. 2 is a view showing that three relational tables have a transitive relationship by extending FIG. Relational table a 202 and
도 3의 (a)는 한 개의 관계형 테이블이 두 개의 관계형 테이블을 참조하는 관계를 보여준다. 도 3의 관계형 테이블 a(302)와 b(304)는 관계형 테이블 c(306)와 참조 관계를 가지고 있다. 상기 관계를 비정규화시키면 도 3의 (b)와 같이 세 개의 NoSQL 테이블이 작성된다. NoSQL 테이블 A(308)은 참조 정보(310)을 포함하고, NoSQL 테이블 B(312) 역시 참조 정보(314)를 포함한다. 그리고, NoSQL 테이블 C(316)은 관계형 테이블 c(306)와 관계 있는 관계형 테이블 a(302)의 레코드의 리스트인 테이블 a*(318)와 관계형 테이블 c(306)와 관계 있는 관계형 테이블 b(304)의 레코드 리스트인 테이블 b*(320)을 포함한다.
Fig. 3 (a) shows a relationship in which one relational table refers to two relational tables. Relational tables a 302 and
상기 도1 내지 도3과 같이 본 발명의 관계형 테이블의 비정규화 방법은 관계가 있는 테이블을 비정규화시키는 완전 비정규화 방법이다. 완전 비정규화 방법은 데이터의 중복이 가중되는 문제를 가지고 있지만, 대용량 데이터를 분할하여 저장할 수 있는 NoSQL의 장점을 이용하여 중복을 허용하더라도 빠른 질의를 수행할 수 있는 장점이 있다.
As shown in FIG. 1 to FIG. 3, the denormalization method of the relational table of the present invention is a completely denormalized method of denormalizing a related table. A completely denormalized method has a problem of data redundancy. However, it has an advantage that it can perform a fast query even if the redundancy is allowed by utilizing the advantage of NoSQL that can store large data in a divided manner.
본 발명은 관계형 테이블을 이용하여 비정규화시킨 NoSQL 테이블을 표기하기 위해 비정규 테이블 표기법(Denormalized Table Notation)을 수식 1의 EBNF(Extended Backus-Naur Form) 표기법으로 정의한다. 수학식 1의 비정규 테이블 표기법은 관계형 데이터베이스의 두 개의 테이블이 참조 관계를 가지고 있다면, 참조하는 테이블을 좌측에 참조되는 테이블을 우측에 배치한다.
The present invention defines a Denormalized Table Notation as an Extended Backus-Naur Form (EBNF) notation of
예를 들어, 도 1의 비정규화된 NoSQL 테이블 B(110)를 비정규 테이블 표기법으로 표시하면, 참조하는 관계형 테이블 b(104)와 참조되는 관계형 테이블 a(102)는 b:a로 표시되고, 도 2의 비정규화된 NoSQL 테이블 B(212)는 b:a, 그리고 비정규화된 NoSQL 테이블 C(218)는 c:b:a로 표기된다. 두 개의 관계형 테이블이 한 개의 관계형 테이블과 참조 관계를 가지는 도 3은 서로 관계가 있는 2개 이상의 관계형 테이블을 표시할 수 있도록 테이블 명 리스트를 기호 ':' 이용하여 분리하고, 기호 '[ ]'를 이용하여 둘러싼다. 따라서, 도 3의 NoSQL 테이블 C(316)를 비정규 테이블 표기법으로 하면 c:[a, b]로 표기된다.
For example, if the denormalized NoSQL
도 4의 관계형 테이블 관계도(400)는 일반적으로 많이 적용되는 관계형 테이블 구조이다. 상기 테이블 관계도를 본 발명이 제안하는 비정규 테이블 표기법으로 정의하면 총 5개의 비정규화된 NoSQL 테이블이 하기와 같이 표기된다.
The relational table relationship diagram 400 of FIG. 4 is a commonly applied relational table structure. If the table relation is defined as a denormal table notation proposed by the present invention, a total of five denormalized NoSQL tables are denoted as follows.
(a) NoSQL 테이블 A = a(a) NoSQL table A = a
(b) NoSQL 테이블 B = b(b) NoSQL table B = b
(c) NoSQL 테이블 C = c : a(c) NoSQL table C = c: a
(d) NoSQL 테이블 D = d : [a, b](d) NoSQL table D = d: [a, b]
(e) NoSQL 테이블 E = e : [ c : a, d : [a, b] ]
(e) NoSQL table E = e: [c: a, d: [a, b]]
도 4의 관계형 테이블 a(402)와 b(404)는 참고하고 있는 테이블이 없으므로, 바로 비정규화된 NoSQL 테이블 A(a)와 B(b)로 표기되고, NoSQL 테이블 C(c)는 한 개의 관계형 테이블 a(402)를 참조하고 있으므로, c:a로 표기된다. NoSQL 테이블 D는 두 개의 관계형 테이블 a(402)와 b(404)를 참조하고 있으므로, d:[a, b]로 표기되고, NoSQL 테이블 E는 관계형 테이블 c(406)와 d(408)를 참조하고 있고, NoSQL 테이블 C(3)와 D(4)를 포함하는 계층적 참조 관계를 나열한 e:[ c:a, d:[a, b] ]로 표기된다.
Since the relational tables a 402 and
수학식 1과 같이 비정규 테이블 표기법으로 정의된 NoSQL 테이블이 기존 관계형 테이블 보다 어느 정도 데이터 중복성을 가지게 되는지 계산할 수 있다. 이와 같이 데이터 중복성을 계산하는 방법은 기존 관계형 데이터베이스를 NoSQL로 변환할 때 발생되는 하드웨어 투자비를 산출할 수 있고, 데이터 증가에 따른 분산 데이터베이스의 최적화 방안을 제시할 수 있는 척도가 된다.
As shown in Equation (1), it is possible to calculate how much the NoSQL table defined by the denormalized table notation has a degree of data redundancy than that of the existing relational table. In this way, the method of calculating the data redundancy is able to calculate the hardware investment cost of converting the existing relational database to NoSQL, and it is a measure to suggest the optimization method of the distributed database according to the data increase.
수학식 2는 임의의 테이블 크기를 계산하는 함수 S를 정의하고 있다. 함수 S는 테이블의 크기를 테이블이 가지는 레코드 개수와 한 레코드의 길이를 곱한 값으로 나타낸다. 수식 2의 파라미터로 전달되는 테이블 table는 관계형 테이블 또는 비정규화된 NoSQL 테이블로 정의된다. 본 발명에서 파라미터가 소문자로 표기되는 경우는 관계형 테이블을 의미하고 대문자로 표기되는 경우는 비정규화된 NoSQL 테이블을 의미한다. 실질적인 테이블의 크기는 인덱스 크기와 함께 데이터베이스가 별도 저장하는 정보로 구성되지만, 본 발명에서 다루는 테이블의 크기는 인덱스를 제외한 순수 데이터 크기만을 고려한다.
Equation (2) defines a function S for computing an arbitrary table size. The function S indicates the size of the table by multiplying the number of records in the table by the length of one record. The table that is passed to the parameter in
수학식 3은 비정규화된 NoSQL 테이블로 구성된 테이블의 길이를 계산하는 함수 L을 정의한다. 함수 L은 비정규 테이블 표기법에 의해 문자 ':'는 테이블간의 관계를 정의한 것으로 비정규화된 NoSQL 테이블을 구성하는 관계형 테이블의 개수를 나타낸다.
Equation (3) defines a function L for calculating the length of a table composed of denormalized NoSQL tables. The function L is a nonnormal table notation. The character ':' is a definition of the relationship between tables, and indicates the number of relational tables constituting the denormalized NoSQL table.
수학식 4는 수학식 2와 수학식 3을 이용하여 도 1과 도 2와 같이 연속적인 관계를 가지고 있는 관계형테이블을 비정규화된 NoSQL 테이블로 구성할 경우의 데이터 크기를 정의한다.
Equation (4) defines a data size when a relational table having a continuous relation as shown in FIG. 1 and FIG. 2 is constructed as an unqualified NoSQL table using Equations (2) and (3).
수학식 5는 도 3과 같이 독립적인 두 개 이상의 관계형 테이블이 하나의 관계형 테이블에 관계를 가지고 있는 비정규화된 NoSQL 테이블의 크기를 정의하는 것으로, 비정규 테이블 표기법에 의해 기호 '[ ]'안에 정의된 테이블은 참조되는 관계형 테이블을 나타내며, 두 개 이상의 관계형 테이블을 문자 ':'로 구분하여 나열한다.
Equation (5) defines the size of an unqualified NoSQL table in which two or more independent relational tables are related to one relational table as shown in FIG. 3, and is defined by the denominator table notation in the symbol '[]' A table represents a referenced relational table, and lists two or more relational tables separated by the character ':'.
수학식 6의 함수 R은 비정규화된 NoSQL 테이블의 관계 개수를 정의한 함수로 연속 관계를 가진 관계형 테이블 개수 보다 1이 적은 값으로 정의된다. 예를 들어 도 1의 비정규화된 NoSQL 테이블은 함수 R의 결과 값으로 1을 가지며, 도 2는 2의 값을 가진다.
The function R in Equation (6) defines the number of relations of the non-normalized NoSQL table and is defined as a value less than the number of relational tables having a continuous relation by one. For example, the unqualified NoSQL table of FIG. 1 has a value of 1 as a result of the function R, and a value of 2 as shown in FIG.
수학식 7은 병렬 연결 관계를 가진 비정규화된 NoSQL. 테이블의 함수 R을 정의한 것으로, 연산의 배분 법칙이 적용된다. 따라서 최소 1 이상의 값을 가진 n개의 항목들의 합으로 표현된다.
Equation 7 is an unqualified NoSQL having a parallel connection relationship. The function R of the table is defined, and the distribution rule of the operation is applied. Therefore, it is expressed as the sum of n items having a value of at least 1.
수학식 8은 관계형 테이블을 완전 비정규화를 통해 NoSQL로 변환하였을 경우, 관계형 데이터베이스에 비해 NoSQL 데이터베이스의 중복되는 데이터 크기를 정의한 비정규 중복 크기(DRS: Denormalized Duplication Size)를 나타내는 것으로 관계형 테이블과 대응되는 비정규화된 NoSQL 테이블의 차를 모두 합한 것으로 정의된다.
Equation (8) represents a denormalized duplication size (DRS) that defines the redundant data size of the NoSQL database when compared to a relational database when the relational table is completely converted to NoSQL through denormalization. It is defined as the sum of all the differences in the NoSQL tables that have been created.
수학식 9는 수식 8에서 계산된 비정규 중복 크기와 관계 함수 R과의 관계를 보여준다. 수식 9의 final_denormalize_table은 더 이상 다른 테이블에 참조되지 않는 또는 참조 정보를 가지고 있지 않는 비정규형된 NoSQL 테이블을 정의하며, max records 는 모든 관계형 테이블 중에서 가장 큰 레코드 수를 정의하고, max length 는 관계형 테이블 중에서 가장 큰 테이블 길이를 정의한다. 상기와 같이 정의한 변수들이 수식 9에 적용되어 관계형 테이블을 비정규화를 통한 NoSQL 테이블로 변환할 때, 관계형 테이블이 가지는 모든 관계 개수 합, 가장 큰 레코드 수, 그리고 가장 큰 테이블 길이의 곱에 2배수한 값보다 작다는 특징을 가진다.
Equation (9) shows the relationship between the irregular overlap size calculated in Equation (8) and the relational function R. Formula 9 final_denormalize_table of shall further define the non-type NoSQL table that does not have or reference information that are not referenced in another table, max records are defined to be the largest record of all the relational table, max length is in a relational table Defines the largest table length. When the variables defined above are applied to Equation (9), when transforming a relational table into a NoSQL table through denormalization, the product of the sum of all the relations in the relational table, the largest number of records, and the largest table length is doubled Value. ≪ / RTI >
도 5는 관계형 테이블을 이용한 SQL 질의문을 비정규 테이블 표기법을 이용한 NoSQL 질의로 변환하는 내용(500)을 보여준다. 본 발명의 NoSQL을 위한 SQL 구문은 단일 테이블로 구성된 NoSQL 테이블에서 수행되는 SQL 구문을 만드는 것이다. 즉, 테이블간의 관계로 구성된 관계형 테이블을 비정규화 시킴으로써 다중 테이블간의 조인(join)을 이용한 SQL 구문을 단일 NoSQL 테이블의 SQL 구문으로 변환하여 사용한다. 도 5의 (1) 구문을 보면 두 개의 관계형 테이블(506) a와 b에서 데이터를 where 절의 조건(508)과 동일한 데이터 중에서 a 테이블의 filed1 항목(502)와 b 테이블의 field2 항목(504)를 취득하는 구문이다. 도 5의 (1) 구문을 비정규화로 구현된 NoSQL 테이블로 변환하면, 도 5의 (1)번 구문의 from 절에 정의된(506) 두 개의 관계형 테이블 a와 b는 NoSQL 테이블 A와 B로 표현된다. 도 5의 관계형 테이블 a(520)와 b(522)는 참조 관계로 테이블 a는 참조되는 관계형 테이블, 그리고 테이블 b는 참조하는 관계형 테이블이다. 따라서, NoSQL 테이블 A는 비정규 테이블 표기법에 의해 a로 NoSQL 테이블 B는 b:a(510)로 표기되며, from 절에서 명시된 두 개의 관계형 테이블 a와 b는 상기 두 개의 테이블을 모두 포함하고 있는 NoSQL 테이블 중 가장 관계 개수가 적은 NoSQL 테이블로 대체되므로, 조건에 부합하는 NoSQL 테이블 B가 선택된다.
FIG. 5 shows a
전술한 바 및 그와 관련된 목적들을 달성하기 위하여, 이하의 설명 및 첨부된 도면과 관련하여 특정한 예시적인 양태들이 설명된다. 하지만, 이러한 양태들은 본 발명의 원리가 사용될 수 있는 다양한 방법 중에 오직 일부만을 설명하는 것일 뿐이며, 본 발명에서는 이러한 모든 양태 및 그 균등물들을 포함하고자 한다. 그 밖의 유리하고 새로운 특징들은, 첨부된 도면과 함께 이하의 상세한 설명을 참조하면 명백해질 것이다.
To the accomplishment of the foregoing and related ends, certain illustrative aspects, with reference to the following description and accompanying drawings, are described. These aspects, however, are merely illustrative of some of the various ways in which the principles of the present invention may be employed, and the present invention intends to include all such aspects and their equivalents. Other advantageous and novel features will become apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings.
빅데이터 분석 시스템에서 다루는 Hadoop 시스템의 Hive는 SQL 구문을 분석하여 테이블간의 관계 설정에 대한 조건문을 수행하기 위해 테이블간의 조인을 분산 병렬 처리한 다음에 결과를 수행하는 배치 처리 방법이다. 상기와 같은 방법은 질의가 발생할 때 마다, 배치로 조인을 수행하기 때문에 결과를 유출하기 위한 시간이 많이 소비된다. 이러한 문제점을 해결하기 메모리 기반의 데이터베이스 기술이 소개되고 있지만, 메모리 기반의 데이터베이스는 대용량 데이터를 모두 메모리에 올려 처리하기 때문에 고가의 장비 투자가 필요하다.
Hive of the Hadoop system handled in big data analysis system is a batch processing method that analyzes SQL statement and performs the distributed parallel processing of joins between tables in order to execute conditional statement about relations between tables. Since the above method performs joining by batch every time a query is generated, it takes a lot of time to output the result. Memory-based database technology has been introduced to solve these problems. However, memory-based databases require expensive equipment investment because they process large amounts of data in memory.
본 발명 기술은 메모리 기반의 데이터베이스와 같이 장비 투자 없이 NoSQL을 이용한 대용량 데이터를 처리하는 기술로, 대용량 데이터에 대한 검색 방법을 표준 SQL 구문을 제공하여 유연한 질의가 가능하도록 제공함으로써, 대용량 데이터에 대한 실시간향(Near Real-Time) 질의 시스템에 사용될 수 있다.
The technology of the present invention is a technology for processing large amount of data using NoSQL without equipment investment like a memory-based database. By providing standard SQL syntax for searching large data, flexible querying is possible, It can be used in near real-time query systems.
도 1은 참조 관계를 가지는 관계 테이블과 NoSQL 테이블
도 2는 전이성 참조 관계를 가지는 관계 테이블과 NoSQL 테이블
도 3은 두 개의 관계형 테이블과 한 개의 관계형 테이블이 참조 관계를 가지는 관계 테이블과 NoSQL 테이블
도 4는 일반 관계형 테이블의 관계도
도 5는 비정규 테이블 표기법으로 구성된 NoSQL 테이블 질의
도 6은 관계 테이블을 NoSQL 테이블로 변환하는 비정규화 흐름도
도 7은 비정규 NoSQL 테이블의 SELECT 질의 처리 흐름도
도 8은 비정규 NoSQL 테이블의 INSERT 질의 처리 흐름도
도 9는 비정규 NoSQL 테이블의 DELETE 질의 처리 흐름도
도 10은 비정규 NoSQL 테이블의 UPDATE 질의 처리 흐름도
도 11은 관계 테이블을 비정규화된 NoSQL 테이블로 변환하는 장치
도 12는 비정규 테이블 표기법을 기반으로 한 NoSQL 테이블 질의 장치1 is a diagram showing a relationship table having a reference relationship and a NoSQL table
FIG. 2 shows a relationship table having a meta-reference relationship and a NoSQL table
FIG. 3 shows a relationship table in which two relational tables and one relational table have a reference relationship and a NoSQL table
FIG. 4 is a diagram showing the relationship between general relational tables
Figure 5 shows a NoSQL table query composed of a nonnormal table notation
6 is an un-normalized flow chart for converting a relational table into a NoSQL table
7 is a flowchart of a SELECT query processing of an irregular NoSQL table
FIG. 8 is a flowchart of an INSERT query processing of an irregular NoSQL table
9 is a flowchart of a DELETE query processing of an irregular NoSQL table
10 is a flowchart of an UPDATE query processing of an irregular NoSQL table
11 is a block diagram of an apparatus for converting a relational table into an unqualified NoSQL table
12 is a block diagram of a NoSQL table query device based on a non-
이제 도면을 참조하여 본 발명을 설명하고자 한다. 도면에서 동일한 참조 번호는 동일한 구성요소를 나타낸다. 이하의 설명에서는 설명을 목적으로, 본 발명에 대한 보다 충분한 이해를 돕기 위하여 여러 가지 구체적인 세부 사항을 설명하였다. 하지만, 이러한 구체적인 세부 사항 없이도 실시될 수 있다는 점이 명백할 것이다. 한편 본 발명에 대한 설명을 보다 용이하게 하기 위하여, 잘 알려진 구조 및 장치들은 블록도의 형태로 도시하였다. 본 출원에 있어서, 개시된 발명을 구현하기 위하여, 본 발명은 컴퓨터를 제어하기 위한 소프트웨어, 펌웨어, 하드웨어, 또는 이들의 임의의 조합을 생성하기 위하여 표준 프로그래밍 및/또는 엔지니어링 기법을 사용하여 메소드(method), 장치, 또는 제품으로 구현될 수 있다.
The present invention will now be described with reference to the drawings. Like reference numerals in the drawings denote like elements. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, that the invention may be practiced without these specific details. In the meantime, well-known structures and devices are shown in block diagram form in order to facilitate describing the present invention. In the present application, to implement the disclosed invention, the present invention may be practiced using standard programming and / or engineering techniques to generate software, firmware, hardware, or any combination thereof for controlling a computer. , A device, or a product.
이제 도 6을 참조하면, 도 6은 SQL DDL로 정의된 데이터 스키마에서 임의의 관계형 테이블을 NoSQL 테이블로 변환하기 위한 비정규화 방법(600)이 도시된다. 방법(600)은 단계(602)에서 시작되고, 단계(604)에서 SQL DDL로 정의된 데이터 스키마에서 임의의 관계형 테이블을 획득하고, 단계(606)에서 획득된 관계형 테이블에 참조된 외부키(foreign key)의 개수를 취득한다. 단계(608)은 단계(606)에서 취득한 외부키의 개수를 판단하여, 외부키가 존재할 경우에 외부키의 개수만큼 단계(610)로 반복 처리한다. 단계(610)은 선택한 외부키의 참조 테이블이 NoSQL 테이블로 변환되었는지 여부를 판단하여, 변환되었다면 단계(612)로 진행하고 변환되지 않았다면 단계(602)로 참조 테이블의 NoSQL 변환을 위한 재귀 호출을 수행한다. 단계(612)는 NoSQL로 변환된 테이블에 관계가 설정된 레코드에 대해 참조 플래그, 참조 카운터, 또는 참조하는 관계형 테이블의 키 값을 배열로 저장하는 참조 정보를 생성한다. 단계(614)는 외부키 참조 NoSQL 테이블 정보를 취득하여 단계(604)에서 획득한 관계형 테이블에 삽입하여 비정규화를 수행하고 단계(608)로 전이한다. 단계(608)에서 더 이상 처리하지 않은 외부키가 없다면 단계(616)으로 전이하여 비정규화를 완성한 NoSQL 테이블을 생성하고, 단계(618)에서 종료한다.
Referring now to FIG. 6, FIG. 6 depicts an
이제 도 7을 참조하면, 도 7은 도 6에 의해 비정규화된 NoSQL 테이블에 SQL DML 중 SELECT 구문을 처리하는 방법(700)이 도시된다. 방법(700)은 단계(702)에 시작되어 단계(704)에서 SELECT 구문을 취득한다. 취득된 SELECT 구문은 단계(706)에서 구문 분석하여 FROM 절에 정의된 테이블을 취득한다. 단계(708)는 단계(706)에서 취득한 FROM 절의 관계형 테이블을 포함하고 있는 NoSQL 테이블 중 가장 작은 크기의 NoSQL 테이블을 선택한다. 상기 가장 작은 크기의 NoSQL 테이블은 전체 테이블 크기를 의미하는 것이 아니라, 비정규 테이블 표기법으로 명시된 것 중, 관계 개수가 가장 적은 것을 의미한다. 단계(710)은 단계(704)에서 취득한 SELECT 구문에 정의된 테이블 명을 NoSQL 테이블 명으로 변환하여 단일 테이블 질의로 변경한다. 상기 과정의 예는 도 5에서 설명하였다. 단계(712)는 단계(710)에서 단일 테이블 질의로 변경된 NoSQL 쿼리를 수행하고 단계(714)에서 종료한다.
Referring now to FIG. 7, FIG. 7 illustrates a
이제 도 8을 참조하면, 도 8은 도 6에 의해 완전 비정규화된 NoSQL 테이블에 SQL DML 중 INSERT 구문을 처리하는 방법(800)이 도시된다. 방법(800)은 단계(802)에 시작되어 단계(804)에서 INSERT 구문을 취득한다. 취득된 INSERT 구문은 단계(806)에서 구문 분석하여 INTO 절에 정의된 테이블을 취득한다. 단계(808)는 단계(806)에서 취득한 INTO 절의 관계형 테이블과 동일하게 대응되는 NoSQL 테이블을 선택하고, 단계(810)에서 선택된 NoSQL 테이블에 INSERT 질의를 수행한다. 단계(812)에서 선택된 NoSQL 테이블은 계층적 관계 조건을 나열한 비정규 테이블 표기법으로 작성되기 때문에, 선택된 NoSQL 테이블에 참조되는 관계형 테이블 목록을 찾을 수 있고, 상기 찾아진 관계형 테이블과 동일하게 대응되는 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하고, 단계(814)에서 종료된다.
Referring now to FIG. 8, FIG. 8 illustrates a
이제 도 9를 참조하면, 도 9는 도 6에 의해 완전 비정규화된 NoSQL 테이블에 SQL DML 중 DELETE 구문을 처리하는 방법(900)이 도시된다. 방법(900)은 단계(902)에 시작되어 단계(904)에서 DELETE 구문을 취득한다. 취득된 DELETE 구문은 단계(906)에서 구문 분석하여 FROM 절에 정의된 테이블을 취득한다. 단계(908)는 단계(906)에서 취득한 FROM 절의 관계형 테이블과 동일하게 대응되는 NoSQL 테이블을 선택하고, 단계(910)에서 DELETE 구문의 조건절에 의해 선택된 NoSQL 테이블의 삭제될 레코드를 검색하여, 상기 삭제될 레코드의 참조 정보 존재 여부를 검사한다. 참조 정보는 참조 관계에서 관계하는 테이블의 정보를 저장하는 영역으로 참조 플래그, 참조 카운터, 또는 참조하는 테이블의 키 값을 배열로 가지고 있으며, 단계(910)은 삭제될 레코드에 참조 정보가 존재한다면 단계(914)로 진행하여 삭제 실패를 처리하고 단계(918)에서 종료된다.
Referring now to FIG. 9, FIG. 9 illustrates a
단계(912)는 단계(910)에서 삭제될 레코드에 참조 정보가 존재하지 않는 경우에 진행하고, 선택된 NoSQL 테이블에 질의를 수행하여 레코드를 삭제한다. 단계(916)에서 선택된 NoSQL 테이블은 계층적 관계 조건을 나열한 비정규 테이블 표기법으로 작성되기 때문에, 선택된 NoSQL 테이블에 참조되는 관계형 테이블 목록을 찾을 수 있고, 상기 찾아진 관계형 테이블과 동일하게 대응되는 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하고, 단계(918)에서 종료된다.
Step 912 goes to step 910 if there is no reference information in the record to be deleted, and performs a query on the selected NoSQL table to delete the record. Since the NoSQL table selected in
이제 도 10을 참조하면, 도 10은 도 6에 의해 완전 비정규화된 NoSQL 테이블에 SQL DML 중 UPDATE 구문을 처리하는 방법(1000)이 도시된다. 방법(1000)은 단계(1002)에 시작되어 단계(1004)에서 UPDATE 구문을 취득한다. 취득된 UPDATE 구문은 단계(1006)에서 구문 분석하여 UPDATE 절에 정의된 테이블을 취득한다. 단계(1008)는 단계(1006)에서 취득한 UPDATE절의 관계형 테이블과 동일하게 대응되는 NoSQL 테이블을 선택하고, 단계(1010)에서 선택된 NoSQL 테이블의 질의를 수행한다. 단계(1012)는 선택된 NoSQL 테이블의 UPDATE 질의 조건에 따라 변경된 레코드에서 참조 정보가 존재할 경우는 단계(1014)로 진행하고, 참조 정보가 존재하지 않는다면 단계(1018)로 진행하여 종료한다. 단계(1014)는 단계(1012)에서 변경된 레코드에 참조 정보가 존재할 경우 수행되며, 상기 레코드를 참조하는 모든 NoSQL 테이블을 찾아 동기 또는 비동기 방법으로 변경하고 단계(1018)에서 종료한다.
Referring now to FIG. 10, FIG. 10 illustrates a
이제 도 11을 참조하면, 도 11은 관계형 테이블을 비정규화된 NoSQL 테이블로 변환하는 장치(1100)가 도시된다. 장치(1100)은 SQL DDL로 작성된 스키마 테이블 정보를 가지고 있는 관계형 테이블 관리기(1110)과 관계형 테이블의 참조 관계를 포함한 비정규화된 NoSQL 테이블 정보를 가지고 있는 NoSQL 테이블 관리기(1112)와 관계형 테이블(1120)에서 NoSQL 테이블(1122)로 변환을 수행하는 테이블 데이터 변환기(1114)로 구성된다.
Referring now to FIG. 11, FIG. 11 illustrates an
도 11의 테이블 데이터 변환기(1114)는 관계형 테이블 관리기(1110)에서 관계형 테이블(1120)의 정보를 취득하여, 각 관계형 테이블의 참조 관계를 분석한 뒤 참조되는 관계형 테이블에는 참조 정보를 포함한 NoSQL 테이블로 정의하고, 참조하는 관계형 테이블은 해당 레코드 행과 관계되는 참조되는 관계형 테이블의 행을 포함한 NoSQL 테이블을 정의하여 NoSQL 테이블 관리기(1112)에 저장한다. 모든 관계형 테이블과 대응되는 NoSQL 테이블로 정의가 완료되면, 테이블 데이터 변환기(1114)는 관계형 테이블 관리기(1110)에서 임의의 관계형 테이블을 추출하고, 상기 추출된 관계형 테이블과 대응되는 NoSQL 테이블을 NoSQL 테이블 관리기(1112)에서 선출하여 참조 관계에 따른 관련된 모든 관계형 테이블을 관계형 테이블(1120)에서 레코드 단위로 찾아 NoSQL 테이블(1122)로 변환을 수행한다.
The
이제 도 12를 참조하면, 도 12는 사용자 질의를 입력 받아 참조 관계가 있는 관계형 테이블을 단일 NoSQL 테이블로 변환하여 질의를 수행하는 장치(1200)가 도시된다. 장치(1200)는 사용자 질의를 입력 받아 관계형 테이블, 관계, 조건을 분리하는 질의 구문 분석기(1210)와 상기 질의 구문 분석기(1210)에서 추출한 관계형 테이블 리스트(1220) 및 관계형 테이블과 대응되는 NoSQL 테이블 리스트(1222)를 포함하는 테이블 관리기(1212)와 질의 구문 분석기(1210)에 분석된 관계형 테이블을 NoSQL 테이블로 변환하는 질의 구문 변환기(1214)와 NoSQL 테이블로 변환된 질의를 수행하는 질의 구문 실행기(1216)로 구성된다.
Referring now to FIG. 12, FIG. 12 illustrates an
도 12의 질의 구문 분석기(1210)는 사용자 질의를 분석하여 테이블 관리기(1212)에 저장된 관계형 테이블 리스트(1220)에 존재하지 않는 새로운 관계형 테이블일 경우, 두 개 이상의 관계형 테이블이 외부 키를 통해 참조되는 관계에서 참조되는 관계형 테이블을 참조 정보를 포함한 NoSQL 테이블로 변환하고 참조하는 관계형 테이블을 참조하는 관계형 테이블 행과 일치하는 참조되는 관계형 테이블의 행을 단일 레코드에 저장한 NoSQL 테이블로 변환하여 NoSQL 테이블 리스트(1222)에 저장한다. 질의 구문 분석기(1220)는 참조 정보를 구성하기 위해 참조되는 관계형 테이블의 행의 개수와 동일한 개수를 가지고 참조되는 정보를 플래그, 참조된 개수, 또는 참조하는 관계형 테이블의 키 값을 배열로 저장하고, 두 개 이상의 참조되는 관계형 테이블과 한 개의 참조하는 관계형 테이블을 단일 테이블로 구성된 NoSQL 테이블로 구성하기 위해 참조하는 관계형 테이블 행과 일치하는 각각의 참조되는 관계형 테이블 행을 분리하여 NoSQL 테이블의 단일 레코드에 저장한다.
The
질의 구문 변환기(1214)는 관계형 테이블과 대응된 NoSQL 테이블을 테이블 관리기(1212)에서 질의에 나열된 관계형 테이블을 모두 포함한 NoSQL 테이블 중에서 가장 적은 관계 개수를 가지는 NoSQL 테이블을 선택하여 질의를 단일 NoSQL 테이블로 구성된 질의로 변경한다. 그리고, 질의 구문 실행기(1216)에서 변환된 NoSQL 테이블을 NoSQL 테이블 저장소(1230)에서 찾아 질의를 수행한다.
The
질의 구문 실행기(1216)는 SQL질의에서 INSERT, DELETE, UPDATE 질의를 분리하여 질의에 나열된 관계형 테이블을 모두 포함한 NoSQL 테이블 중에서 가장 적은 관계 개수를 가지는 NoSQL 테이블을 메인 테이블로 정의하여 데이터를 삽입 한 후, 상기 메인 테이블을 제외한 질의에 나열된 관계형 테이블을 가지고 있는 다른 NoSQL 테이블에 INSERT 질의는 데이터 삽입을, DELETE 질의는 데이터 삭제를, 그리고 UPDATE질의는 데이터 변경을 동기 또는 비동기 방식으로 처리한다.
The
전술한 내용은 본 발명의 예들을 포함한다. 본 발명을 설명하기 위하여 방법 또는 구성 요소의 가능한 모든 조합을 설명하는 것은 불가능하지만, 당업자라면 보다 더 많은 다양한 조합 및 치환이 가능하다는 것을 이해할 것이다. 따라서, 본 발명은 특허청구범위의 사상 및 범위에 포함되는 이러한 모든 교체, 변경, 변화를 포괄하는 것이다.
The foregoing contents include examples of the present invention. While it is not possible to describe all possible combinations of methods or components for purposes of describing the present invention, those skilled in the art will appreciate that many more combinations and permutations are possible. Accordingly, the invention is intended to embrace all such alternatives, modifications and variations that fall within the spirit and scope of the appended claims.
Claims (17)
SQL DDL로 작성된 스키마 테이블을 비정규화를 통한 NoSQL 테이블로 변환하기 위해 관계형 테이블과 상기 관계형 테이블과 동일하게 대응되는 NoSQL 테이블로 구분하는 단계 (A)와
두 개 이상의 관계형 테이블이 외부 키를 통해 참조되는 관계에서 참조되는 관계형 테이블을 참조 정보를 포함한 NoSQL 테이블로 변환하고, 참조하는 관계형 테이블을 참조하는 관계형 테이블 행과 한 개 이상의 참조되는 관계형 테이블 행을 단일 레코드로 저장하는 NoSQL 테이블로 구성하는 단계 (B)와
SQL DML로 작성된 질의에서 관계형 테이블을 NoSQL 테이블로 변환하기 위해 질의에서 정의된 관계형 테이블을 계층적 참조 관계를 나열한 비정규 테이블 표기법으로 NoSQL 테이블로 변환하는 단계 (C)와
상기 단계 (C)에서 변환된 단일 NoSQL 테이블로 구성된 질의를 수행하는 단계 (D)를 포함하는 NoSQL 질의 방법.
In the NoSQL query method based on the irregular table notation,
A step (A) of dividing a schema table created in SQL DDL into a NoSQL table corresponding to the same relational table and the relational table in order to convert the schema table into a NoSQL table through denormalization, and
Two or more relational tables are referenced by a foreign key. A relational table referenced in a relationship is converted to a NoSQL table containing reference information. A relational table row that references the referencing relational table and one or more referenced relational table rows are referred to as a single Steps (B) and (B) to construct a NoSQL table to store as records
To convert a relational table into a NoSQL table in a query written in SQL DML, a step (C) of transforming a relational table defined in the query into a NoSQL table with a denormalized table notation listing hierarchical reference relations
And a step (D) of performing a query composed of a single transformed NoSQL table in the step (C).
상기 단계 (B)의 참조 정보는 참조되는 관계형 테이블의 행의 개수와 동일한 개수를 가지는 참조 플래그, 참조 카운터, 또는 참조하는 관계형 테이블의 키 값을 배열로 저장하는 것을 특징으로 하는 상기 방법.
The method according to claim 1,
Wherein the reference information of the step (B) stores key values of a reference flag having a number equal to the number of rows of the relational table to be referred to, a reference counter, or a relational table to be referred to as an array.
상기 단계 (B)에서 두 개 이상의 참조되는 관계형 테이블과 한 개의 참조하는 관계형 테이블을 단일 테이블로 구성된 NoSQL 테이블로 구성하기 위해 참조하는 관계형 테이블 행과 분리된 참조되는 관계형 테이블 행을 단일 레코드에 저장하는 것을 특징하는 하는 상기 방법.
The method according to claim 1,
In the above step (B), a relational table row to be referred to in order to configure two or more referenced relational tables and one referencing relational table as a single table composed of a single table is stored in a single record ≪ / RTI >
상기 단계 (B)의 비정규화된 NoSQL 테이블이 가지는 데이터 중복성은 관계형 테이블이 가지는 관계 개수 합과 관계형 테이블 중에서 가장 큰 레코드 수와 가장 큰 레코드 길이의 곱에 2배수한 값보다 작은 것을 특징으로 하는 상기 방법.
The method according to claim 1,
Wherein the data redundancy of the non-normalized NoSQL table in the step (B) is smaller than a sum of relations of the relational table and a value obtained by multiplying the product of the largest record length and the largest record length in the relational table. Way.
상기 단계 (D)의 SELECT 질의에서 FROM 구문에 정의된 한 개 이상의 관계형 테이블을 비정규 테이블 표기법으로 명시된 NoSQL 테이블을 선택하기 위해 질의에 나열된 관계형 테이블을 모두 포함한 NoSQL 테이블 중에서 가장 적은 관계 개수를 가지는 NoSQL 테이블을 선택하는 것을 특징으로 하는 상기 방법
The method according to claim 1,
In order to select a NoSQL table specified by the denormalized table notation in the SELECT query of the step (D) in the FROM statement, a NoSQL table having the lowest number of relations among the NoSQL tables including all of the relational tables listed in the query The method comprising:
상기 단계 (D)의 INSERT 질의에서 INTO 구문에 정의된 관계형 테이블과 동일하게 대응하는 비정규 테이블 표기법으로 명시된 NoSQL 테이블을 선택하여 데이터를 삽입하는 단계와 상기 선택된 NoSQL 테이블에서 참조되는 관계형 테이블과 대응되는 모든 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하는 단계를 포함하는 것을 특징으로 하는 상기 방법.
The method according to claim 1,
Selecting a NoSQL table specified by an irregular table notation corresponding to the relational table defined in the INTO statement in the INSERT query of step (D), and inserting data; selecting all of the relational tables referenced in the selected NoSQL table And updating the reference information of the NoSQL table in a synchronous or asynchronous manner.
상기 단계 (D)의 DELETE 질의에서 FROM 구문에 정의된 관계형 테이블과 동일하게 대응하는 비정규 테이블 표기법으로 명시된NoSQL 테이블을 선택하는 단계와, DELETE 질의 조건에 부합되는 NoSQL 테이블의 레코드가 참조 정보를 가지고 있다면 삭제 질의를 실패로 처리하는 단계와, DELETE 질의 조건에 부합되는 NoSQL 테이블의 레코드가 참조 정보를 가지고 있지 않다면 레코드를 삭제 처리한 후 상기 선택된 NoSQL 테이블에서 참조되는 관계형 테이블과 대응되는 모든 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하는 단계를 포함하는 것을 특징으로 하는 상기 방법.
The method according to claim 1,
Selecting a NoSQL table specified by a nonnormal table notation corresponding to the relational table defined in the FROM statement in the DELETE query of step (D); and if the record of the NoSQL table matching the DELETE query condition has reference information And if the record of the NoSQL table corresponding to the DELETE query condition does not have the reference information, deletes the record and then refers to all of the NoSQL tables corresponding to the relational table referenced in the selected NoSQL table And updating the information in a synchronous or asynchronous manner.
상기 단계 (D)의 UPDATE 질의에서 관계형 테이블과 동일하게 대응되는 비정규 테이블 표기법으로 명시된NoSQL 테이블을 선택하여 UPDATE 질의 조건에 부합되는 NoSQL 테이블의 레코드를 변경하는 단계와 상기 변경된 레코드에 참조 정보가 존재할 경우 선택된 NoSQL 테이블을 참조하는 모든 NoSQL 테이블의 레코드를 검색하여 변경된 레코드 정보를 동기 또는 비동기 방식으로 변경하는 단계를 포함하는 것을 특징으로 하는 상기 방법.
The method according to claim 1,
Selecting a NoSQL table specified by an irregular table notation corresponding to the relational table in the UPDATE query of step (D), and changing a record of the NoSQL table conforming to the UPDATE query condition; and if there is reference information in the changed record Searching for a record of all NoSQL tables referring to the selected NoSQL table and changing the changed record information in synchronous or asynchronous manner.
SQL DDL로 작성된 스키마 테이블을 비정규화를 통한 NoSQL 테이블로 변환하기 위해 관계형 테이블과 상기 관계형 테이블과 동일하게 대응되는 NoSQL 테이블로 구분하여 저장하는 테이블 관리기;
두 개 이상의 관계형 테이블이 외부 키를 통해 참조되는 관계에서 참조되는 관계형 테이블을 참조 정보를 포함한 NoSQL 테이블로 변환하고 참조하는 관계형 테이블을 참조하는 관계형 테이블 행과 일치하는 참조되는 관계형 테이블의 행을 단일 테이블에 포함한 NoSQL 테이블로 구성하는 질의 구문 분석기;
SQL DML로 작성된 질의에서 관계형 테이블을 NoSQL 테이블로 변환하여 질의를 수행하기 위해 질의에서 정의된 관계형 테이블을 계층적 참조 관계를 나열한 비정규 테이블 표기법으로 NoSQL 테이블로 변환하는 질의 구문 변환기;
상기 질의 구문 변환기에서 변환된 단일 NoSQL 테이블로 구성된 질의를 수행하는 질의 구문 실행기를 포함하는 NoSQL 질의 장치.
In a NoSQL query device based on non-normative table notation,
A table manager for storing a relational table and a corresponding NoSQL table corresponding to the relational table in order to convert a schema table created in SQL DDL into a NoSQL table through denormalization;
Two or more relational tables referenced by a foreign key Relational tables referenced in a relationship are converted into NoSQL tables with reference information Relational tables referencing relational tables referencing Referential tables in a relational table that match rows in a single table A query parser consisting of NoSQL tables, including;
A query syntax converter that converts a relational table defined in a query into a NoSQL table by a denormalized table notation that lists hierarchical reference relationships to convert a relational table into a NoSQL table in a query written in SQL DML;
And a query syntax executor for executing a query composed of a single transformed NoSQL table in the query syntax translator.
상기 질의 구문 분석기의 참조 정보는 참조되는 관계형 테이블의 행의 개수와 동일한 개수를 가지는 참조 플래그, 참조 카운터, 또는 참조하는 관계형 테이블의 키 값을 배열로 저장하는 것을 특징으로 하는 상기 장치.
10. The method of claim 9,
Wherein the reference information of the query parser stores key values of a reference flag, a reference counter, or a referencing relational table having the same number as the number of rows of the referenced relational table as an array.
상기 질의 구문 분석기에서 두 개 이상의 참조되는 관계형 테이블과 한 개의 참조하는 관계형 테이블을 단일 테이블로 구성된 NoSQL 테이블로 구성하기 위해 참조하는 관계형 테이블 행과 분리된 참조되는 관계형 테이블 행을 단일 레코드에 저장하는 것을 특징하는 하는 상기 장치.
10. The method of claim 9,
In order to construct two or more referenced relational tables and one referencing relational table in the query parser as a single table composed of a single table, a relational table row referenced and a relational table row separated by reference are stored in a single record Said device.
상기 질의 구문 분석기에서 비정규화된 NoSQL 테이블이 가지는 데이터 중복성은 관계형 테이블이 가지는 관계 개수 합과 관계형 테이블 중에서 가장 큰 레코드 수와 가장 큰 레코드 길이의 곱에 2배수한 값보다 작은 것을 특징으로 하는 상기 장치.
10. The method of claim 9,
Wherein the data redundancy of the denormalized NoSQL table in the query parser is smaller than a sum of the number of relational tables of the relational table and a product of the largest number of records and the largest record length in the relational table. .
상기 질의 구문 실행기의 SELECT 질의에서 FROM 구문에 정의된 한 개 이상의 관계형 테이블을 비정규 테이블 표기법으로 명시된 NoSQL 테이블을 선택하기 위해 질의에 나열된 관계형 테이블을 모두 포함한 NoSQL 테이블 중에서 가장 적은 관계 개수를 가지는 NoSQL 테이블을 선택하는 것을 특징으로 하는 상기 장치
10. The method of claim 9,
In order to select a NoSQL table specified by the denormalized table notation in the SELECT query of the query syntax executor, one or more relational tables defined in the FROM clause, a NoSQL table having the lowest number of relations among the NoSQL tables including all of the relational tables listed in the query Characterized in that said device
상기 질의 구문 실행기의 INSERT 질의에서 INTO 구문에 정의된 관계형 테이블과 동일하게 대응하는 비정규 테이블 표기법으로 명시된 NoSQL 테이블을 선택하여 데이터를 삽입하는 단계와 상기 선택된 NoSQL 테이블에서 참조되는 관계형 테이블과 대응되는 모든 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하는 단계를 포함하는 것을 특징으로 하는 상기 장치.
10. The method of claim 9,
Selecting a NoSQL table specified by an irregular table notation corresponding to the relational table defined in the INTO statement in the INSERT query of the query statement executor, inserting data into the NoSQL table specified by the relational table defined in the INTO statement, And updating the reference information of the table in a synchronous or asynchronous manner.
상기 질의 구문 실행기의 DELETE 질의에서 FROM 구문에 정의된 관계형 테이블과 동일하게 대응하는 비정규 테이블 표기법으로 명시된NoSQL 테이블을 선택하는 단계와, DELETE 질의 조건에 부합되는 NoSQL 테이블의 레코드가 참조 정보를 가지고 있다면 삭제 질의를 실패로 처리하는 단계와, DELETE 질의 조건에 부합되는 NoSQL 테이블의 레코드가 참조 정보를 가지고 있지 않다면 레코드를 삭제 처리한 후 상기 선택된 NoSQL 테이블에서 참조되는 관계형 테이블과 대응되는 모든 NoSQL 테이블의 참조 정보를 동기 또는 비동기 방법으로 갱신하는 단계를 포함하는 것을 특징으로 하는 상기 장치.
10. The method of claim 9,
Selecting a NoSQL table specified by a nonnormal table notation corresponding to the relational table defined in the FROM statement in the DELETE query of the query statement executor; if the record of the NoSQL table satisfying the DELETE query condition has reference information, And if the record of the NoSQL table satisfying the DELETE query condition does not have the reference information, deletes the record and then deletes the reference information of all the NoSQL tables corresponding to the relational table referenced in the selected NoSQL table In synchronous or asynchronous manner. ≪ Desc / Clms Page number 13 >
상기 질의 구문 실행기의 UPDATE 질의에서 관계형 테이블과 동일하게 대응되는 비정규 테이블 표기법으로 명시된NoSQL 테이블을 선택하여 UPDATE 질의 조건에 부합되는 NoSQL 테이블의 레코드를 변경하는 단계와 상기 변경된 레코드에 참조 정보가 존재할 경우 선택된 NoSQL 테이블을 참조하는 모든 NoSQL 테이블의 레코드를 검색하여 변경된 레코드 정보를 동기 또는 비동기 방식으로 변경하는 단계를 포함하는 것을 특징으로 하는 상기 장치.
10. The method of claim 9,
Selecting a NoSQL table specified by an irregular table notation corresponding to the relational table in the UPDATE query of the query statement executor and changing a record of a NoSQL table corresponding to an UPDATE query condition; Searching for a record of all NoSQL tables referring to the NoSQL table, and changing the changed record information in a synchronous or asynchronous manner.
SQL DDL로 작성된 관계형 테이블을 가지는 관계형 테이블 관리기; 상기 관계형 테이블과 동일하게 대응되는 비정규 테이블 표기법으로 구성된 NoSQL 테이블을 가지는 NoSQL 테이블 관리기; 관계형 테이블을 입력 받아 비정규 테이블 표기법으로 구성된 NoSQL 테이블로 변환하여 NoSQL 테이블 관리기에 저장하고, 관계형 테이블 데이터를 NoSQL 테이블 데이터로 변환하여 저장하는 테이블 데이터 변환기를 포함하는 장치.
1. An apparatus for transforming a relational table into a NoSQL table based on denormalized table notation,
A relational table manager with relational tables written in SQL DDL; A NoSQL table manager having a NoSQL table configured with a non-regular table notation corresponding to the relational table; A table data converter for receiving a relational table and converting the data into a NoSQL table configured with a nonnormal table notation, storing the data in a NoSQL table manager, and converting relational table data into NoSQL table data and storing the data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20140099681A KR101460950B1 (en) | 2014-08-04 | 2014-08-04 | The Method and device of NoSQL Query based on denormalized table notation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20140099681A KR101460950B1 (en) | 2014-08-04 | 2014-08-04 | The Method and device of NoSQL Query based on denormalized table notation |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101460950B1 true KR101460950B1 (en) | 2014-11-13 |
Family
ID=52290237
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR20140099681A KR101460950B1 (en) | 2014-08-04 | 2014-08-04 | The Method and device of NoSQL Query based on denormalized table notation |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101460950B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20210110123A (en) * | 2020-02-28 | 2021-09-07 | (주)시즐 | Apparatus for nonrelationlal database using relational database structure and data standardization method thereof |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060088013A (en) * | 2005-01-31 | 2006-08-03 | 마이크로소프트 코포레이션 | Integration of a non-relational query language with a relational data store |
KR20120078908A (en) * | 2011-01-03 | 2012-07-11 | 케이티하이텔 주식회사 | Method for data modelling using nosql |
-
2014
- 2014-08-04 KR KR20140099681A patent/KR101460950B1/en active IP Right Grant
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060088013A (en) * | 2005-01-31 | 2006-08-03 | 마이크로소프트 코포레이션 | Integration of a non-relational query language with a relational data store |
KR20120078908A (en) * | 2011-01-03 | 2012-07-11 | 케이티하이텔 주식회사 | Method for data modelling using nosql |
Non-Patent Citations (2)
Title |
---|
Java development 2.0: MongoDB: A NoSQLA datastore with (all the right) RDBMS moves(2010.09.28), http://www.ibm.com/developerworks/kr/library/j-javadev2-12/ * |
Java development 2.0: NoSQL - Schemaless data modeling with Bigtable and Groovy's Gaelyk (2010.05.11), http://www.ibm.com/developerworks/kr/library/j-javadev2-8/ * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20210110123A (en) * | 2020-02-28 | 2021-09-07 | (주)시즐 | Apparatus for nonrelationlal database using relational database structure and data standardization method thereof |
KR102410251B1 (en) | 2020-02-28 | 2022-06-24 | (주)시즐 | Apparatus for nonrelationlal database using relational database structure and data standardization method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10606834B2 (en) | Methods and apparatus of shared expression evaluation across RDBMS and storage layer | |
CN110032604B (en) | Data storage device, translation device and database access method | |
US10133776B2 (en) | Transforming a query by eliminating a subquery | |
US10769124B2 (en) | Labeling versioned hierarchical data | |
US20130006968A1 (en) | Data integration system | |
CN106991276B (en) | Data interface dynamic generation method based on openEHR template | |
US8046352B2 (en) | Expression replacement in virtual columns | |
CA2667774A1 (en) | Apparatus and method for categorical filtering of data | |
US10810226B2 (en) | Shared comments for visualized data | |
CN115248936A (en) | Horizontal scalable data de-identification | |
CN108073641B (en) | Method and device for querying data table | |
KR20120078908A (en) | Method for data modelling using nosql | |
Cappellari et al. | A path-oriented rdf index for keyword search query processing | |
Mishra et al. | A lightweight online framework for query progress indicators | |
KR101460950B1 (en) | The Method and device of NoSQL Query based on denormalized table notation | |
JP5287071B2 (en) | Database management system and program | |
US8001110B2 (en) | Apparatus, method, and computer program product for processing databases | |
JP2011170461A (en) | Information accumulation retrieval method and information accumulation retrieval program | |
Suganya et al. | Efficient fragmentation and allocation in distributed databases | |
US10331715B2 (en) | Metadata enrichment with a keyword definition editor | |
Abbassi et al. | RDF-4X: a scalable solution for RDF quads store in the cloud | |
EP3832482A1 (en) | Server-side cross-model measure-based filtering | |
KR20160001167A (en) | Method and Apparatus for moving data in DBMS | |
CN109446440B (en) | Deep network query interface integration method, system, computing device and storage medium | |
US11036749B2 (en) | Query-based determination of data visualization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
E701 | Decision to grant or registration of patent right | ||
FPAY | Annual fee payment |
Payment date: 20170828 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20181017 Year of fee payment: 5 |