WO2018182058A1 - 관계형 데이터베이스의 조인 방법 - Google Patents

관계형 데이터베이스의 조인 방법 Download PDF

Info

Publication number
WO2018182058A1
WO2018182058A1 PCT/KR2017/003320 KR2017003320W WO2018182058A1 WO 2018182058 A1 WO2018182058 A1 WO 2018182058A1 KR 2017003320 W KR2017003320 W KR 2017003320W WO 2018182058 A1 WO2018182058 A1 WO 2018182058A1
Authority
WO
WIPO (PCT)
Prior art keywords
join
condition
range
user
index
Prior art date
Application number
PCT/KR2017/003320
Other languages
English (en)
French (fr)
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 (주)리얼타임테크
Publication of WO2018182058A1 publication Critical patent/WO2018182058A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24558Binary matching operations
    • G06F16/2456Join operations
    • 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

Definitions

  • the present invention relates to a method of joining a relational database, and more particularly, to a method of joining a relational database for performing an efficient range join on a table having a range of integer columns and having indexed data values sequentially sorted. It is about.
  • a relational database is a collection of data items consisting of a series of structured tables.
  • the relational database is a database in which the structure of the database and the location of data to be constructed are predetermined. Relational databases also serve as a major data source for delivering data to the Web through Web applications.
  • the relational database expresses the relationship between the data and the data in the form of a two-dimensional table, and extraction operators for extracting specific data from the table include selection, extraction, set operation, Cartesian product, and join.
  • the select operation selects only records that satisfy a given condition among all records (rows), and the project operation is an operation that takes a record consisting of only the values of fields (columns). Is an operation that refers to a field (key) to concatenate two or more tables and takes the necessary data.
  • an efficient range join can be performed by reducing the number of operations for a comparison operation between two tables to be joined by reversing the join condition for a table in which the indexed data values are sequentially sorted.
  • a method of joining a relational database may include joining two or more tables using a query processor, an index manager, and a join processor to perform a join operation that takes necessary data.
  • Comparing the join key with the user join condition and performing a range join, and returning a join execution result to the query processor sets a table having a small number of rows as a preceding table and a number of rows. Setting many tables as trailing tables; And comparing a user with a user join condition by searching for a join key in the following table by the number of data of the preceding table.
  • the index manager searches for index information used in a user join condition, and compares the searched index information with the user condition for equality or general size comparison.
  • the method may further include returning a join execution result to the query processor after performing the comparison operation.
  • the step of confirming a user join condition including a start condition and an end condition includes an inversion symbol indicating an inversion of a start condition to the user join condition.
  • the symbol is characterized by using at least any one of a symbol, a number, and a letter by user setting.
  • a table having a range of integer columns and an index of a comparison operation between two tables to be joined by inverting the join condition for a table in which the values of the indexed data are sequentially sorted It is possible to perform range join efficiently by reducing it, and the performance of range search can be improved as more tables have more data to compare.
  • FIG. 1 is a diagram illustrating a configuration of a join system of a relational database according to an embodiment of the present invention.
  • FIG. 2 is a flowchart illustrating a join method of a relational database according to an embodiment of the present invention.
  • FIG. 3 is a diagram for explaining a first range join method of FIG. 2.
  • FIG. 4 is a diagram for explaining a second range join method of FIG. 2.
  • FIG. 1 is a diagram illustrating a configuration of a join system of a relational database according to an embodiment of the present invention.
  • a join system of a relational database includes a query processor 110, a join processor 120, and an index manager 130.
  • the query processor 110 analyzes a user's SQL query and provides a query result corresponding to a user join query based on indexed data of a relational database.
  • the user's join query Parse to generate and send data request command for user join condition including start condition and end condition set range condition, and query result corresponding to user join query based on indexed data of relational database to provide.
  • the query processor 110 includes a query compiler and an execution engine.
  • the query compiler parses a query and delivers a query plan to the execution engine through optimization.
  • the execution engine generates data request instructions to join the processor. Or pass it to the index manager 130.
  • the index manager 130 indexes the columns of the plurality of tables, and searches for the data by using the indexed index information of the corresponding tables.
  • the join processor 120 searches the index information used for the user join condition by using the index manager 130 and compares the two tables to be joined with the user join condition to return the join result to the query processor 110. .
  • the join processor 120 checks the inverse comparison condition that the tables to be joined have a range value composed of integer columns, and the range values are sequentially arranged in size order while the range values have values that do not overlap each other.
  • the join processor 120 receives a data request command from the query processor 110, checks a user join condition including a start condition and an end condition, and checks the index manager 130. Search for index key value that satisfies inversion condition by inverting start condition, set previous index key value of searched index key value as join key, perform range join by comparing join key and user join condition, and then join The execution result is returned to the query processor 110.
  • the join processor 120 uses the index manager 130 through the inversion symbol of the user join condition by including an inversion symbol indicating the inversion of the start condition. Finds the index value by inverting the starting condition based on the indexed data.
  • the join processor 120 searches for index information used in the user join condition using the index manager 130, and compares the retrieved index information with the user join condition. After performing an equal range join or a general range join that performs a comparison operation through equal comparison or general size comparison, the join execution result is returned to the query processor 130.
  • FIG. 2 is a flowchart illustrating a join method of a relational database according to an exemplary embodiment of the present invention
  • FIG. 3 is a diagram illustrating a first range join method of FIG. 2
  • FIG. 4 is a diagram illustrating the second range join method of FIG. 2. It is a figure explaining.
  • the two tables to be joined are range values composed of integer columns, and the range values have values that do not overlap each other, and the table satisfies the inverse comparison condition if the indexed data values are sorted in ascending or descending order. do.
  • the join processor 120 finds an index key value that satisfies the inversion condition that inverts the starting condition by checking the user join condition, and the previous index key value of the index key value.
  • the first range join method performs a comparison operation of comparing the join key and the user join condition after using the join key.
  • the join processor 120 performs the first range join method when the inversion symbol is confirmed in the start condition among the user join conditions.
  • the inversion symbol may include at least one of a special symbol such as ⁇ , #, or a user setting symbol, a number, or a character. Any one or more can be used.
  • the join processor 120 sets the table A to the preceding table and the table B to the following table when joining the table A and the table B as shown in FIG.
  • the data values in table B are sorted in ascending order.
  • the join processor 120 uses the index manager 130 to obtain an index key value satisfying the inversion condition (A.IP ⁇ B.Start) in which the start condition (A.ip> @ B.Start) is inverted in the trailing table.
  • the join key is compared with the range condition using the previous index key value of the index key value found in the trailing table as the join key.
  • the join processor 120 performs a comparison operation for joining the range as much as the number of data in Table A, and then returns the result of joining between Table A and Table B to the query processor 110, and the query processor 110 joins the join.
  • the query result is provided to the user by reflecting the execution result.
  • the second range join method is a general equal range join or a general range join.
  • the join processor 120 uses the index manager 130 to sequentially combine all the data of the table B from the data of the first row of the table A and the range condition. Performs a comparison operation to compare.
  • the join processor 120 returns the join result to the query processor 110, and the query processor 110 joins Table A and Table B to reflect the join result and provides the query result to the user. S10)
  • two tables to be joined in the relational database are indexed data, have range values composed of integer columns, and range values do not overlap ranges with each other.
  • the first range join method is performed to reduce the number of operations of the comparison operation, thereby efficiently performing the range join, thereby improving the performance of the range search on the indexed data.
  • join method of the relational database uses a general comparison operator when two tables to be joined in the relational database are indexed data but the data values are range values consisting of integer columns but are not sequentially sorted.
  • second range join method that performs an equal range join or a general range join.

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)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 관계형 데이터베이스의 조인 방법에 관한 것으로서, 정수형 컬럼으로 이루어진 범위 값을 가지고, 색인된 데이터의 값이 순차적으로 정렬된 테이블에 대해 조인 조건을 반전시켜 조인하고자 하는 두 테이블간의 비교 연산에 대한 연산 횟수를 줄여 범위 조인을 효율적으로 수행할 수 있고, 비교대상이 되는 데이터가 많은 테이블일수록 범위 검색의 성능이 향상될 수 있다.

Description

관계형 데이터베이스의 조인 방법
본 발명은 관계형 데이터베이스의 조인 방법에 관한 것으로, 보다 상세하게는 정수형 컬럼으로 이루어진 범위 값을 가지고, 색인된 데이터의 값이 순차적으로 정렬된 테이블에 대한 효율적인 범위 조인을 수행하기 위한 관계형 데이터베이스의 조인 방법에 관한 것이다.
관계형 데이터베이스(relational database, 데이터베이스)는 일련의 정형화된 테이블로 구성된 데이터 항목들의 집합체로서, 데이터베이스의 구조와 구성될 데이터의 위치가 미리 정해져 있는 데이터베이스이다. 또한, 관계형 데이터베이스는 웹 애플리케이션을 통해 웹으로 데이터를 제공하는 주요 데이터 원천 역할을 담당하고 있다.
이러한 관계형 데이터베이스는 데이터와 데이터 간의 관계를 2차원 테이블 형태로 표현하고, 테이블에서 특정 데이터를 추출하기 위한 추출 연산자들에는 선택, 추출, 집합 연산, 카테시안 곱, 조인 등이 있다.
선택(select)연산은 전체 레코드(행) 중에서 주어진 조건을 만족하는 레코드들만 선택하는 것이고, 추출(project)연산은 필드(열)의 값들로만 이루어진 레코드를 취하게 하는 연산이며, 조인(join)연산은 어떤 필드(키)를 참조하여 두 개 이상의 테이블을 연결시켜 필요한 데이터를 취하는 연산이다.
관계형 데이터베이스에서 조인 연산 방법은 조인 조건이 필드 간의 동등비교(=)가 대부분이며, 테이블의 첫 번째 행부터 마지막 행까지 순차적으로 조인 조건을 비교하면서 조인 조건에 맞는 결과를 찾는 것이다.
종래의 관계형 데이터베이스의 조인 연산 방법은 비교연산자(=, >, <, >=, <=)를 사용하기 때문에 조인하고자 하는 테이블의 행의 수가 많을수록 데이터 검색 성능이 떨어져 효율적인 범위 조인이 불가능하다는 문제점이 있다.
본 발명은 정수형 컬럼으로 이루어진 범위 값을 가지고, 색인된 데이터의 값이 순차적으로 정렬된 테이블에 대해 조인 조건을 반전시켜 조인하고자 하는 두 테이블간의 비교 연산에 대해 연산 횟수를 줄여 효율적인 범위 조인을 수행할 수 있는 관계형 데이터베이스의 조인 방법을 제공한다.
실시예들 중에서, 관계형 데이터베이스의 조인 방법은, 질의 처리기, 색인 관리기 및 조인 처리기를 이용하여 두 개 이상의 테이블을 연결시켜 필요한 데이터를 취하는 조인 연산을 수행하기 위한 관계형 데이터베이스의 조인 방법에 있어서, 상기 테이블이 정수형 컬럼으로 이루어진 범위 값을 가지고, 상기 범위 값은 서로 범위가 중복되지 않은 값을 가지며, 크기순으로 순차 정렬되는 반전 비교 조건을 확인하는 단계; 조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하면, 시작 조건과 종료 조건을 포함한 사용자 조인 조건을 확인하는 단계; 상기 색인 관리기를 이용하여 조인하고자 하는 복수 개의 테이블에서 상기 시작 조건을 반전시킨 반전 조건을 만족하는 색인 키 값을 검색하며, 상기 검색된 색인 키 값의 이전 색인 키 값을 조인 키로 설정하는 단계; 및 상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계를 포함하는 것을 특징으로 한다.
상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계는, 복수 개의 테이블들 중 행의 수가 적은 테이블을 선행 테이블로 설정하며, 행의 수가 많은 테이블을 후행 테이블로 설정하는 단계; 및 상기 선행 테이블의 데이터 수만큼 상기 후행 테이블에서 조인 키를 검색하여 상기 사용자 조인 조건과 비교하는 비교 연산을 수행하는 것을 특징으로 한다.
상기 조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하지 않으면, 상기 색인 관리기를 이용하여 사용자 조인 조건에 사용되는 색인정보를 검색하고, 상기 검색된 색인 정보를 상기 사용자 조건과의 동등 비교 또는 일반 크기 비교를 통해 비교 연산을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계를 더 포함하는 것을 특징으로 한다.
상기 조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하면, 시작 조건과 종료 조건을 포함한 사용자 조인 조건을 확인하는 단계는, 상기 사용자 조인 조건에 시작 조건의 반전을 지시하는 반전기호를 포함하고, 상기 반전기호는 사용자 설정에 의해 기호, 숫자, 문자 중 적어도 어느 하나 이상을 사용하는 것을 특징으로 한다.
본 발명의 관계형 데이터베이스의 조인 방법은, 정수형 컬럼으로 이루어진 범위 값을 가지고, 색인된 데이터의 값이 순차적으로 정렬된 테이블에 대해 조인 조건을 반전시켜 조인하고자 하는 두 테이블간의 비교 연산에 대한 연산 횟수를 줄여 범위 조인을 효율적으로 수행할 수 있고, 비교대상이 되는 데이터가 많은 테이블일수록 범위 검색의 성능이 향상될 수 있는 효과가 있다.
도 1은 본 발명의 일 실시예에 따른 관계형 데이터베이스의 조인 시스템의 구성을 설명하는 도면이다.
도 2는 본 발명의 실시예에 따른 관계형 데이터베이스의 조인 방법을 설명하는 순서도이다.
도 3은 도 2의 제1 범위 조인 방식을 설명하는 도면이다.
도 4는 도 2의 제2 범위 조인 방식을 설명하는 도면이다.
본 발명에 기재된 실시예 및 도면에 도시된 구성은 본 발명의 바람직한 실시예에 불과할 뿐이고, 본 발명의 기술적 사상을 모두 표현하는 것은 아니므로, 본 발명의 권리범위는 본문에 설명된 실시예 및 도면에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.
여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.
도 1은 본 발명의 일 실시예에 따른 관계형 데이터베이스의 조인 시스템의 구성을 설명하는 도면이다.
도 1을 참고하면, 관계형 데이터베이스의 조인 시스템은, 질의 처리기(110), 조인 처리기(120) 및 색인 관리기(130)를 포함한다.
질의 처리기(110)는 사용자의 SQL 질의를 분석하고 관계형 데이터베이스의 색인된 데이터를 기반으로 사용자 조인 질의에 해당하는 질의 결과를 제공하는 것으로서, 입력된 질의가 조인을 사용하는 질의인 경우 사용자의 조인 질의를 파싱하여 시작 조건과 종료 조건이 설정된 범위 조건을 포함하는 사용자 조인(Join) 조건에 대해 데이터 요청 명령을 생성하여 전달하고, 관계형 데이터베이스의 색인된 데이터를 기반으로 사용자 조인 질의에 해당하는 질의 결과를 제공한다.
이러한 질의 처리기(110)는 질의 컴파일러와 실행 엔진을 포함하고, 질의 컴파일러는 질의를 파싱하여 최적화를 통해 질의 계획(query plan)을 실행 엔진으로 전달하며, 실행 엔진은 데이터 요청 명령어들을 생성하여 조인 처리기(120) 또는 색인 관리기(130)에 전달한다.
색인 관리기(130)는 복수 개의 테이블의 컬럼을 색인화하고, 데이터 검색시 해당 테이블의 색인화 되어있는 색인 정보를 이용하여 검색하도록 한다.
조인 처리기(120)는 색인 관리기(130)를 이용하여 사용자 조인 조건에 사용되는 색인 정보를 탐색하여 조인하고자 하는 두 테이블을 사용자 조인 조건과 비교 연산하여 조인 수행 결과를 질의 처리기(110)에 반환한다.
이러한 조인 처리기(120)는 조인하고자 하는 테이블이 정수형 컬럼으로 이루어진 범위 값을 가지고, 범위 값이 서로 범위가 중복되지 않은 값을 가지면서 크기순으로 순차 정렬되어 있는지 반전 비교 조건을 확인한다.
조인 처리기(120)는 조인하고자 하는 테이블이 반전 비교 조건을 만족하면, 질의 처리기(110)로부터 데이터 요청 명령을 전달받아 시작 조건과 종료 조건을 포함한 사용자 조인 조건을 확인하고, 색인 관리기(130)를 이용하여 시작 조건을 반전시킨 반전 조건을 만족하는 색인 키 값을 검색하며, 검색된 색인 키 값의 이전 색인 키 값을 조인 키로 설정한 후 조인 키와 사용자 조인 조건과 비교하여 범위 조인을 수행한 후 조인 수행 결과를 질의 처리기(110)에 반환한다.
이때, 조인 처리기(120)는 조인하고자 하는 테이블이 반전 비교 조건을 만족하는 경우에, 시작 조건의 반전을 지시하는 반전기호를 포함하도록 함으로써 사용자 조인 조건의 반전 기호를 통해 색인 관리기(130)를 이용하여 색인된 데이터를 기반으로 시작 조건을 반전시킨 색인 값을 찾게 된다.
그러나, 조인 처리기(120)는 조인하고자 하는 테이블이 반전 비교 조건을 만족하지 않는다면, 색인 관리기(130)를 이용하여 사용자 조인 조건에 사용되는 색인정보를 검색하고, 검색된 색인 정보를 사용자 조인 조건과의 동등 비교 또는 일반 크기 비교를 통해 비교 연산을 하는 동등 범위 조인 또는 일반 범위 조인을 수행한 후 조인 수행 결과를 질의 처리기(130)에 반환한다.
도 2는 본 발명의 실시예에 따른 관계형 데이터베이스의 조인 방법을 설명하는 순서도이고, 도 3은 도 2의 제1 범위 조인 방식을 설명하는 도면이며, 도 4는 도 2의 제2 범위 조인 방식을 설명하는 도면이다.
도 2 내지 도 4를 참고하면, 관계형 데이터베이스의 조인 방법은, 질의 처리기(110)에서 SQL(Structured Query Language) 질의가 입력되면 SQL 분석을 통해 조인 연산이 확인되면 사용자 조인 조건을 확인한다.(S1 ~ S4)
조인하고자 하는 2개의 테이블은 정수형 컬럼으로 이루어진 범위 값이고, 이 범위 값은 서로 범위가 중복되지 않는 값을 가지며, 테이블은 색인된 데이터 값이 오름차순 또는 내림차순으로 정렬되어 있다면 반전 비교 조건을 만족한다고 판단한다.
따라서, 조인 처리기(120)는 조인하고자 하는 테이블이 반전 비교 조건을 만족하면 사용자 조인 조건을 확인하여 시작 조건을 반전시킨 반전 조건을 만족하는 색인 키 값을 찾고, 이 색인 키 값의 이전 색인 키 값을 조인 키로 한 후 조인키와 사용자 조인 조건을 비교하는 비교 연산을 하는 제1 범위 조인 방식을 수행한다. (S6)
이때, 조인 처리기(120)는 사용자 조인 조건 중 시작 조건에서 반전 기호가 확인되면 제1 범위 조인 방식을 수행하는데, 반전 기호는 @, # 등의 특수 기호, 또는 사용자 설정 기호, 숫자, 문자 중 적어도 어느 하나 이상을 사용할 수 있다.
예를 들어, 조인 처리기(120)는 제1 범위 조인 방식에서 사용자 조인 조건이 " A.ip>@ B.Start and A.ip <= B.End "인 경우에 시작 조건은 A.ip>@ B.Start이고, 종료 조건은 A.ip <= B.End이다.
조인 처리기(120)는, 도 3에 도시된 바와 같이, 테이블 A와 테이블 B를 조인할 경우에, 테이블 A를 선행 테이블로 설정하고, 테이블 B를 후행 테이블로 설정한다. 테이블 B의 데이터 값은 오름차순으로 정렬되어 있다.
그리고, 조인 처리기(120)는 색인 관리기(130)를 이용해 시작 조건(A.ip>@ B.Start)를 반전시킨 반전 조건(A.IP< B.Start)를 만족하는 색인 키값을 후행 테이블에서 탐색하고, 후행 테이블에서 탐색된 색인 키 값의 이전 색인 키 값을 조인 키로 하여 조인 키와 범위 조건을 비교한다.
이때, 비교 결과 범위 조건을 만족하면 A.ip가 해당 색인 킷값의 범위에 포함되는 것이므로 해당 컬럼에 조인이 성공적으로 이루어진 것이고, 비교 결과 범위 조건을 만족하지 않으면 A.ip를 포함하는 범위가 없는 것이다.
즉, 조인 처리기(120)는 테이블 A의 첫 번째 데이터인 A.ip=10에 대해 A.ip< B.Start를 만족하는 색인 키값을 테이블 B에서 검색하여 색인 키 값인 31을 찾고, 테이블 B에서 31 이전의 색인 키 값인 1을 조인 키로 하여 조인 키가 있는 컬럼의 범위 값(1~30)에서 A.ip(10)가 범위 조건인 A.ip> B.Start와 A.ip <= B.End을 만족하면 A.ip(10)가 해당 범위 값에 포함되는 것이므로 A.ip(10)은 "Code US"의 컬럼에 조인이 성공적으로 이루어질 수 있다.
따라서, 조인 처리기(120)는 범위 조인을 위한 비교 연산을 테이블 A의 데이터 수만큼 수행한 후 테이블 A와 테이블 B와의 조인 수행 결과를 질의 처리기(110)로 반환하며, 질의 처리기(110)는 조인 수행 결과를 반영하여 사용자에게 질의 결과를 제공한다.(S8 ~ S10)
한편, 조인 처리기(120)는 조인하고자 하는 테이블이 반전 비교 조건을 만족하지 않는 경우에, 사용자 조인 조건이 " A.ip>= B.Start and A.ip <= B.End "인 범위 조건이므로, 도 4에 도시된 바와 같이, 제2 범위 조인 방식을 수행한다.(S7)
제2 범위 조인 방식은 일반적인 동등 범위 조인 또는 일반 범위 조인으로서, 조인 처리기(120)는 색인 관리기(130)를 이용하여 테이블 A의 첫 번째 행의 데이터부터 테이블 B의 모든 데이터를 순차적으로 범위 조건과 비교하는 비교 연산을 수행한다.
즉, 조인 처리기(120)는 범위 조건에 동등 비교(=)를 포함한 비교 연산자가 있으면 동등 범위 조인을 수행하고, 동등 비교(=)없이 부등호(<, >)만을 포함한 비교 연산자가 있으면 일반 범위 조인을 수행한다.
조인 처리기(120)는 테이블 B에 대해 순차적으로 A.ip >= B.Start 인 시작 조건을 만족하는지 비교하고, 해당 시작 조건을 만족하면 A.ip<= B.Start 인 종료 조건을 만족하는지 비교한다.
조인 처리기(120)는 A.ip가 테이블 B의 특정한 컬럼에 대해 A.ip>= B.Start와 A.ip <= B.End 인 시작 조건과 종료 조건을 모두 만족하면 해당 컬럼의 범위 값에 포함되는 것이고, 시작 조건과 종료 조건을 만족하지 못하면 해당 컬럼의 범위 값에 포함되지 않는다고 판단한다. 따라서, 조인 처리기(120)는 테이블 A의 데이터 수와 테이블 B의 데이터 수를 곱한 수만큼의 조인 수행 결과를 출력된다.
조인 처리기(120)는 조인 수행 결과를 질의 처리기(110)로 반환하고, 질의 처리기(110)는 조인 수행 결과를 반영하여 테이블 A와 테이블 B를 조인하여 사용자에게 질의 결과를 제공한다.(S8 ~ S10)
이와 같이, 본 발명의 실시예에 따른 관계형 데이터베이스의 조인 방법은 관계형 데이터베이스에서 조인하고자 하는 2개의 테이블이 색인된 데이터이고, 정수형 컬럼으로 이루어진 범위 값을 가지며, 범위 값은 서로 범위가 중복되지 않은 값을 가지고, 크기순으로 순차 정렬되는 반전 비교 조건을 만족하면 제1 범위 조인 방식을 수행하여 비교 연산의 연산 횟수를 줄여 효율적으로 범위 조인을 함으로써 색인된 데이터에 대한 범위 검색의 성능이 향상될 수 있다.
또한, 본 발명의 실시예에 따른 관계형 데이터베이스의 조인 방법은 관계형 데이터베이스에서 조인하고자 하는 2개의 테이블이 색인된 데이터이지만 데이터의 값이 정수형 컬럼으로 이루어진 범위 값이지만 순차 정렬되지 않은 경우에 일반 비교 연산자를 이용하여 동등 범위 조인 또는 일반 범위 조인을 수행하는 제2 범위 조인 방식을 수행한다.
상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.

Claims (6)

  1. 질의 처리기와 색인 처리기에 결합된 조인 처리기에서, 두 개 이상의 테이블을 연결시켜 필요한 데이터를 취하는 조인 연산을 수행하기 위한 관계형 데이터베이스의 조인 방법에 있어서,
    상기 테이블이 정수형 컬럼으로 이루어진 범위 값을 가지고, 상기 범위 값은 서로 범위가 중복되지 않은 값을 가지며, 크기순으로 순차 정렬되는 경우 반전 비교 연산을 처리하는 반전 비교 연산자를 정의하는 단계;
    조인 연산을 수행함에 있어, 연산자가 반전 비교 연산자인 경우, 조인하고자 하는 복수 개의 테이블에서 상기 시작 조건을 반전시킨 반전 조건을 만족하는 색인 키 값을 검색하며, 상기 검색된 색인 키 값의 이전 색인 키 값을 조인 키로 설정하는 단계; 및
    상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계를 포함하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
  2. 제1항에 있어서,
    상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계는,
    복수 개의 테이블들 중 행의 수가 적은 테이블을 선행 테이블로 설정하며, 행의 수가 많은 테이블을 후행 테이블로 설정하는 단계; 및
    상기 선행 테이블의 데이터 수만큼 상기 후행 테이블에서 조인 키를 검색하여 상기 사용자 조인 조건과 비교하는 비교 연산을 수행하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
  3. 질의 처리기와 색인 처리기에 결합된 조인 처리기에서, 두 개 이상의 테이블을 연결시켜 필요한 데이터를 취하는 조인 연산을 수행하기 위한 관계형 데이터베이스의 조인 방법에 있어서,
    상기 테이블이 정수형 컬럼으로 이루어진 범위 값을 가지고, 상기 범위 값은 서로 범위가 중복되지 않은 값을 가지며, 크기순으로 순차 정렬되는 반전 비교 조건을 확인하는 단계;
    조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하면, 시작 조건과 종료 조건을 포함한 사용자 조인 조건을 확인하는 단계;
    상기 색인 관리기를 이용하여 조인하고자 하는 복수 개의 테이블에서 상기 시작 조건을 반전시킨 반전 조건을 만족하는 색인 키 값을 검색하며, 상기 검색된 색인 키 값의 이전 색인 키 값을 조인 키로 설정하는 단계; 및
    상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계를 포함하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
  4. 제3항에 있어서,
    상기 조인 키와 상기 사용자 조인 조건을 비교하여 범위 조인을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계는,
    복수 개의 테이블들 중 행의 수가 적은 테이블을 선행 테이블로 설정하며, 행의 수가 많은 테이블을 후행 테이블로 설정하는 단계; 및
    상기 선행 테이블의 데이터 수만큼 상기 후행 테이블에서 조인 키를 검색하여 상기 사용자 조인 조건과 비교하는 비교 연산을 수행하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
  5. 제3항에 있어서,
    상기 조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하지 않으면, 상기 색인 관리기를 이용하여 사용자 조인 조건에 사용되는 색인정보를 검색하고, 상기 검색된 색인 정보를 상기 사용자 조건과의 동등 비교 또는 일반 크기 비교를 통해 비교 연산을 수행한 후 조인 수행 결과를 상기 질의 처리기에 반환하는 단계를 더 포함하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
  6. 제3항에 있어서,
    조인하고자 하는 테이블이 상기 반전 비교 조건을 만족하면, 시작 조건과 종료 조건을 포함한 사용자 조인 조건을 확인하는 단계는,
    상기 사용자 조인 조건에 상기 시작 조건의 반전을 지시하는 반전기호를 포함하고, 상기 반전기호는 사용자 설정에 의해 기호, 숫자, 문자 중 적어도 어느 하나 이상을 사용하는 것을 특징으로 하는 관계형 데이터베이스의 조인 방법.
PCT/KR2017/003320 2017-03-28 2017-03-28 관계형 데이터베이스의 조인 방법 WO2018182058A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2017-0039026 2017-03-28
KR1020170039026A KR101928819B1 (ko) 2017-03-28 2017-03-28 관계형 데이터베이스의 조인 방법

Publications (1)

Publication Number Publication Date
WO2018182058A1 true WO2018182058A1 (ko) 2018-10-04

Family

ID=63676388

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/003320 WO2018182058A1 (ko) 2017-03-28 2017-03-28 관계형 데이터베이스의 조인 방법

Country Status (2)

Country Link
KR (1) KR101928819B1 (ko)
WO (1) WO2018182058A1 (ko)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101997004B1 (ko) 2018-12-12 2019-07-05 한국과학기술정보연구원 시공간 조인 쿼리의 프로세싱 방법 및 이를 적용한 장치
KR102233944B1 (ko) * 2019-04-05 2021-03-30 주식회사 티맥스티베로 데이터베이스 관리를 위한 컴퓨터 프로그램

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294604A1 (en) * 2007-05-25 2008-11-27 International Business Machines Xquery join predicate selectivity estimation
KR20100114664A (ko) * 2009-04-16 2010-10-26 연세대학교 산학협력단 데이터 스트림에서의 다중 조인 질의 최적화 방법
KR20120097302A (ko) * 2011-02-24 2012-09-03 연세대학교 산학협력단 데이터 스트림에서의 다중 조인 질의 처리 방법
US20120330923A1 (en) * 2011-06-21 2012-12-27 Microsoft Corporation Value-based positioning for outer join queries
US20130151502A1 (en) * 2011-12-12 2013-06-13 Sap Ag Mixed Join of Row and Column Database Tables in Native Orientation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100484138B1 (ko) 2002-05-08 2005-04-18 삼성전자주식회사 관계형 데이터베이스에서 정규 경로식 질의를 처리하는xml 인덱싱 방법과 자료구조

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080294604A1 (en) * 2007-05-25 2008-11-27 International Business Machines Xquery join predicate selectivity estimation
KR20100114664A (ko) * 2009-04-16 2010-10-26 연세대학교 산학협력단 데이터 스트림에서의 다중 조인 질의 최적화 방법
KR20120097302A (ko) * 2011-02-24 2012-09-03 연세대학교 산학협력단 데이터 스트림에서의 다중 조인 질의 처리 방법
US20120330923A1 (en) * 2011-06-21 2012-12-27 Microsoft Corporation Value-based positioning for outer join queries
US20130151502A1 (en) * 2011-12-12 2013-06-13 Sap Ag Mixed Join of Row and Column Database Tables in Native Orientation

Also Published As

Publication number Publication date
KR101928819B1 (ko) 2019-03-12
KR20180109379A (ko) 2018-10-08

Similar Documents

Publication Publication Date Title
Singla et al. String matching algorithms and their applicability in various applications
Zeng et al. Quickfoil: Scalable inductive logic programming
Zhang et al. Bed-tree: an all-purpose index structure for string similarity search based on edit distance
US20080010316A1 (en) Spelling correction with liaoalphagrams and inverted index
WO2011057259A1 (en) Enabling faster full-text searching using a structured data store
CN101398820A (zh) 一种大规模关键词匹配方法
Kempa et al. Lempel-Ziv factorization: Simple, fast, practical
JP2010528369A (ja) 検索のためのユーザ定義の関連性ランク付け
CN105335481B (zh) 一种大规模字符串文本的后缀索引构造方法及装置
CN102915381B (zh) 基于多维语义的可视化网络检索呈现***及呈现控制方法
US20120078880A1 (en) Accelerating Database Queries Containing Bitmap-Based Conditions
Bhukya et al. Exact multiple pattern matching algorithm using DNA sequence and pattern pair
CN104281275B (zh) 一种英文的输入方法和装置
US10565188B2 (en) System and method for performing a pattern matching search
WO2018182058A1 (ko) 관계형 데이터베이스의 조인 방법
US7725448B2 (en) Method and system for disjunctive single index access
US9965546B2 (en) Fast substring fulltext search
US8606772B1 (en) Efficient multiple-keyword match technique with large dictionaries
Lu et al. Boosting the quality of approximate string matching by synonyms
CN107729518A (zh) 一种关系型数据库的全文检索方法及装置
Tsyvina et al. Fast estimation of genetic relatedness between members of heterogeneous populations of closely related genomic variants
Liu et al. Suffix array for multi-pattern matching with variable length wildcards
Ferragina et al. Search Engines
US9230013B1 (en) Suffix searching on documents
Ejendibia et al. String searching with DFA-based algorithm

Legal Events

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

Ref document number: 17902842

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17902842

Country of ref document: EP

Kind code of ref document: A1