KR20080051063A - Method for managing intergrated xquery - Google Patents

Method for managing intergrated xquery Download PDF

Info

Publication number
KR20080051063A
KR20080051063A KR1020070122823A KR20070122823A KR20080051063A KR 20080051063 A KR20080051063 A KR 20080051063A KR 1020070122823 A KR1020070122823 A KR 1020070122823A KR 20070122823 A KR20070122823 A KR 20070122823A KR 20080051063 A KR20080051063 A KR 20080051063A
Authority
KR
South Korea
Prior art keywords
node
result
xquery
generation
parent
Prior art date
Application number
KR1020070122823A
Other languages
Korean (ko)
Other versions
KR100882589B1 (en
Inventor
이명철
이미영
김명준
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Publication of KR20080051063A publication Critical patent/KR20080051063A/en
Application granted granted Critical
Publication of KR100882589B1 publication Critical patent/KR100882589B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/221Parsing markup language streams

Abstract

A method for processing an integrated XQuery(XML(eXtensible Markup Language) Query) is provided to process the continuous XQueries in an XML database based on a relational database and supporting an XQuery by loading a permanent node needed for processing the XQuery from XML data to a memory, forming an integrated XQuery result based on integrating a generated node result formed in the memory with a permanent node result, and utilizing the result as an intermediary result. A permanent node needed for processing an XQuery is loaded from a relational database to a memory as an intermediary result(108). An XQuery generator forms a new generated node in the memory as the intermediary result(109). Whole tree of an integrated XQuery result is formed by connecting the permanent node loaded from the relational database with the node generated from the XQuery generator when an XML path expression representing the permanent node of the relational database is used in the XQuery generator(111). A continuous XML path expression query is processed by using the integrated XQuery result as the intermediary result.

Description

통합 XQuery 질의 처리 방법{METHOD FOR MANAGING INTERGRATED XQUERY}How to handle integrated query queries {METHOD FOR MANAGING INTERGRATED XQUERY}

본 발명은, 통합 XQuery 질의 처리 방법에 관한 것이다.The present invention relates to an integrated XQuery query processing method.

본 발명은 정보통신부 및 정보통신연구진흥원의 IT신성장동력핵심기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2005-S-405-02, 과제명: 차세대 인터넷 서버 기술 개발].The present invention is derived from the research conducted as part of the IT new growth engine core technology development project of the Ministry of Information and Communication and the Ministry of Information and Communication Research and Development. .

최근, 인터넷이 확산함에 따라 XML 데이터의 생성 및 유통이 급격하게 증가하였고, 그에 따라 대량의 XML 데이터를 관리할 필요성이 대두하고 있다. 따라서, 관리하는 XML 데이터의 양이 많아질수록 데이터의 빠른 검색, 여러 사용자 간의 공유, 백업 및 고장 시 복구 등 기존의 관계형 데이터베이스에서 제공하던 관리 기능이 필요하게 되어, 관계형 데이터베이스를 기반으로 하는 XML 데이터베이스에 대한 연구가 활발히 수행되고 있다.In recent years, as the Internet spreads, the generation and distribution of XML data has rapidly increased, and accordingly, there is a need for managing a large amount of XML data. Therefore, as the amount of XML data managed increases, the management functions provided by the existing relational database such as data retrieval, sharing among multiple users, backup and recovery in case of failure are needed. Research is being actively conducted.

대량의 XML 데이터를 관리하는 XML 데이터베이스에서는, 대량의 XML 데이터를 대상으로 검색이 수행되기 때문에, 검색 조건 또는 사용자의 결과 반환 요구 형태에 따라 그 결과도 대량이 되는 경우가 빈번히 발생한다.In an XML database that manages a large amount of XML data, since a search is performed on a large amount of XML data, the results often become large depending on the search condition or the user's result return request form.

특히, 경로 표현식 및 FLWOR 절 등의 복잡한 질의 기능을 제공하는 XQuery 질의 언어를 지원하며 관계형 데이터베이스를 기반으로 하는 XML 데이터베이스의 경우에는, 하나의 XQuery 문장을 처리하는 데 있어 관계형 데이터베이스에서 한번에 원하는 영속 노드 결과를 얻어 와서 최종 결과를 만들어 내는 방식으로 XQuery 질의 처리를 할 수 있는 것이 아니라, XQuery 문장의 주요 구문을 처리하는 과정에서 계속하여 관계형 데이터베이스에 접속하여 부분적으로 중간 결과들을 만들어 내고, 그러한 중간 결과를 대상으로 계속적인 질의 처리를 수행하여 최종적인 XQuery 결과를 만들어 내는 방식으로 질의 처리를 수행할 수밖에 없다.In particular, for XML databases based on relational databases that support complex query features such as path expressions and FLWOR clauses, persistent node results at once in a relational database for processing a single XQuery statement. Rather than being able to process XQuery queries in a way that yields a final result and then produces a final result, in the process of processing the main syntax of an XQuery statement, it continues to access a relational database to produce partially intermediate results. You have no choice but to perform query processing in such a way as to continuously execute query processing to produce the final XQuery result.

이와 같이, 복잡한 XQuery 질의문을 처리하면서 계속하여 관계형 데이터베이스로부터 중간 결과를 만들어 내고 중간 결과를 대상으로 계속적인 질의 처리를 수행하여 최종 결과를 만들어 내는 질의 처리 방식에서는, 가능한 관계형 데이터베이스로부터 얻어온 영속 노드 결과의 양을 적게 하여 메모리에 적재하는 방식으로 XQuery 질의 처리를 수행하는 것이 XQuery 질의 처리 성능을 향상시키는 가장 핵심적인 방안이다.As described above, in a query processing method in which a complex XQuery query statement continues to produce intermediate results from a relational database, and continuous query processing for intermediate results produces a final result, a persistent node result obtained from a relational database is possible. Performing XQuery query processing with a small amount of memory and loading it into memory is the most important way to improve XQuery query processing performance.

종래의 관계형 데이터베이스를 기반으로 하는 XML 데이터베이스에서는, 최적화된 질의 실행 계획을 생성하고 수행함으로써, 관계형 데이터베이스로부터 XML 데이터베이스로 전달되는 결과의 개수를 줄이거나 질의 처리 수행 시간을 줄이는 방식으로 검색 성능을 향상하려는 노력을 하고 있지만, 검색된 중간 및 최종 검색 결과에 대해서는 대체로 모든 결과 트리를 한꺼번에 메모리에 적재하는 방식으로 처리하고 있다.In an XML database based on a conventional relational database, an attempt is made to improve search performance by generating and executing an optimized query execution plan to reduce the number of results passed from the relational database to the XML database or to reduce query processing time. We're working on it, but we're dealing with the intermediate and final search results that are mostly loaded into memory at once.

그러나, 트리 구조를 갖는 XML 모델의 특성상 검색 결과에 해당하는 노드가 자식 및 자손 노드를 많이 갖는 노드, 즉 크기가 큰 서브 트리인 경우, 이러한 서브 트리를 전부 메모리에 적재하게 되면 여전히 결과가 너무 많게 된다. 또한 서브 트리의 많은 노드의 대부분은, 계속적인 질의 처리를 수행하는데 불필요한 노드인 경우가 많다.However, due to the nature of the XML model with a tree structure, if the node corresponding to the search result is a node having many child and descendant nodes, that is, a large subtree, if such a subtree is loaded into memory, there are still too many results. do. Also, most of the many nodes in the subtree are often unnecessary nodes for continuous query processing.

따라서, XML 데이터베이스의 XQuery 질의 처리 시스템이 아무리 최적화된 검색을 수행해 주더라도 전체 중간 결과 서브 트리가 한꺼번에 메모리로 적재가 된다면 성능에 치명적인 문제가 발생하게 되며, 중간 결과 노드의 서브 트리 전체를 한꺼번에 메모리에 적재하는 것보다는 필요한 중간 결과 노드만을 생성해서 메모리에 적재하는 것이 바람직하다.Therefore, even if the XQuery query processing system of the XML database performs an optimized search, if the entire intermediate result subtree is loaded into memory all at once, a serious fatal problem occurs, and the entire subtree of the intermediate result node is stored in memory at once. Rather than loading it, it is preferable to create and load only the intermediate result nodes that are needed.

또한, XQuery에서는 검색 결과를 재구성할 수 있도록 생성자 기능을 제공하며, XQuery 질의문에서 생성자를 사용하게 되면, 관계형 데이터베이스로부터 구성한 영속 노드 결과와 함께 새로운 생성 노드 결과가 메모리에 구성이 되며, 생성 노드 결과와 영속 노드가 서로 부모/자식 노드 관계 또는 소유 엘리먼트/소속 애트리뷰트 관계로 서로 연관이 되어 전체 XQuery 결과를 구성하게 된다.In addition, XQuery provides a constructor function to reconstruct search results. When using a constructor in an XQuery query statement, the new generation node result is configured in memory along with the persistent node result configured from the relational database. And persistent nodes are related to each other in a parent / child node relationship or in an owning element / dependent attribute relationship to form a complete XQuery result.

이와 같이, 영속 노드가 생성 노드와 연관이 되어 구성된 통합 XQuery 결과는 중간 결과로서 활용이 되어 다시 계속적인 질의 처리 과정을 거치게 되며, XML 데이터베이스의 XQuery 질의 처리 시스템에서 영속 노드, 생성 노드 또는 영속 노드와 생성 노드가 결합된 통합 XQuery 결과 노드 등의 노드 종류에 무관하게 질의 처리를 수행할 수 있는 방법이 필요하게 된다.In this way, the integrated XQuery result, which is composed of the persistent node in association with the generation node, is utilized as an intermediate result, and then continues with the query processing process. In the XQuery query processing system of the XML database, the persistent node, the generation node, or the persistent node There is a need for a method that can perform query processing regardless of the node type, such as an integrated XQuery result node combined with a generation node.

따라서, 본 발명에서는 관계형 데이터베이스에서 영속적으로 관리되는 XML 데이터로부터 XQuery 질의 처리에 꼭 필요한 영속 노드만을 메모리에 적재하고, 영속 노드 결과와 XQuery 생성자에 의해서 구성되는 생성 노드 결과를 통합하여 통합 XQuery 결과를 구성하고, 이와 같이 구성된 통합 XQuery 결과를 중간 결과로서 활용하여 계속적인 XQuery 질의 처리를 수행하여 최종적인 XQuery 결과를 구할 수 있는 방안을 제시하고자 한다.Therefore, in the present invention, only persistent nodes necessary for XQuery query processing are loaded into memory from XML data managed permanently in a relational database, and integrated XQuery results are formed by integrating persistent node results and generation node results configured by the XQuery constructor. In addition, the integrated XQuery result configured as above is used as an intermediate result to suggest a way to obtain a final XQuery result by performing continuous XQuery query processing.

본 발명은, 상기한 문제점을 해결하기 위하여 제안된 것으로, 관계형 데이터베이스를 기반으로 하고 XQuery를 질의 언어로서 지원하는 XML 데이터베이스에서, 관계형 데이터베이스에 관리되는 XML 데이터로부터 XQuery 질의 처리에 꼭 필요한 영속 노드만을 메모리에 적재하고, 또한 XQuery 생성자에 의해 메모리에 구성되는 생성 노드 결과를 영속 노드 결과와 통합하여 통합 XQuery 결과를 구성하는 방법, 그리고 이를 중간 결과로서 활용하여 계속적인 XQuery 질의 처리를 수행하는 방법을 제공하는데 그 목적이 있다.The present invention has been proposed to solve the above problems, and in an XML database based on a relational database and supporting XQuery as a query language, only persistent nodes necessary for processing XQuery queries from XML data managed in the relational database are stored. It provides a method of constructing an integrated XQuery result by integrating the resultant node result configured in memory by the XQuery constructor with the persistent node result, and using it as an intermediate result to perform continuous XQuery query processing. The purpose is.

상기의 목적을 달성하기 위하여, 본 발명에 따른 통합 XQuery 질의 처리 방법은, 관계형 데이터베이스의 영속 XML 데이터를 질의 대상으로 하는 XML 경로 표현식의 처리 과정에서, 중간 결과로서 관계형 데이터베이스로부터 질의 처리에 필요한 영속 노드만을 가져 와서 메모리에 적재하는 제 1 단계; XQuery 생성자의 처리 과정에서, 중간 결과로서 새로운 생성 노드를 메모리에 구성하는 제 2 단계; XQuery 생성자의 내부에서 관계형 데이터베이스의 영속 노드를 나타내는 XML 경로 표현식이 사용되는 경우, 상기 관계형 데이터베이스로부터 가져온 영속 노드를 상기 XQuery 생성자로부터 생성된 생성 노드에 연결하여 통합 XQuery 결과의 전체 트리를 구성하는 제 3 단계; 및 상기 통합 XQuery 결과를 중간 결과로서 활용하여 계속적인 XML 경로 표현식 질의를 처리하는 제 4 단계를 포함한다.In order to achieve the above object, the integrated XQuery query processing method according to the present invention is a persistent node required for processing a query from the relational database as an intermediate result in the process of processing the XML path expression targeting the persistent XML data of the relational database. The first step of taking only and loading it into memory; In the processing of the XQuery constructor, a second step of configuring a new generation node in memory as an intermediate result; When an XML path expression representing a persistent node of a relational database is used inside an XQuery constructor, a third tree that constructs the entire tree of integrated XQuery results by concatenating the persistent node obtained from the relational database to a generation node generated from the XQuery constructor. step; And a fourth step of processing the continuous XML path expression query utilizing the integrated XQuery result as an intermediate result.

상기와 같은 본 발명은, 관계형 데이터베이스를 기반으로 하며 XQuery를 질의 언어로서 지원하는 XML 데이터베이스에서 관계형 데이터베이스에서 영속적으로 관리되는 XML 데이터로부터 영속 노드 결과의 메모리 적재 시에 꼭 필요한 영속 노드만을 메모리에 적재하므로써, 메모리에 적재된 영속 노드가 비단말 노드인 경우에도 모든 자식 및 자손 노드를 얻어 오지 않고 해당 영속 노드만을 얻어 와도 계속된 질의 처리가 가능하여 필요 없는 영속 노드의 메모리 적재를 방지하여 전체적인 XQuery 질의 처리 성능을 향상시킬 수 있는 효과가 있으며, 또한 영속 노드 결과와 생성 노드 결과가 통합된 통합 XQuery 결과에 대하여 일관된 질의 처리가 가능하게 하는 효과가 있다.As described above, the present invention is based on a relational database, and in an XML database supporting XQuery as a query language, by loading only the persistent nodes necessary for loading a memory of persistent node results from the XML data persistently managed in the relational database. Even if a persistent node loaded in memory is a non-terminal node, all the child and descendant nodes are not obtained, but only the persistent node can be processed to continue the query processing. This has the effect of improving performance, and also enables consistent query processing on integrated XQuery results that integrate persistent and resultant node results.

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 더욱 분명해 질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 다양한 실시예들을 상세히 설명하기로 한다.The above objects, features, and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, whereby those skilled in the art may easily implement the technical idea of the present invention. There will be. In addition, in describing the present invention, when it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted. Hereinafter, various exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은, 본 발명에 따른 관계형 데이터베이스로부터의 영속 노드 결과와 XQuery 생성자에 의한 생성 노드 결과를 통합하여, 통합 XQuery 결과를 구성하는 과정을 나타내는 일실시예 흐름도이다.1 is a flowchart illustrating a process of constructing an integrated XQuery result by integrating a persistent node result from a relational database and a resultant node result by an XQuery constructor according to the present invention.

도 1에 도시된 바와 같이, 본 발명에 따른 통합 XQuery 결과 구성 방법은, 사용자가 입력한 XQuery 질의를 구문 분석하여 구문 분석 트리를 구성하는 단계(102), 상기 구문 분석 트리의 노드를 하나씩 방문하며 XQuery 질의 처리를 수행하는 단계(103) 및 상기 방문한 노드가 구문 분석 트리의 마지막 노드인지를 판단하는 단계(104)를 포함한다. As shown in FIG. 1, the method for constructing an integrated XQuery result according to the present invention comprises the steps of constructing a parsing tree by parsing an XQuery query input by a user (102), visiting nodes of the parsing tree one by one. Performing 103 XQuery query processing; and determining 104 whether the visited node is the last node of the parse tree.

그리고, 상기 본 발명에 따른 통합 XQuery 결과 구성 방법은, 상기 판단 결과 마지막 노드가 아닌 경우에, 상기 방문한 노드의 노드 타입을 검사하는 단계(105)를 포함하고, 상기 판단 결과 상기 방문한 노드의 노드 타입이 생성자인 경우에 생성 노드를 구성하고(109), 상기 판단 결과 상기 방문한 노드 타입이 경로 표현식인 경우에 질의 대상이 무엇인지를 판단한다(106).The integrated XQuery result construction method according to the present invention includes the step 105 of checking the node type of the visited node when the determination result is not the last node, and as a result of the determination, the node type of the visited node. In the case of this constructor, a generation node is configured (109), and when the visited node type is a path expression, it is determined what the query target is (106).

그리고, 상기 본 발명에 따른 통합 XQuery 결과 구성 방법은, 상기 판단 결과 상기 질의 대상이 영속 노드인 경우에 데이터베이스로부터 영속 노드를 가져 와서 메모리에 구성하고(108), 상기 질의 대상이 생성 노드인 경우에 이미 메모리에 구성된 생성 노드 트리의 모든 노드를 방문하며 결과 노드를 구성한다(107).In the integrated XQuery result construction method according to the present invention, when the query target is a persistent node, the persistent node is obtained from a database and configured in a memory (108), and when the query target is a generation node. All nodes of the generation node tree already configured in memory are visited and a result node is constructed (107).

그리고, 상기 본 발명에 따른 통합 XQuery 결과 구성 방법은, 상술한 106, 107, 108, 109의 과정들이 완료되면, 생성자 내부인지를 검사하고(110), 상기 검사 결과 생성자 내부이면 상기 메모리에 구성된 생성 노드 또는 영속 노드를 상위 생성 노드와 연결하고(111), 상기 검사 결과 생성자 내부가 아니면 상기 103 단계로 복귀한다.The integrated XQuery result construction method according to the present invention, if the above-described processes of 106, 107, 108, and 109 are completed, checks whether it is inside a generator (110), and if it is inside the inspection result generator, generates a configuration configured in the memory. The node or persistent node is connected with the higher generation node (111), and if the check result generator is not inside, the process returns to step 103.

마지막으로, 상기 103 단계로 복귀하여, 방문한 노드가 마지막 노드라고 판단되는 경우에(104), 상기 XQuery 질의 처리 절차를 종료한다(112)Finally, in step 103, if it is determined that the visited node is the last node (104), the XQuery query processing procedure is terminated (112).

상술한 과정들 중, 생성 노드 또는 영속 노드를 생성자 내부에서 상위 생성 노드와 연결하는 과정(111)은, W3C에서 제정한 DOM(Document Object Model) 규격 또는 XDM(XQuery Data Model) 규격에 따라, 부모/자식 노드 또는 소유 엘리먼트/소속 애트리뷰트 관계가 될 수 있으며, 생성 노드의 노드 유형과 영속 노드의 노드 유형에 따라 결정된다. 생성 노드의 노드 유형과 영속 노드의 노드 유형에 대해서는, 후술하는 도 8의 영속 노드와 생성 노드의 상속 및 연관 관계도를 참조하여 자세히 설명하기로 한다.Among the above-described processes, the process 111 of connecting the generation node or the persistent node with the parent generation node in the constructor may be based on a parent according to the Document Object Model (DOM) standard or the XQuery Data Model (XDM) standard established by the W3C. It can be a / child node or owned element / dependent attribute relationship, depending on the node type of the producing node and the node type of the persistent node. The node type of the generation node and the node type of the persistent node will be described in detail with reference to the inheritance and association diagrams of the persistent node and the generation node of FIG. 8 described later.

도 2는, 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위하여, 관계형 데이터베이스를 기반으로 하는 XML 데이터베이스에서 영속적으로 관리되는 XML 데이터의 일실시예이다.FIG. 2 is an embodiment of XML data persistently managed in an XML database based on a relational database in order to explain the integrated XQuery result construction and query processing method according to the present invention.

도 2에 도시된 바와 같이, 임의의 XML 데이터는, 루트 엘리먼트가 "users(사용자들)" 엘리먼트(201)이며, "users(사용자들)" 엘리먼트(201)는, 3개의 "user(사용자)" 엘리먼트(202-1, 202-2, 202-3)를 자식 노드로 갖고 있으며, 각 "user(사용자)" 엘리먼트(202-1, 202-2, 202-3)는, 서로 다른 값을 갖는 "id(식별자)" 엘리먼트(203-1, 203-2, 203-3), "name(이름)" 엘리먼트(205-1, 205-2, 205-3), "rating" 엘리먼트(204-1, 204-2, 204-3)를 자식 노드로 갖고 있다.As shown in FIG. 2, any XML data has a root element of "users" element 201 and a "users" element 201 of three "users". "Elements 202-1, 202-2, and 202-3 as child nodes, and each" user "element 202-1, 202-2, and 202-3 have different values. "id" elements 203-1, 203-2, 203-3, "name" elements 205-1, 205-2, 205-3, "rating" elements 204-1 , 204-2, 204-3) as child nodes.

도 3은, 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위하여 관계형 데이터베이스로부터의 영속 노드 결과와 XQuery 생성자에 의한 생성 노드 결과의 통합이 필요한 XQuery 질의의 일실시예이며, 상기한 도 2의 XML 데이터에 관리되는 모든 사용자 중에서 식별자가 "U01"인 사용자(202-1)의 이름(205-1)을 반환하라는 의미를 갖는 XQuery 질의문이다.3 is an embodiment of an XQuery query that requires integration of persistent node results from a relational database with generation node results by an XQuery constructor in order to illustrate a method of constructing and querying integrated XQuery results in accordance with the present invention. This is an XQuery query statement meaning to return the name 205-1 of the user 202-1 whose identifier is "U01" among all users managed in the XML data of 2.

도 3에 도시된 XQuery 질의문(301)은 다음과 같이 모두 3개의 경로 표현식을 포함하고 있다.The XQuery query 301 shown in FIG. 3 includes three path expressions as follows.

- fn:doc('users.xml')/users/user-fn: doc ('users.xml') / users / user

- $user/id-$ user / id

- $user/name-$ user / name

이와 같이, 하나의 XQuery 질의에는 여러 개의 XML 경로 표현식이 서로 변수에 의해서 연관을 가지면서 사용이 되며, 맨 마지막에 return 절에서 사용이 된 $user/name 경로 표현식(303)은 최종 결과를 만들어 내는데 사용이 되는 경로 표현식이지만, 이외의 경로 표현식은 최종 결과를 만들어 내기 이전에 중간 결과를 만들어 내는 경로 표현식이다.As such, multiple XML path expressions can be used in a single XQuery query, associating each other with variables, and the $ user / name path expression 303 used in the return clause at the end produces the final result. A path expression that is used, but other path expressions are path expressions that produce intermediate results before producing the final result.

따라서, 하나의 XQuery 질의에는, 최종 결과를 만들어 내는 경로 표현식도 사용이 되고, 최종 결과에는 포함되지 않고 중간 결과만을 만들어 내는 경로 표현식도 사용된다. 즉, 관계형 데이터베이스를 기반으로 하는 XML 데이터베이스에서 XQuery 질의 처리 시에는, 하나의 XQuery 질의문을 처리하는 과정에서 여러 번 관계형 데이터베이스로부터 중간 결과인 영속 노드를 메모리에 적재하고, 이러한 중간 결과를 다음 경로 표현식을 처리하기 위한 대상으로 활용하게 된다.Thus, in one XQuery query, the path expression that produces the final result is used, and the path expression that produces only the intermediate result is not included in the final result. In other words, when processing an XQuery query in an XML database based on a relational database, in the process of processing one XQuery query, the persistent node, which is an intermediate result from the relational database, is loaded into memory several times. To be used as a target for processing.

이런 상황에서는, 관계형 데이터베이스에서 경로 표현식이 나타내는 노드의 서브 트리를 모두 가져오게 되면, 불필요한 노드들까지 데이터베이스에서 메모리로 적재되기 때문에, 성능에 치명적인 문제가 된다. 예를 들면, 도 3의 첫 번째 경로 표현식은, 모든 user 엘리먼트를 중간 결과로서 반환하게 되며, user 엘리먼트는 id, name, rating 엘리먼트를 자식 노드로서 가지고 있다. 상기한 엘리먼트 중에서 id와 name 엘리먼트는, 각각 where절과 return절에서 사용이 되지만, rating 엘리먼트는, 최종 XQuery 결과를 만드는데 전혀 사용이 되지 않는다. 따라서, 각 경로 표현식을 만족하는 노드만을 중간 결과로서 만들어 내는 것이 당장은 필요 없는 노드를 관계형 데이터베이스로부터 메모리에 적재하지 않음으로써 전체적인 XQuery 질의 처리 성능을 향상시킬 수 있게 된다.In this situation, importing all of the subtrees of the nodes represented by the path expressions in a relational database can be a performance penalty since unnecessary nodes are loaded into memory from the database. For example, the first path expression of FIG. 3 returns all user elements as intermediate results, and the user element has id, name, and rating elements as child nodes. Of the above elements, the id and name elements are used in the where and return clauses, respectively, but the rating element is not used at all to produce the final XQuery result. Therefore, producing only nodes that satisfy each path expression as intermediate results can improve overall XQuery query processing performance by not loading nodes that are not needed right now into the memory from the relational database.

도 4는, 도 3의 XQuery 질의(301)를 처리한 최종 결과로서 얻어지는 통합 XQuery 결과의 모습을 나타낸다. 도 4의 통합 XQuery 결과는, XQuery 생성자에 의해 구성된 생성 노드인 results 엘리먼트(401)와 관계형 데이터베이스에 관리되는 XML 데이터로부터 메모리에 적재된 영속 노드인 user 엘리먼트(402)가 부모/자식 관계로서 연관되어 전체 결과 트리가 구성된 모습을 갖는다. 그리고, 영속 노드인 user 엘리먼트(402)는, 관계형 데이터베이스 상에서 영속 노드간 관계로는 영속 노드인 id, name, rating 엘리먼트(403)를 자식 노드로서 갖고 있으며, 본 발명에 따르면 XQuery 질의 처리의 중간 및 최종 질의 처리 결과를 나타내는 트리에는 포함이 되지 않고, 최종적으로 사용자가 결과를 가져 가는 시점에서 메모리에 적재되어 사용자에게 제공이 된다.4 shows the appearance of the integrated XQuery result obtained as the final result of processing the XQuery query 301 of FIG. The integrated XQuery result of FIG. 4 is associated with a parent / child relationship between the results element 401, which is a generation node configured by the XQuery constructor, and the user element 402, which is a persistent node loaded into memory from XML data managed in a relational database. The entire result tree is organized. The user element 402, which is a persistent node, has id, name, and rating elements 403, which are persistent nodes, as child nodes in relations between persistent nodes in a relational database. It is not included in the tree representing the final query processing result. It is loaded into memory and provided to the user when the user finally gets the result.

도 5는, 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하 기 위하여 관계형 데이터베이스로부터의 영속 노드 결과와 XQuery 생성자에 의한 생성 노드 결과를 통합하여 통합 XQuery 결과를 구성하고 구성된 통합 XQuery 결과를 중간 결과로서 활용하여 추가적인 XQuery 표현식에 대한 질의 처리를 수행하는 XQuery 질의의 일실시예(501)이며, 도 2의 XML 데이터에 관리되는 모든 사용자 중에서 식별자가 'U01'인 사용자의 이름을 반환하라는 의미를 갖는 도 3의 XQuery 질의와는 같은 의미를 가지면서 구문이 상이한 XQuery 질의이다.FIG. 5 illustrates the integrated XQuery result by combining persistent node results from a relational database and generation node results by an XQuery constructor to explain the integrated XQuery result construction and query processing method according to the present invention. An embodiment of an XQuery query that performs a query on an additional XQuery expression by utilizing it as an intermediate result (501), and means to return the name of the user whose identifier is 'U01' among all users managed in the XML data of FIG. This is an XQuery query having the same meaning as the XQuery query of FIG. 3 having a different syntax.

도 5의 질의에서, 경로 표현식 "$r/user/id/.."(503)는 생성 노드인 results(502)에 대해서 자식 노드인 영속 노드 user를 구하고, 그 자식 노드인 영속 노드인 id를 구하고, 그 부모 노드인 영속 노드 user를 구하라는 뜻을 갖는다. 그러나, 만일 질의가 $r/user/.. 이라면, 생성 노드인 results(502)에 대해서 자식 노드인 영속 노드 user를 구하고, 그 부모 노드인 생성 노드 results(502)를 구해야 한다. 이와 같은 경우 영속 노드인 user의 영속 노드 부모인 users를 구하면 결과가 잘못된 것이 된다.In the query of Fig. 5, the path expression " \ r / user / id /.." 503 obtains the persistent node user, which is the child node, for the result node 502, which is the producing node, and obtains the id, which is the persistent node, of the child node. This means to get the parent node, the persistent node user. However, if the query is $ r / user / .., then the resultant node user (s) for the resultant node results (502) should be found and the resultant node results (502) that is its parent node. In this case, finding the user of the persistent node parent of the persistent node user would be wrong.

따라서, 본 발명에서는 이와 같은 문제를 해결하기 위하여, 메모리에 적재된 영속 노드가 XQuery 생성자 내부에서 참조가 되는 경우에, 상위 생성 노드와의 관계를 연관 지을 수 있도록, 영속 노드의 속성으로 생성 부모 노드 참조와 생성 소유 엘리먼트 참조를 갖도록 하며, 이에 대해서는 후술하는 도 8을 참조하여 자세히 설명하기로 한다.Therefore, in order to solve such a problem, in the present invention, when a persistent node loaded in a memory is referred to in the XQuery constructor, the parent node is created as an attribute of the persistent node so as to associate a relationship with the parent generation node. Reference and creation owned element reference, which will be described in detail with reference to FIG.

도 6, 도 7 및 도 8은, 관계형 데이터베이스를 기반으로 하며 XQuery를 질의 언어로서 지원하는 XML 데이터베이스에서, 가능한 관계형 데이터베이스로부터는 중 간 영속 결과를 적게 메모리에 적재하고, XQuery 생성자에 의해 생성된 생성 노드와 관계형 데이터베이스로부터 적재된 영속 노드 간에는 구조 정보를 XQuery 질의문에서 의미한 대로 표현해 주기 위하여 본 발명의 통합 XQuery 결과 구성 및 질의 처리 방법에서 제시하는 중간 결과 구성 및 관리를 위한 자료 구조이다. 6, 7 and 8 show that in an XML database based on a relational database and supporting XQuery as a query language, less intermediate persistence results are stored in memory from possible relational databases, and are generated by the XQuery constructor. It is a data structure for constructing and managing intermediate results proposed by the integrated XQuery result composition and query processing method of the present invention to express structure information as meaning in an XQuery query statement between a node and a persistent node loaded from a relational database.

도 6은, 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법에서 제안하는 XQuery 결과 아이템의 일실시예 구성도이다. 6 is a diagram illustrating an embodiment of an XQuery result item proposed by the integrated XQuery result configuration and query processing method according to the present invention.

본 발명에 따른 XQuery 결과 아이템(Result item)(601)은 노드 종류에 따라서 생성 노드(Constructed node)(602), 영속 노드(Persistent node)(603) 또는 원자형 값(Atomic value)(604)을 XQuery 결과로서 갖게 되며, 상기 원자형 값(604)은, 노드가 아닌 원자형 타입, 즉 정수형(Integer)(606), 부동 소수형(Float)(607), 문자열 형(String)(605) 등의 값을 나타내며, 상기 원자형 타입은, W3C에서 제정한 XML 스키마 규격을 따른다.The XQuery Result item 601 according to the present invention may be constructed as a Constructed Node 602, Persistent Node 603, or Atomic Value 604, depending on the node type. The atomic value 604 is obtained as an XQuery result, and the atomic value 604 is a non-node atomic type, that is, an integer 606, a float 607, a string 605, and the like. The atomic type follows the XML Schema standard established by the W3C.

도 7은 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법에서 제안하는 XQuery 결과 순서열의 일실시예 구성도이다. 7 is a diagram illustrating an embodiment of an XQuery result order sequence proposed by the integrated XQuery result structure and query processing method according to the present invention.

본 발명에 따른 XQuery 결과 순서열(701)은, 포함하는 XQuery 결과 아이템(702)이 순서를 갖는 순서열이며, 각 XQuery 결과 아이템(702)의 노드 종류에 따라서 생성 노드(704), 영속 노드(705,706), 생성 노드와 영속 노드가 통합이 된 통합 노드 트리(704) 또는 원자형 값(703)을 XQuery 결과로서 갖게 된다. The XQuery result sequence 701 according to the present invention is an order sequence in which the included XQuery result items 702 have an order, and according to the node type of each XQuery result item 702, the generation node 704 and the persistent node ( 705, 706), the integration node tree 704 or the atomic value 703, in which the generation node and the persistent node are integrated, will have an XQuery result.

전술한 바와 같이 통합 XQuery 결과인 경우, 생성 노드 간 또는 생성 노드와 영속 노드 간에는 부모 자식 관계가 생성 부모 노드 참조 속성 및 자식 노드 참조 속성에 의해서 메모리 참조에 의한 부모 자식 관계가 표현이 되며, 영속 노드와 영속 노드간 부모 자식 관계는 노드 식별자로서 표현이 되며, 메모리 참조 관계로는 나타내지 않는다. 또한, 전술한 바와 같이 불필요한 노드의 메모리 적재를 피하기 위하여 메모리에 적재된 영속 노드(705)의 자식 및 자손 노드(706)는 메모리에 적재하지 않고 필요한 상황이 되면 메모리에 적재하게 된다.As described above, in the case of an integrated XQuery result, the parent child relationship is expressed between the generating nodes or between the generating node and the persistent node, and the parent child relationship by the memory reference is represented by the generating parent node reference property and the child node reference property. The parent child relationship between the node and the persistent node is expressed as a node identifier, not as a memory reference relationship. In addition, as described above, the child and descendant nodes 706 of the persistent node 705 loaded in the memory are loaded into the memory when necessary, so as to avoid unnecessary memory loading of the node.

도 8은, 본 발명에 따른 통합 XQuery 결과 구성 및 질의 처리 방법에서 제안하는 XQuery 결과를 나타내는 생성 노드(CNode)(801)와 영속 노드(XNode)(810)의 자료 구조, 및 생성 노드(801)와 영속 노드(810)의 연관 관계를 나타내는 일실시예 관계도이다. 8 illustrates a data structure of a generation node (CNode) 801 and a persistent node (XNode) 810 representing an XQuery result proposed by the integrated XQuery result construction and query processing method according to the present invention, and a generation node 801. Is an exemplary relationship diagram illustrating a relationship between a persistent node and a persistent node 810.

도 8에서 보는 바와 같이, 생성 노드(801)의 노드 타입으로는 엘리먼트(CElement)(802), 애트리뷰트(CAttribute), 주석(CComment), 처리 명령어(CProcesing Instruction), 텍스트(CText)가 있으며, 영속 노드(810)의 노드 타입으로는 엘리먼트(XElement)(811), 애트리뷰트(XAttribute)(812), 주석(XComment)(813), 처리 명령어(XProcesing Instruction)(814), 텍스트(XText)(815), 문서 노드(XDocument)(816)가 있다. As shown in FIG. 8, the node types of the generation node 801 include a CElement 802, an attribute, a CAttribute, a comment, a processing instruction, a text, and a text. The node types of the node 810 include an element (XElement) 811, an attribute (XAttribute) 812, an comment (XComment) 813, an XProcesing Instruction 814, and a text (XText) 815. There is a document node (XDocument) 816.

영속 노드와 영속 노드간의 부모 자식 관계는, 영속 노드가 고유하게 가지고 있는 노드 식별자에 의해서 구분이 되며, 메모리 참조 관계로는 표현하지 않는다. The parent-child relationship between a persistent node and a persistent node is distinguished by a node identifier uniquely owned by the persistent node, and is not represented by a memory reference relationship.

생성 노드 간의 부모 자식 관계는, 생성 노드가 속성으로 갖는 생성 부모 노드 참조 속성과 자식 노드 참조 속성에 의해서 표현이 되며, 생성 부모 노드와 영속 자식 노드간의 부모 자식 관계는, 영속 노드가 속성으로 갖는 생성 부모 참조 속성과 생성 노드가 갖는 자식 노드 참조 속성에 의해서 표현이 된다. 즉, 영속 노드는 생성 부모 노드 참조가 존재하지 않으면, 관계형 데이터베이스에 관리되는 영속 부모 노드를 갖게 되며, 생성자 처리 과정에서 생성 부모 노드 참조를 갖게 되면, 원래 갖고 있던 영속 부모 노드를 잃어 버리고, 생성 노드를 부모 노드로서 갖게 되는 특성이 있다.The parent child relationship between the producing nodes is represented by the generating parent node reference attribute and the child node reference attribute that the producing node has as attributes, and the parent child relationship between the producing parent node and the persistent child nodes is created by the persistent node as an attribute. It is represented by the parent reference attribute and the child node reference attribute of the creating node. In other words, a persistent node will have a managed parent node in the relational database if the creating parent node reference does not exist, and if it has a creating parent node reference during the constructor processing, it will lose the persistent parent node it had. Has the property of having as its parent node.

상술한 바와 같이, 생성 노드와 영속 노드의 부모/자식 노드에 대한 관계를 요약하면 다음과 같다.As described above, the relationship between the parent node and the child node of the generation node and the persistent node is as follows.

- 생성 노드의 부모 노드는, 생성 노드이거나 존재하지 않는다.The parent node of the producing node may or may not exist.

- 생성 노드의 자식 노드는, 생성 노드, 영속 노드 또는 존재하지 않는다.-The child node of the creation node is not a creation node, a persistent node or exists.

- 영속 노드의 부모 노드는, 기본적으로 영속 노드이거나 존재하지 않지만, 질의 처리 과정에서 생성 노드가 부모 노드가 될 수 있다.A parent node of a persistent node is basically a persistent node or does not exist, but a generation node may be a parent node during query processing.

- 영속 노드의 자식 노드는, 언제나 영속 노드이거나 존재하지 않는다.A child node of a persistent node is always a persistent node or does not exist.

도 9는, 도 6, 도 7 및 도 8과 같은 자료 구조를 갖는 통합 XQuery 중간 결과를 대상으로 계속적인 XQuery질의 처리를 수행하여 자식 노드를 검색하는 과정을 나타내는 흐름도의 일실시예이다.FIG. 9 is an embodiment of a flowchart illustrating a process of searching for child nodes by performing continuous XQuery query processing on an integrated XQuery intermediate result having data structures as illustrated in FIGS. 6, 7, and 8.

XQuery 질의 처리 시스템은, 자식 노드 검색 과정이 시작되면(901), 입력 노드의 노드 종류를 검사한다(902). When the XQuery query processing system starts the child node search process (901), the node type of the input node is checked (902).

상기 검사 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드가 메모리 참조로 갖고 있는 모든 자식 노드를 검색하여 최종 검색 결과에 추가한다(904). 또는, 상기 검사 결과 입력 노드의 노드 종류가 영속 노드이면, 관계형 데이터베이스에서 입력 노드의 모든 영속 자식 노드를 검사하여 최종 검색 결과에 추가한다(906). 이후, 상기 최종 검색 결과를 사용자에게 제공(905)하는 것으로 자식 노드 검색 과정은 종료된다(907).If the node type of the check result input node is a generation node, all child nodes that the generation node has as a memory reference are searched and added to the final search result (904). Or, if the node type of the check result input node is a persistent node, all persistent child nodes of the input node are checked in the relational database and added to the final search result (906). Subsequently, the child node search process is terminated by providing the final search result to the user (905).

도 10은, 도 6, 도 7 및 도 8과 같은 자료 구조를 갖는 통합 XQuery 중간 결과를 대상으로 계속적인 질의 처리를 수행하여 자손 노드를 검색하는 과정을 나타내는 흐름도의 일실시예이다.FIG. 10 is an embodiment of a flowchart illustrating a process of searching for descendant nodes by performing continuous query processing on an integrated XQuery intermediate result having a data structure as shown in FIGS. 6, 7, and 8.

XQuery 질의 처리 시스템은, 자손 노드 검색 과정이 시작되면(1001), 입력 노드의 노드 종류를 검사한다(1002). When the XQuery query processing system starts the child node search process (1001), the node type of the input node is checked (1002).

상기 노드 종류가 무엇인지를 판단하여(1003), 상기 판단 결과 입력 노드의 노드 종류가 영속 노드이면, 관계형 데이터베이스에서 모든 자손 노드를 검색하여 검색 결과에 추가하고(1010), 상기 판단 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드의 자식 노드 존재 여부를 검사한다(1004). If the node type of the input node is a persistent node, if the node type of the input node is a persistent node, all child nodes are searched for in the relational database and added to the search result (1010). If the node type is a generation node, the existence of a child node of the generation node is checked (1004).

자식 노드가 존재하는지를 판단하여(1005), 자식 노드가 존재하는 경우에는, 검색 결과 목록에 메모리 참조로 갖고 있는 모든 자식 노드를 추가하고(1006), 각 자식 노드에 대해서 노드 종류를 검사 한다(1007). 한편, 자식 노드가 존재하지 않은 경우에는, 검색 결과를 제공(1008)하고 종료한다(1011). It is determined whether the child node exists (1005), and if there is a child node, all child nodes that have a memory reference are added to the search result list (1006), and the node type is checked for each child node (1007). ). On the other hand, if the child node does not exist, the search result is provided (1008) and ends (1011).

상기 자식 노드의 노드 종류를 검사하여, 노드 종류를 판단한다(1007, 1009). 상기 판단 결과 자식 노드가 생성 노드이면, 다시 자식 노드에 대해서 상기의 자식 노드 존재 여부를 검사하고(1004), 상기 판단 결과 자식 노드가 영속 노드 이면, 관계형 데이터베이스에서 모든 자손 노드를 검색하여 검색 결과에 추가(1010)한 후 검색 결과를 제공(1011)하는 것으로 자손 노드 검색 과정은 종료한다(1011).The node type of the child node is examined to determine the node type (1007, 1009). If the result of the determination is that the child node is a generation node, the child node is again examined for the existence of the child node (1004). If the result of the determination is that the child node is a persistent node, all child nodes are searched in the relational database and searched for in the search result. After adding (1010) and providing the search results (1011), the child node search process ends (1011).

도 11은, 도 6, 도 7 및 도 8과 같은 자료 구조를 갖는 통합 XQuery 중간 결과를 대상으로 계속적인 질의 처리를 수행하여 부모 노드를 검색하는 과정을 나타내는 흐름도의 일실시예이다.FIG. 11 is an embodiment of a flowchart illustrating a process of searching a parent node by performing continuous query processing on an integrated XQuery intermediate result having a data structure as shown in FIGS. 6, 7, and 8.

XQuery 질의 처리 시스템은, 부모 노드 검색 과정이 시작되면(1101), 입력 노드의 노드 종류를 검사하여, 노드 종류를 판단한다(1102, 1103). The XQuery query processing system determines the node type by checking the node type of the input node when the parent node search process is started (1101) (1102, 1103).

상기 판단 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드가 메모리 참조로 갖고 있는 부모 노드를 검색하여 검색 결과로서 제공한다(1104). 또는, 상기 판단 결과 입력 노드의 노드 종류가 영속 노드이면, 영속 노드의 생성 부모 노드 참조 여부를 검사한다(1105, 1106). If the node type of the input node is the generation node as a result of the determination, the parent node which the generation node has as the memory reference is searched for and provided as a search result (1104). Alternatively, if the node type of the input node is a persistent node as a result of the determination, it is checked whether a persistent parent node of the persistent node is referenced (1105 and 1106).

상기 생성 부모 노드 참조 검사 결과, 생성 부모 노드 참조가 존재하지 않으면, 관계형 데이터베이스에서 부모 노드를 검색하여 검색 결과로서 제공하고(1107), 존재하면 메모리 참조로서 갖고 있는 생성 부모 노드를 검색 결과로서 제공(1104)하는 것으로 부모 노드 검색 과정은 종료된다(1108).As a result of the creation parent node reference check, if the generation parent node reference does not exist, the parent node is searched for in the relational database and provided as a search result (1107). 1104, the parent node search process ends (1108).

도 12는, 도 6, 도 7 및 도 8과 같은 자료 구조를 갖는 통합 XQuery 중간 결과를 대상으로 계속적인 질의 처리를 수행하여 조상 노드를 검색하는 과정을 나타내는 흐름도의 일실시예이다.FIG. 12 is an embodiment of a flowchart illustrating a process of searching an ancestor node by performing continuous query processing on an integrated XQuery intermediate result having a data structure as shown in FIGS. 6, 7, and 8.

XQuery 질의 처리 시스템은, 조상 노드 검색 과정이 시작되면(1201), 입력 노드의 노드 종류를 검사하여, 노드 종류를 판단한다(1202, 1203). When the ancestor node search process starts (1201), the XQuery query processing system examines the node type of the input node and determines the node type (1202, 1203).

상기 판단 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 부모 노드 존재 여부를 검사한다(1204, 1205). 그리고, 상기 검사 결과 생성 부모 노드가 존재하면, 검색 결과에 부모 노드를 추가하고(1209), 추가된 부모 노드에 대해서 다시 상기의 생성 부모 노드 존재 여부를 검사한다(1204). 한편, 상기 검사 결과 생성 부모 노드가 존재하지 않으면, 조상 노드 검색 결과 목록을 검색 결과로서 제공한다(1206). If the node type of the input node is a generation node as a result of the determination, it is checked whether a generation parent node exists (1204 and 1205). If the check result generation parent node exists, the parent node is added to the search result (1209), and the added parent node is checked again for the existence of the generated parent node (1204). Meanwhile, when the test result generation parent node does not exist, an ancestor node search result list is provided as a search result (1206).

또는, 상기 판단 결과 입력 노드의 노드 종류가 영속 노드이면, 생성 부모 노드 존재 여부를 검사한다(1207, 1208). 상기 검사 결과 생성 부모 노드가 존재하면, 검색 결과 목록에 부모 노드를 추가하고(1209), 생성 부모 노드에 대해서 다시 생성 부모 노드 존재 여부를 검사한다(1204). 한편, 상기 검사 결과 부모 노드가 존재하지 않으면, 관계형 데이터베이스에서 모든 조상 노드를 검색하여 결과 목록에 추가하고(1210), 검색 결과로서 제공(1206)하는 것으로 조상 노드 검색 과정은 종료된다(1211).Or, if the node type of the input node is a persistent node as a result of the determination, it is checked whether a generation parent node exists (1207, 1208). If the check result generation parent node exists, the parent node is added to the search result list (1209), and the generated parent node is checked again for the existence of the generation parent node (1204). On the other hand, if the parent node does not exist as a result of the inspection, the ancestor node search process is terminated by searching for all ancestor nodes in the relational database (1210) and providing them as a search result (1206).

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 형태로 기록매체(시디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다. 이러한 과정은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있으므로 더 이상 상세히 설명하지 않기로 한다.The method of the present invention as described above may be implemented as a program and stored in a recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.) in a computer-readable form. Since this process can be easily implemented by those skilled in the art will not be described in more detail.

이상에서 설명한 본 발명은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.The present invention described above is capable of various substitutions, modifications, and changes without departing from the technical spirit of the present invention for those skilled in the art to which the present invention pertains. It is not limited by the drawings.

당업자라면 본 발명의 범위와 사상을 벗어나지 않고서 다양한 변형이나 변경이 이루어질 수 있음을 알 것이다. 당업자라면 본 명세서에 게시된 본 발명에 관한 구체적 내용과 그 실시를 이해하고, 본 발명에 관한 또 다른 실시 예가 가능함을 알 것이다.Those skilled in the art will appreciate that various modifications or changes can be made without departing from the scope and spirit of the invention. Those skilled in the art will understand the specific details of the present invention and the embodiments disclosed herein, and that other embodiments of the present invention are possible.

도 1은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 과정에 대한 일실시예 흐름도.1 is a flowchart illustrating an integrated XQuery result construction process for integrating and managing a persistent node result and a generation node result according to the present invention.

도 2는, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 일실시예 XML 데이터 구조도.FIG. 2 is an embodiment XML data structure diagram illustrating an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention. FIG.

도 3은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 상기 도2의 XML 문서에 대한 일실시예 XQuery 질의문 구조도.FIG. 3 is an exemplary XQuery query structure diagram for an XML document of FIG. 2 illustrating a method of constructing and processing an integrated XQuery result for integrating and managing a persistent node result and a generated node result according to the present invention. FIG.

도 4는, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 상기 도3의 XQuery 질의문을 질의 처리한 후에 생성되는 일실시예 통합 XQuery 결과 트리 구조도.4 is an embodiment generated after query processing the XQuery query statement of FIG. 3 for explaining an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention. Integrated XQuery result tree schematic.

도 5는, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 일실시예 XQuery 질의문 구조도.5 is an exemplary XQuery query structure diagram for explaining an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generated node result according to the present invention.

도 6은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 일실시예 XQuery 결과 아이템 구성도.FIG. 6 is a diagram illustrating an exemplary XQuery result item configuration for explaining an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention. FIG.

도 7은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리 하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 일실시예 XQuery 결과 순서열 구성도.FIG. 7 is a diagram illustrating an exemplary XQuery result sequence structure for explaining an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention. FIG.

도 8은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법을 설명하기 위한 영속 노드와 생성 노드의 상속 및 연관 관계를 나타내는 일실시예 관계도.8 is an embodiment relationship diagram illustrating inheritance and association of persistent and generated nodes for explaining an integrated XQuery result configuration and query processing method for integrating and managing persistent node results and generated node results according to the present invention. .

도 9는, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법에서 자식 노드를 검색하는 과정을 나타내는 일실시예 흐름도.9 is a flowchart illustrating a process of searching for a child node in an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention.

도 10은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법에서 자손 노드를 검색하는 과정을 나타내는 일실시예 흐름도.10 is a flowchart illustrating a process of searching for descendant nodes in an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generated node result according to the present invention.

도 11은, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법에서 부모 노드를 검색하는 과정을 나타내는 일실시예 흐름도.11 is a flowchart illustrating a process of searching for a parent node in an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention.

도 12는, 본 발명에 따른 영속 노드 결과와 생성 노드 결과를 통합하여 관리하기위한 통합 XQuery 결과 구성 및 질의 처리 방법에서 조상 노드를 검색하는 과정을 나타내는 일실시예 흐름도.12 is a flowchart illustrating a process of searching for an ancestor node in an integrated XQuery result construction and query processing method for integrating and managing a persistent node result and a generation node result according to the present invention.

Claims (8)

관계형 데이터베이스의 영속 XML 데이터를 질의 대상으로 하는 XML 경로 표현식의 처리 과정에서, 중간 결과로서 관계형 데이터베이스로부터 질의 처리에 필요한 영속 노드만을 가져 와서 메모리에 적재하는 제 1 단계;In the process of processing the XML path expression for querying the persistent XML data of the relational database, a first step of taking only the persistent node necessary for query processing from the relational database as an intermediate result and loading it into memory; XQuery 생성자의 처리 과정에서, 중간 결과로서 새로운 생성 노드를 메모리에 구성하는 제 2 단계; In the processing of the XQuery constructor, a second step of configuring a new generation node in memory as an intermediate result; XQuery 생성자의 내부에서 관계형 데이터베이스의 영속 노드를 나타내는 XML 경로 표현식이 사용되는 경우, 상기 관계형 데이터베이스로부터 가져온 영속 노드를 상기 XQuery 생성자로부터 생성된 생성 노드에 연결하여 통합 XQuery 결과의 전체 트리를 구성하는 제 3 단계; 및When an XML path expression representing a persistent node of a relational database is used inside an XQuery constructor, a third tree that constructs the entire tree of integrated XQuery results by concatenating the persistent node obtained from the relational database to a generation node generated from the XQuery constructor. step; And 상기 통합 XQuery 결과를 중간 결과로서 활용하여 계속적인 XML 경로 표현식 질의를 처리하는 제 4 단계A fourth step of processing the continuous XML path expression query utilizing the integrated XQuery result as an intermediate result 를 포함하는 통합 XQuery 질의 처리 방법.Integrated XQuery query processing method, including. 제 1 항에 있어서, 상기 제 1 단계는, The method of claim 1, wherein the first step, 상기 XQuery 생성자의 내부에서 영속 노드에 대한 참조가 발생하는 경우, 영속 노드의 생성 부모 노드 참조 속성과 생성 노드의 자식 노드 참조 속성을 통하여, 상위의 생성 노드와 부모 자식 관계를 연관시키는 통합 XQuery 질의 처리 방법.When a reference to a persistent node occurs inside the XQuery constructor, an integrated XQuery query processing is performed by associating a parent child relationship with a parent generation node through a creation parent node reference attribute of the persistent node and a child node reference attribute of the creation node. Way. 제 1 항에 있어서, 상기 제 2 단계는,The method of claim 1, wherein the second step, 상기 메모리에 구성된 생성 노드를 이용하여, 생성 부모 노드 참조 속성과 자식 노드 참조 속성을 통하여 중첩된 생성 노드 간에 부모 자식 관계를 연관시키는 통합 XQuery 질의 처리 방법.A method of processing integrated XQuery by associating parent child relationships between nested generation nodes through generation parent node reference attributes and child node reference attributes using generation nodes configured in the memory. 제 1 항에 있어서,The method of claim 1, 상기 통합 XQuery 결과를 구성하는 상기 영속 노드와 상기 생성 노드 간에 구조적 관계를 밝힘에 있어서,In revealing the structural relationship between the persistent node and the generation node that constitutes the integrated XQuery result, 상기 영속 노드와 상기 생성 노드가 통합된 통합 XQuery 결과에 대해서, 특정 노드의 자식 노드, 자손 노드, 부모 노드, 조상 노드 중 적어도 하나를 검색하는 제 5 단계를 더 포함하는 통합 XQuery 질의 처리 방법.And a fifth step of retrieving at least one of a child node, a child node, a parent node, and an ancestor node of a specific node with respect to an integrated XQuery result in which the persistent node and the generation node are integrated. 제 4 항에 있어서, The method of claim 4, wherein 상기 5 단계에서 검색 대상이 상기 자식 노드인 경우에 있어서,In the case where the search target is the child node in step 5, 입력 노드의 노드 종류를 검사하는 제 6 단계;A sixth step of checking a node type of the input node; 상기 검사 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드가 메모리 참조로 갖고 있는 모든 자식 노드를 검색하여 최종 검색 결과에 추가하는 제 7 단계;A seventh step of searching for and adding all child nodes which the generation node has as a memory reference to the final search result if the node type of the check result input node is a generation node; 상기 검사 결과 입력 노드의 노드 종류가 영속 노드이면, 상기 관계형 데이 터베이스에서 입력 노드의 모든 영속 자식 노드를 검사하여 최종 검색 결과에 추가하는 제 8 단계; 및An eighth step of checking all persistent child nodes of the input node in the relational database and adding them to a final search result if the node type of the input node is a persistent node; And 상기 최종 검색 결과를 사용자에게 제공하는 제 9 단계를 더 포함하는 통합 XQuery 질의 처리 방법.And a ninth step of providing the final search result to a user. 제 4 항에 있어서,The method of claim 4, wherein 상기 5 단계에서 검색 대상이 자손 노드인 경우에 있어서,In the case where the search target is a descendant node in step 5, 입력 노드의 노드 종류를 검사하는 제 10 단계;A tenth step of checking a node type of the input node; 상기 검사 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드의 자식 노드 존재 여부를 검사하는 제 11 단계;An eleventh step of checking whether or not a child node of a generation node exists if the node type of the input node is a generation node; 상기 검사 결과 자식 노드가 존재하면, 검색 결과 목록에 메모리 참조로 갖고 있는 모든 자식 노드를 추가하고 각 자식 노드에 대해서 노드 종류를 검사하는 제 12 단계;Twelfth step of adding all child nodes which have a memory reference to a search result list and checking the node type for each child node if the check result exists; 상기 검사 결과 자식 노드가 존재하지 않으면, 검색 결과를 사용자에게 제공하는 제 13 단계;A thirteenth step of providing a search result to a user if there is no child node as a result of the inspection; 상기 자식 노드의 노드 종류 검사 결과 자식 노드가 생성 노드이면, 다시 자식 노드에 대해서 상기의 자식 노드 존재 여부를 검사하는 제 14 단계; 및A fourteenth step of checking whether the child node exists again if the child node is a generation node as a result of the node type check of the child node; And 상기 자식 노드의 노드 종류 검사 결과 자식 노드가 영속 노드이면, 관계형 데이터베이스에서 모든 자손 노드를 검색하여 검색 결과에 추가한 후 검색 결과를 제공하는 제 14 단계를 더 포함하는 통합 XQuery 질의 처리 방법.And if the child node is a persistent node as a result of the node type check of the child node, searching for all the child nodes in the relational database, adding the search result to the search result, and then providing a search result. 제 4 항에 있어서,The method of claim 4, wherein 상기 5 단계에서 검색 대상이 부모 노드인 경우에 있어서,In the case where the search target is a parent node in step 5, 입력 노드의 노드 종류를 검사하는 제 15 단계;A fifteenth step of checking a node type of the input node; 상기 검사 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 노드가 메모리 참조로 갖고 있는 부모 노드를 검색하여 검색 결과로서 제공하는 제 16 단계;A sixteenth step of searching for a parent node which the generation node has as a memory reference and providing it as a search result if the node type of the check result input node is a generation node; 상기 검사 결과 입력 노드의 노드 종류가 영속 노드이면, 영속 노드의 생성 부모 노드 참조 여부를 검사하는 제 17 단계;A 17th step of checking whether a generation parent node of the persistent node is referenced if the node type of the input node is the persistent node as a result of the checking; 상기 생성 부모 노드 존재 여부 검사 결과 존재하지 않으면, 관계형 데이터베이스에서 부모 노드를 검색하여 검색 결과로서 제공하는 제 18 단계; 및An eighteenth step of searching for a parent node in a relational database and providing it as a search result if the generated parent node is not present; And 상기 생성 부모 노드 존재 여부 검사 결과 존재하면, 메모리 참조로서 갖고 있는 생성 부모 노드를 검색 결과로서 제공하는 제 19 단계를 더 포함하는 통합 XQuery 질의 처리 방법.And a nineteenth step of providing, as a search result, a generation parent node having a memory reference if the result of the generation parent node exists. 제 4 항에 있어서,The method of claim 4, wherein 상기 5 단계에서 검색 대상이 부모 노드인 경우에 있어서,In the case where the search target is a parent node in step 5, 입력 노드의 노드 종류를 검사하는 제 20 단계;A twenty step of checking a node type of the input node; 상기 검사 결과 입력 노드의 노드 종류가 생성 노드이면, 생성 부모 노드 존재 여부를 검사하는 제 21 단계;A twenty-first step of checking whether a generation parent node exists if the node type of the input node is a generation node; 상기 생성 부모 노드 존재 여부 검사 결과 부모 노드가 존재하면, 검색 결과 에 부모 노드를 추가하고, 부모 노드에 대해서 다시 상기의 생성 부모 노드 존재 여부를 검사하는 제 22 단계;A twenty-second step of adding a parent node to a search result and checking the existence of the generated parent node again with respect to a parent node if a parent node exists as a result of the check for existence of the generated parent node; 상기 부모 노드가 존재하지 않으면, 조상 노드 검색 결과 목록을 검색 결과로서 제공하는 제 23 단계;Providing a list of ancestor node search results as a search result if the parent node does not exist; 상기 노드 종류 검사 결과 입력 노드가 영속 노드이면, 생성 부모 노드 존재 여부를 검사하는 제 24 단계;A twenty-fourth step of checking whether a generation parent node exists if the input node is a persistent node as a result of the node type checking; 상기 생성 부모 노드 존재 여부 검사 결과 부모 노드가 존재하면, 검색 결과 목록에 부모 노드를 추가하고, 생성 부모 노드에 대해서 다시 생성 부모 노드 존재 여부를 검사하는 제 25 단계; 및A twenty-fifth step of adding a parent node to a search result list and checking whether the generated parent node exists again if the generated parent node exists; And 상기 부모 노드가 존재하지 않으면, 관계형 데이터베이스에서 모든 조상 노드를 검색하여 결과 목록에 추가하고 검색 결과로서 제공하는 제 26 단계를 더 포함하는 통합 XQuery 질의 처리 방법.If the parent node does not exist, further comprising a twenty-sixth step of retrieving all ancestor nodes from a relational database, adding them to a list of results and providing them as a search result.
KR1020070122823A 2006-12-04 2007-11-29 Method for managing intergrated xquery KR100882589B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020060121539 2006-12-04
KR20060121539 2006-12-04

Publications (2)

Publication Number Publication Date
KR20080051063A true KR20080051063A (en) 2008-06-10
KR100882589B1 KR100882589B1 (en) 2009-02-12

Family

ID=39806197

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070122823A KR100882589B1 (en) 2006-12-04 2007-11-29 Method for managing intergrated xquery

Country Status (1)

Country Link
KR (1) KR100882589B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368500A (en) * 2016-05-13 2017-11-21 北京京东尚科信息技术有限公司 Data pick-up method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100670210B1 (en) * 2004-12-14 2007-01-16 한국전자통신연구원 Method and system for supporting xquery trigger in xml databases based on relational database

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368500A (en) * 2016-05-13 2017-11-21 北京京东尚科信息技术有限公司 Data pick-up method and system
CN107368500B (en) * 2016-05-13 2020-03-03 北京京东尚科信息技术有限公司 Data extraction method and system

Also Published As

Publication number Publication date
KR100882589B1 (en) 2009-02-12

Similar Documents

Publication Publication Date Title
US8631028B1 (en) XPath query processing improvements
US7634498B2 (en) Indexing XML datatype content system and method
Cardelli et al. A query language based on the ambient logic
US7461074B2 (en) Method and system for flexible sectioning of XML data in a database system
US8219563B2 (en) Indexing mechanism for efficient node-aware full-text search over XML
US20100211572A1 (en) Indexing and searching json objects
US20060206466A1 (en) Evaluating relevance of results in a semi-structured data-base system
US8126932B2 (en) Indexing strategy with improved DML performance and space usage for node-aware full-text search over XML
Petković JSON integration in relational database systems
US20060161525A1 (en) Method and system for supporting structured aggregation operations on semi-structured data
US8495055B2 (en) Method and computer program for evaluating database queries involving relational and hierarchical data
Delva et al. Integrating nested data into knowledge graphs with RML fields
Catania et al. Lazy XML updates: laziness as a virtue, of update and structural join efficiency
Nørvåg Algorithms for temporal query operators in XML databases
KR100882589B1 (en) Method for managing intergrated xquery
US8880505B2 (en) Method and computer program for evaluating database queries involving relational and hierarchical data
Arion et al. Algebra-based identification of tree patterns in XQuery
Min et al. XTRON: An XML data management system using relational databases
Näppilä et al. A tool for data cube construction from structurally heterogeneous XML documents
Lim et al. Unifying data and domain knowledge using virtual views
Leela et al. Schema-conscious XML indexing
Georgiadis et al. Cost based plan selection for XPath
Kim et al. Efficient processing of regular path joins using PID
Mihajlovic et al. On Region Algebras, XML Databases, and Information Retrieval
Furche et al. Marriages of convenience: Triples and graphs, RDF and XML in Web querying

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20120131

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee