KR20030054605A - Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language - Google Patents

Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language Download PDF

Info

Publication number
KR20030054605A
KR20030054605A KR1020010084801A KR20010084801A KR20030054605A KR 20030054605 A KR20030054605 A KR 20030054605A KR 1020010084801 A KR1020010084801 A KR 1020010084801A KR 20010084801 A KR20010084801 A KR 20010084801A KR 20030054605 A KR20030054605 A KR 20030054605A
Authority
KR
South Korea
Prior art keywords
query
xml
database
module
search
Prior art date
Application number
KR1020010084801A
Other languages
Korean (ko)
Other versions
KR100487738B1 (en
Inventor
이명철
이미영
김명준
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR10-2001-0084801A priority Critical patent/KR100487738B1/en
Publication of KR20030054605A publication Critical patent/KR20030054605A/en
Application granted granted Critical
Publication of KR100487738B1 publication Critical patent/KR100487738B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Abstract

PURPOSE: An XML document search system and a method for the same are provided to enable a user to search for an XML document in a database, storing plural XML documents, by using an integrated query which tightly couples an XML query with a database query. CONSTITUTION: The system comprises a search management module(110), a syntax analysis module(120), a query process module(130), a result process module(140) and a database engine(200). The search management module(110) performs a function of an interface with the database engine(200), and controls the syntax analysis module(120), the query process module(130), and the result process module(140). The syntax analysis module(120) analyzes the syntax on the XML query input via the search management module(110), checks whether the input XML query follows a preset query context rule, and generates a syntax tree for the input XML query in a case that the input XML query does not follow the preset query context rule. At this time the syntax analysis module(120) receives the integrated query which tightly couples the XML query with a database query, and checks an effectiveness of the input XML query. The query process module(130) processes the XML query by using the generated syntax tree. The result process module(140) converts the query process result of the query process module(130) into the type appropriate for the database engine(200), and transmits the converted result to the search management module(110).

Description

데이터베이스 질의어와 밀결합된 엑스.엠.엘 질의어를 지원하는 엑스.엠.엘 문서 검색장치 및 그 방법{Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language}Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language}

본 발명은 XML 문서 검색장치 및 그 방법에 관한 것으로서, 특히, 데이터베이스에 저장된 XML(eXtensible Markup Language) 문서를 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어에 의해 검색하도록 하는 것을 특징으로 하는 XML 문서 검색장치 및 그 방법에 관한 것이다.The present invention relates to an XML document retrieval apparatus and a method thereof, and more particularly, to search for an XML (eXtensible Markup Language) document stored in a database by using an integrated query in which a database query and an XML query are tightly coupled. A document retrieval apparatus and a method thereof are provided.

XML은 HTML(Hyper Text Markup Language)과 SGML(Standard Generalized Markup Language)의 단점을 개선하여 만들어진 차세대 인터넷 전자 문서 표준이다. XML은 플랫폼에 독립적이며, 문서 정보의 전송과 교환이 쉽고, 문서의 풍부한 의미를 그대로 나타낼 수 있다는 장점을 갖고 있다. 또한, XML은 1998년 2월에 W3C에서 권고안으로 채택되어, 이후 XML의 활용이 점차 활발해지고 있는 실정이다.XML is a next-generation Internet electronic document standard that improves on the shortcomings of Hyper Text Markup Language (HTML) and Standard Generalized Markup Language (SGML). XML is platform-independent, easy to transmit and exchange document information, and has the advantage of expressing the rich meaning of a document. In addition, XML was adopted as a recommendation by the W3C in February 1998, and the use of XML has become more active since then.

이와 같은 추세에 의해, XML 문서의 생성 및 유통이 급격하게 증가하고 있으며, 이로 인해 XML 문서를 관리하기 위한 XML 문서 관리 시스템에 대한 관심이 증대되고 있다.As a result of this trend, the generation and distribution of XML documents is rapidly increasing, and as a result, interest in an XML document management system for managing XML documents is increasing.

이러한 XML 문서 관리 시스템은 파일 시스템을 기반으로 한 시스템에서 점차 데이터베이스 시스템을 기반으로 한 시스템으로 발전하고 있다. 이는 관리되는 문서의 양이 많아짐에 따라 문서의 빠른 검색, 여러 사용자간의 공유, 백업 및 고장시 복구 등 기존 데이터베이스 관리 기능이 필요하게 되었기 때문이다.The XML document management system is evolving from a file system based system to a database system based system. This is because as the amount of documents managed increases, existing database management functions such as quick search of documents, sharing among multiple users, backup and recovery in case of failure are required.

한편, XML 문서 모델은 엘리먼트 간에 순서가 있는 계층 구조로 반구조적 모델이므로 기존의 관계형 자료 모델이나 객체지향 자료 모델같이 구조적 데이터를 취급하는 모델과는 다르기 때문에, XML 문서 관리 시스템을 만들 경우 XML 문서 모델을 지원하는 새로운 데이터베이스 관리 시스템을 구축하거나 기존 데이터베이스 시스템을 이용하여 관리할 때는 두 모델간의 차이점을 보완해 주는 작업이 필요하다. 즉, XML 문서를 데이터베이스에 저장할 때 두 모델간의 차이를 변환하여 저장하는 기능과, XML 문서 검색 시 XML 모델 특성을 반영한 질의 기능이 필요한 것이다.On the other hand, since the XML document model is a hierarchical structure with an ordered sequence between elements, it is different from a model for dealing with structured data such as an existing relational data model or an object-oriented data model. When constructing a new database management system that supports or managing using an existing database system, it is necessary to make up for the differences between the two models. In other words, when storing an XML document in a database, a function of converting and storing a difference between two models and a query function reflecting XML model characteristics when searching an XML document are required.

XML 질의의 종류는 내용기반질의, 속성기반질의, 구조기반질의가 있다.There are two types of XML queries: content-based queries, attribute-based queries, and structure-based queries.

내용기반질의란 XML 문서가 표현하고자 하는 내용자체에 대하여 질의를 하는 것을 말한다. 따라서, 내용기반질의시에는 XML 문서에서 엘리먼트 태그 정보들을 제외한 순수한 텍스트 자료를 대상으로, 선정된 범주내의 텍스트 내용 전체에 대한 정확한 비교를 수행하며, 일반 정보검색 시스템처럼 내용을 대표하는 키워드를 이용한 다양한 기능에 대한 고려가 필요하다.A content-based query is a query on the content itself that an XML document wants to represent. Therefore, in content-based query, pure text data excluding element tag information is performed in XML document, and accurate comparison of the entire text content within the selected category is performed. Functional considerations are needed.

속성기반질의는 속성값의 정의 여부에 의한 비교 및 속성값에 의한 비교 검색이 가능하다. 기본적으로 속성은 자료의 양이 많지 많을 것이므로 정확한 비교로 충분하다.Attribute-based queries allow comparison based on the definition of attribute values and comparison search by attribute values. Basically, an attribute will have a lot of data, so an accurate comparison is sufficient.

구조기반질의에서는 문서를 구성하는 엘리먼트의 존재 여부, 엘리먼트 계층간의 관계, 같은 계층 내에서의 관계, 계층 전체 관계 등을 고려하여야 한다. 계층간의 관계에서는 선조/자손 관계, 부모 자식 관계가 있으며, 같은 계층내의 관계는 형제간의 순서(Preceding Sibling Following Sibling)가 있다. 그리고 문서를 구성하는 멜리먼트 계층 전체를 보면 각 엘리먼트간에 깊이 우선 방식으로 순서가 정해지므로 이 순서에 따른 선/후관계가 있다. 그러므로 이와 같은 구조 관계에 의해 원하는 엘리먼트를 지정할 수 있어야 하는 것이다.Structure-based queries should consider the existence of elements that make up a document, relationships between element hierarchies, relationships within the same hierarchy, and relationships across hierarchies. In the relationship between the hierarchies, there is a ancestor / child relationship and parent-child relationship. In the same hierarchy, there is a sibling ordering (Sibling Following Sibling). And when you look at the entire element hierarchy that composes the document, there is a line / post relationship according to this order because the order is defined between each element in a depth-first manner. Therefore, you should be able to specify the element you want by this structural relationship.

XML문서는 문서 하나의 구성이 응용 분야에 따라 상당히 편파가 심하고, 때로는 책 한권이 하나의 문서일 수도 있으므로 해당 DTD(Document Type Definition) 타입을 갖는 문서 전체에서 검색하는 것 이외에도 지정된 XML 문서에서 원하는 정보를 찾을 수 있게 하는 것도 필요하다. 또한 여러 DTD 타입의 문서들로부터 검색할 수도 있고, 하나의 문서 내에서도 완벽한 XML 문서 전체 혹은 문서를 구성하는 부분 문서를 대상으로 할지에 대한 고려도 필요하다.XML documents are highly biased depending on the application, and sometimes one book can be a single document. In addition to searching through the entire document with the corresponding Document Type Definition (DTD) type, the information desired from the specified XML document It is also necessary to be able to find. It is also possible to search from documents of various DTD types, and consider whether to target the complete XML document or the partial documents that make up the document within a single document.

검색 결과는 검색 대상과 연동되며, 추출 대상은 엘리먼트 혹은 엘리먼트를 구성하는 애트리부트나 내용의 일수일 수도 있고, 검색 대상이 되는 엘리먼트를 구성하는 서브 엘리먼트 계층 중 하나만 얻을 수 도 있고, 여러개를 동시에 얻을 수 도 있다.The search result is linked to the search object, and the extraction object may be an element or an attrit or content constituting the element, or may obtain only one of the sub-element hierarchies constituting the element to be searched. You can also get

상기와 같은 특성을 고려하여 현재 W3C내에서 XML 문서를 위한 질의언어 표준을 제정하기 위하여 노력하고 있고, XPath, XQL, XML-QL 등의 XML 질의 언어가 제안되어 있다.In consideration of the above characteristics, the W3C is currently trying to establish a query language standard for XML documents, and XML query languages such as XPath, XQL, and XML-QL have been proposed.

현재, 많은 XML 문서 관리 시스템이 기존의 데이터베이스 시스템을 활용하여 XML 모델 특성을 반영한 XML 질의 기능을 제공하고 있다. 즉, 데이터베이스 시스템상에 XML 문서를 관리하는 별도의 모듈을 추가하는 등의 방식으로 XML 문서 관리 시스템을 구성한다. 예를 들면, XML 문서 저장시 그 XML 문서를 데이터베이스 시스템에서 제공하는 자료모델로 변환하는 XML 저장기와, XML 문서에 대한 질의어를 데이터베이스 질의어(즉, SQL)로 변환하여 데이터베이스 시스템으로 전달하여 처리하도록 하는 XML 문서검색기를 데이터베이스 시스템 위에 탑재하여 구성한다.Currently, many XML document management systems utilize existing database systems to provide XML query capabilities that reflect the characteristics of XML models. That is, the XML document management system is configured by adding a separate module for managing the XML document on the database system. For example, an XML store that converts an XML document into a data model provided by the database system when storing the XML document, and converts a query word for the XML document into a database query word (that is, SQL) to be delivered to the database system for processing. Configure XML Document Finder on top of the database system.

그런데, 이 방법은 데이터베이스에 저장된 모든 자료를 XML로 취급하는 방식으로서 자유롭게 XML 문서의 특성을 살린 XML 질의 언어를 구성할 수 있는 반면, XML 문서를 기존 데이터베이스에서 관리되던 자료와 연동시키기 위해서는 기존 데이터베이스 자료를 XML 모델로 변환해 주어야 하므로 기존 데이터베이스 자료와 새로운 XML 자료를 통합하여 사용하는 데 불편하다는 단점이 있다.By the way, this method treats all the data stored in the database as XML, and can freely construct the XML query language utilizing the characteristics of the XML document, while in order to link the XML document with the data managed in the existing database, Has to be converted to XML model, so it is inconvenient to integrate existing database data with new XML data.

따라서, 본 발명에서는 이와 같은 문제점을 해결하기 위해, 데이터베이스 질의어와 XML 질의어가 결합된 통합질의어를 사용함으로써 대량의 XML 데이터와 기존 데이터를 연동하여 사용하도록 하며, 데이터베이스 엔진 내부의 API를 이용하여 검색을 수행함으로써 XML 질의의 최적화된 처리를 하도록 하는 XML 문서 검색장치 및 그 방법을 제공하는 것을 목적으로 한다.Therefore, in order to solve the problem, the present invention uses an integrated query combined with a database query and an XML query so that a large amount of XML data and existing data can be linked to each other, and a search can be performed using an API inside the database engine. An object of the present invention is to provide an XML document retrieval apparatus and a method for performing an XML query optimized processing.

상기 목적을 달성하기 위해, 본 발명에서 제공하는 XML 문서 검색장치는 외부 장치를 통해 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 입력받고, 상기 통합질의어를 분석하여 그 통합질의어에 대한 구문트리를 생성하는 구문분석모듈과, 상기 구문분석모듈에서 생성된 구문트리를 이용하여 통합 XML 질의어에서 요구하는 질의를 수행하는 질의처리모듈과, 상기 질의처리모듈의 질의 수행결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환하는 결과처리모듈과, 상기 구문분석모듈, 질의처리모듈 및 결과처리모듈을 제어하고, 데이터베이스 엔진과의 인터페이스를 수행하는 검색관리모듈을 포함하는 것을 특징으로 한다.In order to achieve the above object, the XML document retrieval apparatus provided by the present invention receives an integrated query in which a database query word and an XML query word are tightly coupled through an external device, analyzes the integrated query, and analyzes the syntax for the integrated query. A query processing module for generating a tree, a query processing module for executing a query required by an integrated XML query using the syntax tree generated by the parse module, and processing a query execution result of the query processing module in a database engine And a search management module that controls the syntax analysis module, the query processing module, and the result processing module, and performs an interface with a database engine.

또한, 상기 목적을 달성하기 위해, 본 발명에서 제공하는 XML 문서 검색방법은 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 생성하는 제1 과정과, 상기 통합질의어를 분석하여 그 통합질의어에 대한 구문트리를 생성하는 제2 과정과, 데이터베이스 엔진의 API를 이용하여 상기 구문트리를 순회하며 해당 질의에 대한 검색을 수행하는 제3 과정과, 상기 검색결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환하는 제4 과정과, 상기 제4 과정 수행 결과를 데이터베이스 엔진으로 전달하는 제5 과정을 포함하는 것을 특징으로 한다.In addition, in order to achieve the above object, the XML document retrieval method provided by the present invention is a first process of generating an integrated query in a form in which a database query and an XML query is tightly coupled, and analyzing the integrated query to the integrated query A second process of generating a syntax tree for the query, a third process of traversing the syntax tree using a database engine API and performing a search for the query, and a form suitable for processing the search result in a database engine And a fourth process of converting the fourth process and a fifth process of transmitting a result of performing the fourth process to a database engine.

도 1은 DB질의 언어와 XML 질의 언어와 결합된 통합 질의 언어의 구문 규칙,1 is a syntax rule of an integrated query language combined with a DB query language and an XML query language;

도 1a 및 도 1b는 본 발명의 실시예에 따라 XML 문서를 검색하기 위한 질의어에 대한 예를 나타낸 도면,1A and 1B illustrate an example of a query for searching an XML document according to an embodiment of the present invention;

도 2는 본 발명의 실시예에 따른 XML 문서 검색장치에 대한 기능 블록도,2 is a functional block diagram of an XML document retrieval apparatus according to an embodiment of the present invention;

도 2a는 본 발명의 실시예에 따른 XML 문서 검색방법에 대한 처리 흐름도,2A is a flowchart illustrating a method of searching an XML document according to an embodiment of the present invention;

도 3은 본 발명의 XML 문서 검색장치를 포함한 XML 문서 관리 시스템의 예를 도시한 도면,3 is a diagram showing an example of an XML document management system including the XML document retrieval apparatus of the present invention;

도 3a는 도 3에 도시된 XML 문서 관리 시스템에서 문서를 검색하는 과정을 나타낸 처리 흐름도.3A is a process flow diagram illustrating a process of retrieving a document from the XML document management system shown in FIG.

♣도면의 주요 부분에 대한 부호의 설명 ♣♣ Explanation of symbols for the main parts of the drawing ♣

100 : XML 문서 검색장치 110 : 검색관리모듈100: XML document search device 110: search management module

120 : 구문분석모듈 130 : 질의처리모듈120: parse module 130: query processing module

140 : 결과처리모듈 200 : 데이터베이스 엔진140: result processing module 200: database engine

300 : 데이터베이스300: database

이하, 첨부된 도면을 참조하여 본 발명의 실시예에 따른 일회용 키 생성방법을 좀 더 상세히 설명하고자 한다.Hereinafter, a method of generating a disposable key according to an embodiment of the present invention with reference to the accompanying drawings in more detail.

도 1은 DB질의 언어와 XML 질의 언어와 결합된 통합 질의 언어의 구문 규칙, 도 1a 및 도 1b는 본 발명의 실시예에 따라 XML 문서를 검색하기 위한 질의어에 대한 예를 나타낸 도면이다. 본 발명에서는 대량의 XML 데이터와 기존 데이터를 연동하여 사용할 수 있도록 하기 위해, 데이터베이스 질의어와 XML 질의어가 결합된 통합 질의어를 사용하는데, 도 1은 그러한 통합 질의어에 대한 예시도면이다. 도 1을 참조하면, 상기 통합 질의어를 생성하기 위해, 데이터베이스 질의 언어인 SQL의 WHERE 절을 구성하는 탐색 조건(10)에 XML 질의어의 특성을 지원하기 위한 새로운 프레디키트(predicate)(20)를 추가하도록 한다.1 is a syntax rule of an integrated query language combined with a DB query language and an XML query language, and FIGS. 1A and 1B illustrate examples of a query word for searching an XML document according to an embodiment of the present invention. In the present invention, in order to be able to use a large amount of XML data and the existing data, using a combined query combined with a database query and XML query, Figure 1 is an illustration of such a combined query. Referring to FIG. 1, in order to generate the integrated query, a new predicate 20 for supporting the characteristics of the XML query is added to the search condition 10 constituting the WHERE clause of SQL, which is a database query language. Do it.

즉, 일반적으로 SQL를 지원하는 프레디키트에는 <comparison preicate>, <in predicate>, <like predicate>, <related predicate> 등이 있으나, 이러한 기존의 프레디키드 이외에 도면에 예시된 바와 같은 인지를 갖는 <contains predicate>(20)를 추가한다. 이 때, <contains predicate>(20)의 인자 중의 하나인 'xml_query(25)'는 XML 질의 언어 표기법을 따르는 속성이다.That is, in general, predicates supporting SQL include <comparison preicate>, <in predicate>, <like predicate>, and <related predicate>. However, in addition to these conventional predicates, < add contains predicate> (20) At this time, 'xml_query (25)', one of the arguments of <contains predicate> (20), is an attribute conforming to XML query language notation.

따라서, 도 1에 예시된 바와 같이 질의어를 구성할 경우, SQL을 지원하는 구문에 XML 질의 언어의 속성이 결합된 형태를 가지므로, 이러한 질의어를 사용하여 대량의 XML 데이터와 기존 데이터를 연동하여 사용하도록 하는 것이다.Therefore, when constructing a query as illustrated in FIG. 1, since an attribute of an XML query language is combined with a syntax supporting SQL, a large amount of XML data and existing data can be used in conjunction with such a query. To do that.

도 1a의 예에서는 FROM 절의 클래스 이름이 Paper_Element이므로 Paper DTD의 모든 엘리먼트 중에서 Title 엘리먼트를 검색하고, 도 1b의 예에서는 FROM 절의 클래스 이름이 Book_Element이므로 Book DTD의 모든 엘리먼트 중에서 Title 엘리먼트를 검색한다. 예 1, 2(210~220)와 같이 XML 질의 언어 자체로서는 질의 처리의 대상을 지정할 수 없는 XML 질의 언어의 경우, 데이터베이스 질의 언어에서 제공하는 FROM 절을 사용해서 질의 처리의 대상을 지정할 수가 있게 된다.In the example of FIG. 1A, the Title element is searched among all the elements of the Paper DTD since the class name of the FROM clause is Paper_Element. In the example of FIG. 1B, the Title element is searched among all the elements of the Book DTD because the class name of the FROM clause is Book_Element. In the case of the XML query language such as the examples 1 and 2 (210 to 220) that the query query itself cannot be specified, the query query target can be specified using the FROM clause provided by the database query language. .

도 2는 본 발명의 실시예에 따른 XML 문서 검색장치에 대한 기능 블록도이다. 도 2를 참조하면, 본 발명의 실시예에 따른 XML 문서 검색장치(100)는 검색관리모듈(110), 구문분석모듈(120), 질의처리모듈(130), 결과처리모듈(140)을 포함하여 구성되며, 데이터베이스 엔진(200)을 통해 데이터베이스(300)를 검색한다.2 is a functional block diagram of an XML document retrieval apparatus according to an embodiment of the present invention. 2, the XML document search apparatus 100 according to an embodiment of the present invention includes a search management module 110, a parser module 120, a query processing module 130, and a result processing module 140. It is configured to, and retrieves the database 300 through the database engine 200.

검색관리모듈(110)은 데이터베이스 엔진(200)과의 인터페이스를 수행하며, 구문분석모듈(120), 질의처리모듈(130) 및 결과처리모듈(140)을 제어한다. 즉, 검색관리모듈(110)은 데이터베이스 엔진(200)으로부터 XML 질의어 및 질의처리대상을 전달받아 구문분석모듈(120)로 전달하고, 결과처리모듈(140)로부터 해당 질의어에 대한 처리 결과를 받아 데이터베이스 엔진(200)으로 전달한다.The search management module 110 performs an interface with the database engine 200 and controls the syntax analysis module 120, the query processing module 130, and the result processing module 140. That is, the search management module 110 receives the XML query word and the query processing object from the database engine 200 and delivers it to the parsing module 120, and receives the processing result for the corresponding query word from the result processing module 140. Transfer to the engine 200.

구문분석모듈(120)은 검색관리모듈(110)을 통해 입력되는 XML 질의어에 대한 구문을 분석하여, 그 XML 질의어가 기 설정된 XML 질의어 문법에 위배되는지의 여부를 검사하고, 그렇지 않은 경우 해당 XML 질의어에 대한 구문트리를 생성한다. 이 때, 구문분석모듈(120)은 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 전달받아 그 XML 질의어의 유효성 여부를 검사한다. 통합 XML 질의어에 대한 예는 도 1a 및 도 1b에 나타난 예와 같다.The parsing module 120 analyzes the syntax of the XML query input through the search management module 110 to check whether the XML query violates the preset XML query syntax, and if not, the XML query Create a syntax tree for. At this time, the parser module 120 receives an integrated query in which the database query and the XML query are tightly coupled and checks the validity of the XML query. An example of an integrated XML query is the same as the example shown in FIGS. 1A and 1B.

질의처리모듈(130)은 구문분석모듈(120)에서 생성된 구문트리를 이용하여 XML 질의어에서 요구하는 질의를 수행한다. 이 때, 질의처리모듈(130)은 데이터베이스 엔진(200)의 API를 이용하여 상기 구문트리를 순회하며 해당 질의에 대한 검색을 수행하는데, 그 구문트리의 복잡 정도에 따라 데이터베이스 엔진(200)의 API를 이용한 질의를 수회 반복 수행한다.The query processing module 130 performs a query required by the XML query using the syntax tree generated by the parse module 120. At this time, the query processing module 130 traverses the syntax tree using the API of the database engine 200 and searches for the corresponding query. The API of the database engine 200 depends on the complexity of the syntax tree. Repeat the query several times.

결과처리모듈(140)은 질의처리모듈(130)의 질의 수행결과를 데이터베이스 엔진(200)에서 처리하기에 적합한 형태로 변환하여 검색관리모듈(110)에게 전달한다.The result processing module 140 converts the query performance result of the query processing module 130 into a form suitable for processing by the database engine 200 and transmits the result to the search management module 110.

도 2a는 이러한 XML 문서 검색장치에 의한 XML 문서 검색방법에 대한 처리 흐름도이다. 도 2a를 참조하면, XML 질의어와 질의 처리 대상이 데이터베이스 엔진(200)으로부터 전달될 때, 본 발명의 XML 문서 검색방법이 개시된다.Fig. 2A is a process flowchart of the XML document retrieval method by the XML document retrieval apparatus. Referring to FIG. 2A, when the XML query word and the query processing object are transmitted from the database engine 200, the XML document search method of the present invention is disclosed.

즉, 데이터베이스 엔진(200)으로부터 전달되는 XML 질의어와 질의 처리 대상이 검색 관리 모듈(110)에 전달되면(s101), 검색관리모듈(110)은 XML 질의어를 구문분석모듈(120)로 전달한다(s102). 이 때, 데이터베이스 엔진(200)으로부터 전달되는 XML 질의어는 데이터베이스 질의어와 기존의 XML 질의어가 밀결합된 형태의 통합질의어이다.That is, when the XML query word and the query processing object transmitted from the database engine 200 are transferred to the search management module 110 (s101), the search management module 110 transmits the XML query word to the parsing module 120 ( s102). In this case, the XML query transmitted from the database engine 200 is an integrated query in which the database query and the existing XML query are tightly coupled.

그러면, 구문분석모듈(120)은 그 통합질의어에 대한 구문을 분석하여(s103), 그에 대한 구문트리를 생성한 후, 상기 구문트리를 검색관리모듈(110)로 전달한다(s104).Then, the syntax analysis module 120 analyzes the syntax for the integrated query (s103), generates a syntax tree for it, and transfers the syntax tree to the search management module 110 (s104).

그러면, 검색관리모듈(110)은 구문분석모듈(120)로부터 전달된 구문트리와, 상기 과정(s101)에서 데이터베이스 엔진(200)으로부터 전달된 질의처리대상을 질의처리모듈(130)로 전달한다(s105).Then, the search management module 110 transmits the syntax tree transmitted from the syntax analysis module 120 and the query processing object transmitted from the database engine 200 to the query processing module 130 in step S101. s105).

한편, 상기 구문트리 및 질의처리대상을 전달받은 질의처리모듈(130)은 데이터베이스 엔진의 API를 이용하여 상기 구문트리를 순회하며 해당 질의에 대한 검색을 수행한다(s106). 즉, 질의처리모듈(130)은 검색관리모듈(110)로부터 전달받은 구문트리에 대한 질의 처리 계획을 이용하거나, 그 구문트리를 순회하며 기본 술어 처리, 정보 검색 등과 같이 데이터베이스 엔진(200)이 제공하는 기능을 차례로 수행한다. 이 때, 질의처리모듈(130)에 전달된 구문트리의 복잡 정도에 따라 상기 과정(s106)은 여러 번 반복 수행할 수 있다. 데이터베이스 엔진(200)은 데이터베이스에 직접 접근하여 XML 검색 결과를 얻어 질의처리모듈(130)로 전달한다.Meanwhile, the query processing module 130 that has received the syntax tree and the query processing object traverses the syntax tree using an API of the database engine and searches for the corresponding query (s106). That is, the query processing module 130 uses the query processing plan for the syntax tree received from the search management module 110, or traverses the syntax tree, and is provided by the database engine 200 such as basic predicate processing and information search. Perform the following functions in turn. At this time, depending on the complexity of the syntax tree delivered to the query processing module 130, the process (s106) may be repeated several times. The database engine 200 directly accesses the database, obtains an XML search result, and delivers the result to the query processing module 130.

그리고, 질의처리모듈(130)이 그 XML 검색결과를 검색관리모듈(110)로 전달하면(s107), 검색관리모듈(110)은 그 XML 검색결과를 결과처리모듈(140)로 전달하고(s108), 결과처리모듈(140)은 XML 검색결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환한다(s109). 또한, 결과처리모듈(140)은 이와 같이하여 생성된 최종결과를 검색관리모듈(110)로 전달하고(s110), 검색관리모듈(110)은 그 처리결과를 데이터베이스 엔진(200)으로 전달한다(s111).When the query processing module 130 transmits the XML search result to the search management module 110 (s107), the search management module 110 transmits the XML search result to the result processing module 140 (s108). The result processing module 140 converts the XML search result into a form suitable for processing by the database engine (S109). In addition, the result processing module 140 delivers the final result generated in this way to the search management module 110 (s110), the search management module 110 transmits the processing result to the database engine 200 ( s111).

이 때, 질의처리모듈(130)의 처리결과는 단일형이거나 정보 검색의 결과로 나오는 가중치 값 등을 포함하는 복합형이 될 수가 있으며, 하나의 객체가 될 수도 있고 여러 객체 집합이 될 수도 있다. 따라서, 결과처리모듈(140)에서는 이러한 여러 중간 결과 유형을 데이터베이스 엔진(200)이 추가적인 처리를 할 수 있도록 결과 처리하며(s109), 결과처리모듈(140)은 그 결과를 검색관리모듈(110)을 거쳐 데이터베이스 엔진(200)으로 전달한다.In this case, the processing result of the query processing module 130 may be a single type or a complex type including a weight value resulting from the information retrieval, and may be an object or a set of objects. Therefore, the result processing module 140 processes the results so that the database engine 200 can further process these various intermediate result types (s109), and the result processing module 140 processes the results of the search management module 110. Transfer to the database engine 200 via.

그러면, 데이터베이스 엔진(200)은 데이터베이스 엔진(200)에서 자체 처리한 데이터베이스 질의어에 대한 결과와 XML 문서 검색 장치에서 처리한 결과를 통합하여 XML 응용 프로그램에 전달한다.Then, the database engine 200 integrates the result of the database query word processed by the database engine 200 and the result processed by the XML document retrieval device and delivers the result to the XML application program.

도 3은 이러한 본 발명의 XML 문서 검색장치(100)를 포함한 XML 문서 관리 시스템의 예를 도시한 도면이다. 도 3을 참조하면, XML 문서 관리 시스템은 XML 문서 저장기(340)와, DB 검색부(360)를 포함하여 구성되는데, 이 때, XML 문서 저장기(340)는 데이터베이스 응용 프로그램 인터페이스(350)를 이용하여 개발이 되고, 응용 프로그램(330)에서 XML 문서(310)와 DTD 문서(320)를 저장할 때 이용이 된다.3 is a diagram showing an example of an XML document management system including the XML document search apparatus 100 of the present invention. Referring to FIG. 3, the XML document management system includes an XML document store 340 and a DB search unit 360. In this case, the XML document store 340 may include a database application program interface 350. It is developed using, and is used when storing the XML document 310 and DTD document 320 in the application 330.

또한, 응용 프로그램(330)은 데이터베이스 응용 프로그램 인터페이스(350)에서 제공하는 데이터베이스 질의 API를 이용하여 데이터베이스(370) 내에 저장된 정보에 접근할 수 있다.In addition, the application 330 may access information stored in the database 370 using a database query API provided by the database application program interface 350.

한편, XML 문서 저장기(340)를 이용하여 저장된 XML 데이터(예컨대, DTD 문서(310) 및 XML 문서(320))들은 XML 문서 검색장치(100)와 약속이 된 저장 스키마및 저장 모델을 따라 저장이 되므로 XML 문서 검색장치(100)를 통해 검색하는 것이 가능하다. 이 때, XML 문서 검색장치(100)는 데이터베이스 엔진(200)에서 제공하는 기능을 이용하여 개발이 되고, 데이터베이스 엔진(200)과 연동한다. 즉, 데이터베이스 엔진(200)에서 제공하는 API(예컨대, 자료 접근 API)를 이용하여 데이터베이스 내에 저장되어 있는 대량의 XML 문서에 대한 질의 처리를 수행한다.Meanwhile, XML data (eg, DTD document 310 and XML document 320) stored using the XML document store 340 may be stored according to a storage schema and a storage model that are promised to the XML document search apparatus 100. This makes it possible to search through the XML document search apparatus 100. At this time, the XML document retrieval apparatus 100 is developed using a function provided by the database engine 200, and interoperates with the database engine 200. That is, a query process is performed on a large amount of XML documents stored in a database using an API (eg, a data access API) provided by the database engine 200.

도 3a는 도 3에 도시된 XML 문서 관리 시스템에서 문서를 검색하는 과정을 나타낸 처리 흐름도이다. 도 3a를 참조하면, 우선, XML 응용 프로그램(330)은 사용자 통합질의어를 생성하여 데이터베이스 응용프로그램 인터페이스(350)로 전달하고(s301), 데이터베이스 응용프로그램 인터페이스(350)는 그 정보에 의거하여 엔진통합질의어를 생성하여 데이터베이스 엔진(200)으로 전달한다(s302).3A is a process flowchart illustrating a process of searching for a document in the XML document management system shown in FIG. 3. Referring to FIG. 3A, first, the XML application 330 generates a user integration query and transmits it to the database application program interface 350 (s301), and the database application program interface 350 integrates the engine based on the information. A query is generated and transmitted to the database engine 200 (S302).

이 때, 통합질의어란 기존의 데이터베이스 질의어와 XML 질의어가 통합된 형태를 말하는 것으로서, 그 예가 도 1a 및 도 1b에 나타나 있다. 즉, 일반적인 데이터베이스에 대한 질의 인터페이스 구조를 그대로 사용하며, 데이터베이스 질의어에 추가되는 사항인 SQL 구문의 WHERE 절에 CONTAINS 프레디키트를 사용하여 XML 질의를 입력하게 된다.In this case, the integrated query refers to a form in which an existing database query word and an XML query word are integrated, and examples thereof are shown in FIGS. 1A and 1B. In other words, the query interface structure of the general database is used as it is, and the XML query is entered using the CONTAINS predicate in the WHERE clause of the SQL statement that is added to the database query.

따라서, XML 응용 프로그램(330)에 의해 구성된 사용자 통합질의어는 데이터베이스 응용 프로그램 인터페이스(350)의 질의 API를 통해 데이터베이스 엔진(200)에 전달된다(s301 및 s302). 그러면, 데이터베이스 엔진(200)은 그 엔진 통합질의어 중에서 XML 질의어를 추출하여(s303), 그 XML 질의어를 질의 처리 대상과 함께 XML 문서 검색장치(100)로 전달한다(s305). 또한, 데이터베이스 엔진(200)은 XML 질의어를 추출하고 남은 데이터베이스 질의에 의거하여 데이터베이스 검색을 수행한다(s304).Therefore, the user integration query configured by the XML application 330 is transmitted to the database engine 200 through the query API of the database application program interface 350 (S301 and S302). Then, the database engine 200 extracts the XML query from the engine integrated query (s303), and transmits the XML query to the XML document search apparatus 100 together with the query processing target (s305). In addition, the database engine 200 extracts the XML query and performs a database search based on the remaining database query (S304).

한편, XML 문서 검색장치(100)는 데이터베이스 엔진(200)으로부터 전달된 XML 질의어에 의해 XML 문서에 대한 검색을 수행하고(s306), 그 처리결과를 데이터베이스 엔진(200)으로 전달한다(s307). 그러면, 데이터베이스 엔진(200)은 XML 문서 검색장치(100)로부터 전달된 XML 질의 결과와 자체 검색에 의한 SQL 질의 결과를 통합하여(s308), 엔진최종결과를 생성한 후 그 엔진최종결과를 데이터베이스 응용프로그램 인터페이스(350)로 전달한다(s309). 엔진최종결과를 전달받은 데이터베이스 응용프로그램 인터페이스(350)는 사용자 최종결과를 생성하여 XML 응용프로그램으로 전달한다(s310).On the other hand, the XML document search apparatus 100 performs a search for the XML document by the XML query word transmitted from the database engine 200 (s306), and transmits the processing result to the database engine 200 (s307). Then, the database engine 200 integrates the XML query result transmitted from the XML document search apparatus 100 and the SQL query result by the self search (s308), generates an engine final result, and then applies the engine final result to the database application. Transfer to the program interface 350 (s309). The database application program interface 350 receiving the engine final result generates and transmits the user final result to the XML application program (s310).

이상의 설명은 하나의 실시예를 설명한 것에 불과한 것으로서, 본 발명은 상술한 실시예에 한정되지 않으며 첨부한 특허청구범위 내에서 다양하게 변경 가능하다. 예를 들어 본 발명의 실시예에 구체적으로 나타난 각 구성 요소의 형상 및 구조는 변형하여 실시할 수 있다.The above description is merely an example of an embodiment, and the present invention is not limited to the above-described embodiment and can be variously changed within the scope of the appended claims. For example, the shape and structure of each component specifically shown in the embodiment of the present invention can be modified.

상기와 같은 본 발명의 XML 문서 검색장치 및 그 방법은 데이터베이스 질의어와 XML 질의어가 밀결합된 통합질의어를 사용함으로써, 대량의 XML 데이터와 기존 데이터를 용이하게 연동하여 사용할 수 있도록 한다는 장점이 있다. 또한, 상기 통합질의어를 사용함으로 인해, XML 질의어의 단점을 데이터베이스의 질의어를 통해 보강할 수 있다는 효과가 있다.The XML document search apparatus and method thereof of the present invention as described above have an advantage that a large amount of XML data and existing data can be easily used by using an integrated query in which a database query word and an XML query word are tightly coupled. In addition, by using the integrated query, there is an effect that can be reinforced through the query of the database query disadvantage.

한편, XML 질의어 처리시 데이터베이스 응용프로그램 API인 질의어를 사용하지 않고, 데이터베이스 내부에서 데이터베이스 엔진이 제공하는 API를 직접 이용함으로써, XML 데이터와 XML 질의어의 특성을 고려한 질의 처리가 가능하여 XML 질의 처리 성능을 최적화할 수 있다는 장점이 있다.On the other hand, instead of using the query language, which is a database application program API, directly using the API provided by the database engine inside the database, it is possible to process XML query processing considering the characteristics of XML data and XML query words. The advantage is that it can be optimized.

Claims (4)

XML 문서 검색장치에 있어서,In the XML document retrieval apparatus, 외부 장치를 통해 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 입력받고, 상기 통합질의어를 분석하여 그 통합질의어에 대한 구문트리를 생성하는 구문분석모듈과,A syntax analysis module that receives an integrated query in which a database query word and an XML query word are tightly coupled through an external device, analyzes the integrated query, and generates a syntax tree for the integrated query word; 상기 구문분석모듈에서 생성된 구문트리를 이용하여 통합 XML 질의어에서 요구하는 질의를 수행하는 질의처리모듈과,A query processing module that performs a query required by an integrated XML query using a syntax tree generated by the parse module; 상기 질의처리모듈의 질의 수행결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환하는 결과처리모듈과,A result processing module for converting the query execution result of the query processing module into a form suitable for processing by a database engine; 상기 구문분석모듈, 질의처리모듈 및 결과처리모듈을 제어하고, 데이터베이스 엔진과의 인터페이스를 수행하는 검색관리모듈을 포함하는 것을 특징으로 하는 XML 문서 검색장치.And a search management module which controls the syntax analysis module, the query processing module, and the result processing module and interfaces with a database engine. 제1항에 있어서, 상기 질의처리모듈은The method of claim 1, wherein the query processing module 데이터베이스 엔진의 API를 이용하여 상기 구문트리를 순회하며 질의에 대한 검색을 수행하는 것을 특징으로 하는 XML 문서 검색장치.An XML document retrieval apparatus for retrieving a query while traversing the syntax tree using an API of a database engine. XML 문서 검색방법에 있어서,In the XML document search method, 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 생성하는 제1 과정과,A first process of generating an integrated query in which a database query and an XML query are tightly coupled; 상기 통합질의어를 분석하여 그 통합질의어에 대한 구문트리를 생성하는 제2 과정과,A second process of analyzing the unified query and generating a syntax tree for the unified query; 데이터베이스 엔진의 API를 이용하여 상기 구문트리를 순회하며 해당 질의에 대한 검색을 수행하는 제3 과정과,A third step of traversing the syntax tree using a database engine API to perform a search for the query; 상기 검색결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환하는 제4 과정과,A fourth process of converting the search result into a form suitable for processing by a database engine; 상기 제4 과정 수행 결과를 데이터베이스 엔진으로 전달하는 제5 과정을 포함하는 것을 특징으로 하는 XML 문서 검색방법.And a fifth process of transmitting the result of performing the fourth process to a database engine. XML 문서 검색 방법을 수행하기 위하여 디지털 처리장치에 의해 실행될 수 있는 명령어들의 프로그램이 유형적으로 구현되어 있으며, 디지털 처리장치에 의해 판독될 수 있는 기록 매체에 있어서,In order to perform the XML document retrieval method, a program of instructions that can be executed by a digital processing apparatus is tangibly embodied, and in a recording medium that can be read by a digital processing apparatus, 데이터베이스 질의어와 XML 질의어가 밀결합된 형태의 통합질의어를 생성하는 제1 과정과,A first process of generating an integrated query in which a database query and an XML query are tightly coupled; 상기 통합질의어를 분석하여 그 통합질의어에 대한 구문트리를 생성하는 제2 과정과,A second process of analyzing the unified query and generating a syntax tree for the unified query; 데이터베이스 엔진의 API를 이용하여 상기 구문트리를 순회하며 해당 질의에 대한 검색을 수행하는 제3 과정과,A third step of traversing the syntax tree using a database engine API to perform a search for the query; 상기 검색결과를 데이터베이스 엔진에서 처리하기에 적합한 형태로 변환하는 제4 과정과,A fourth process of converting the search result into a form suitable for processing by a database engine; 상기 제4 과정 수행 결과를 데이터베이스 엔진으로 전달하는 제5 과정을 수행하는 기록 매체.And a fifth process of transmitting a result of performing the fourth process to a database engine.
KR10-2001-0084801A 2001-12-26 2001-12-26 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language KR100487738B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0084801A KR100487738B1 (en) 2001-12-26 2001-12-26 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0084801A KR100487738B1 (en) 2001-12-26 2001-12-26 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language

Publications (2)

Publication Number Publication Date
KR20030054605A true KR20030054605A (en) 2003-07-02
KR100487738B1 KR100487738B1 (en) 2005-05-06

Family

ID=32213238

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0084801A KR100487738B1 (en) 2001-12-26 2001-12-26 Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language

Country Status (1)

Country Link
KR (1) KR100487738B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100456027B1 (en) * 2002-12-10 2004-11-08 한국전자통신연구원 Apparatus and method for transforming ebXML filter query by using G-FQL
KR100670208B1 (en) * 2004-12-15 2007-01-16 한국전자통신연구원 System and method for processing continuous query language based xml query language for processing streaming data expressed xml
KR101400214B1 (en) * 2013-01-28 2014-05-28 주식회사 알티베이스 Appratus for providing a hybrid c interface

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001216190A (en) * 2000-01-31 2001-08-10 Fujitsu Ltd Information extracting device and recording medium
JP3630062B2 (en) * 2000-02-21 2005-03-16 日本電信電話株式会社 Semi-structured document search method and apparatus, and storage medium storing semi-structured document search program
KR100358348B1 (en) * 2000-06-01 2002-10-25 (주) 아이티캠프 Multi-Path Index Method for The Efficient Retrieval of XML Data
KR100417569B1 (en) * 2000-12-08 2004-02-05 학교법인 인하학원 Search method of distributed/heterogeneous gis databases using metadata interchange standard
KR20030042255A (en) * 2001-11-22 2003-05-28 주식회사 아이브릿지 System for digital contents syndication using intelligent agent program
KR100456621B1 (en) * 2001-12-24 2004-11-10 한국전자통신연구원 Apparatus and method for processing association-filter query language by using database registry reference

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100456027B1 (en) * 2002-12-10 2004-11-08 한국전자통신연구원 Apparatus and method for transforming ebXML filter query by using G-FQL
KR100670208B1 (en) * 2004-12-15 2007-01-16 한국전자통신연구원 System and method for processing continuous query language based xml query language for processing streaming data expressed xml
KR101400214B1 (en) * 2013-01-28 2014-05-28 주식회사 알티베이스 Appratus for providing a hybrid c interface

Also Published As

Publication number Publication date
KR100487738B1 (en) 2005-05-06

Similar Documents

Publication Publication Date Title
US6721727B2 (en) XML documents stored as column data
US7305414B2 (en) Techniques for efficient integration of text searching with queries over XML data
US6996571B2 (en) XML storage solution and data interchange file format structure
Yoshikawa et al. XRel: a path-based approach to storage and retrieval of XML documents using relational databases
US8209352B2 (en) Method and mechanism for efficient storage and query of XML documents based on paths
US7644066B2 (en) Techniques of efficient XML meta-data query using XML table index
KR100701104B1 (en) Method of generating database schema to provide integrated view of dispersed information and integrating system of information
KR100487738B1 (en) Apparatus and method XML document retrieval supporting XML query language tightly-coupled with database query language
Pal et al. XML support in Microsoft SQL Server 2005
Al Hamad RXML: Path-based and XML DOM approaches for integrating between relational and XML databases
Bhowmick et al. Representation of web data in a web warehouse
Dimitrov XML standards for ontology exchange
Harrathi et al. A query graph for visual querying structured documents
Córcoles et al. A Spatio-Temporal Query Language for a data model based on XML.
Zhan XML-based data integration for application interoperability
Tsekas A storage model for XML documents and data retrieval from an RDBMS using XPath
Colgrove Querying geographically dispersed, heterogeneous data stores: The pperfxchange approach
Al-Wasil Querying distributed heterogeneous structured and semi-structured data sources
Hnin et al. Transforming RDF via RDF Schema into XML Documents for XPath Query Language
Badr et al. Capturing Data using XML Paragraph-centric Document.
Roduner et al. Accessing XML Data from an Object-Relational Mediator Database
Ali Distributed Query Engine for XML Data over the Network
Zhengyu et al. A DTD-Syntax-Tree Based XML file Modularization Browsing Technique
Wankhade et al. INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY
DE VIRGILIO et al. Segmentation of HTML Web sites in Web Entity Blocks

Legal Events

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

Payment date: 20100401

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee