JP4568267B2 - Structured document retrieval system and database management program - Google Patents

Structured document retrieval system and database management program Download PDF

Info

Publication number
JP4568267B2
JP4568267B2 JP2006325035A JP2006325035A JP4568267B2 JP 4568267 B2 JP4568267 B2 JP 4568267B2 JP 2006325035 A JP2006325035 A JP 2006325035A JP 2006325035 A JP2006325035 A JP 2006325035A JP 4568267 B2 JP4568267 B2 JP 4568267B2
Authority
JP
Japan
Prior art keywords
search
query expression
xml document
query
result
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP2006325035A
Other languages
Japanese (ja)
Other versions
JP2008140081A (en
Inventor
和久 幸田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
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 Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2006325035A priority Critical patent/JP4568267B2/en
Publication of JP2008140081A publication Critical patent/JP2008140081A/en
Application granted granted Critical
Publication of JP4568267B2 publication Critical patent/JP4568267B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、構造化文書を検索するのに好適な構造化文書検索システム及びデータベース管理プログラムに関する。   The present invention relates to a structured document retrieval system and a database management program suitable for retrieving a structured document.

XML(Extensible Markup Language)形式の文書、つまりXML文書に代表される構造化文書では、タグと呼ばれる文字列で文書の階層化された構造(論理構造)が表現される。具体的には、1組のタグ(開始タグ及び終了タグの組)によってテキストを囲むことによって、当該テキストが構造化される。開始タグから終了タグまでの文字列はタグを含めて要素と呼ばれ、開始タグから終了タグで囲まれた文字列は、要素の内容と呼ばれる。構造化文書(XML文書)は木構造によって表現することが可能である。構造化文書の木構造において、構造化文書の要素に対応するノードは要素ノード、要素の内容(値)がテキストの場合の当該要素の内容に対応するノードはテキストノードと呼ばれる。テキストノードはテキストのみから構成される。つまりテキストノード=テキストノードの値=テキストである。   In a document in an XML (Extensible Markup Language) format, that is, a structured document represented by an XML document, a hierarchical structure (logical structure) of the document is expressed by a character string called a tag. Specifically, the text is structured by surrounding the text with a set of tags (a set of start tags and end tags). The character string from the start tag to the end tag is called an element including the tag, and the character string surrounded by the start tag to the end tag is called an element content. A structured document (XML document) can be expressed by a tree structure. In the tree structure of a structured document, a node corresponding to an element of the structured document is called an element node, and a node corresponding to the content of the element when the element content (value) is text is called a text node. A text node consists only of text. That is, text node = value of text node = text.

XMLの普及に伴い、リレーショナルデータベースにおけるSQL(Structured Query Language)のような、XMLデータベースを管理するサーバ(データベースサーバ)に問い合わせを行うための問い合わせ言語(問い合わせ式)が検討もしくは策定されている。このような問い合わせ言語の1つとして、WWW(World Wide Web)コンソーシアムで策定されているXQueryが知られている。   With the spread of XML, an inquiry language (query expression) for making an inquiry to a server (database server) that manages an XML database, such as SQL (Structured Query Language) in a relational database, has been studied or formulated. As one of such inquiry languages, XQuery which is formulated by the WWW (World Wide Web) consortium is known.

例えば、特許文献1は、XQueryのような構造化文書問い合わせ言語(構造化文書問い合わせ式)を適用する構造化文書検索(管理)システムを開示している。このようなシステムでは、クライアント(クライアント端末)は所定のアプリケーションの実行により、XQueryを用いてデータベースサーバへの問い合わせを行う。データベースサーバは、この問い合わせに従う検索(XQuery検索)を実行する。そしてデータベースサーバは、検索の結果(XQuery検索結果)として、XQueryで指定される必要なXML文書(XML文書データ)をクライアントに返す。これによりクライアントは、必要なXML文書をXQuery検索結果として取得することができる。ここで取得されるXML文書は、XML文書(構造化文書)の一部、全体、または、XML文書の複数部分を含む新たな形式のXML文書などである。   For example, Patent Document 1 discloses a structured document search (management) system that applies a structured document query language (structured document query expression) such as XQuery. In such a system, a client (client terminal) makes an inquiry to a database server using XQuery by executing a predetermined application. The database server executes a search (XQuery search) according to this inquiry. Then, the database server returns a necessary XML document (XML document data) designated by XQuery to the client as a search result (XQuery search result). As a result, the client can acquire a necessary XML document as an XQuery search result. The XML document acquired here is a part of the XML document (structured document), the whole, or a new type of XML document including a plurality of parts of the XML document.

また、データベースサーバ上で動作するデータベース管理システム(Database Management System: DBMS)を始めとする、多数の構造化文書を管理し、大規模な検索処理を行うシステム(構造化文書検索システム)においては、上記特許文献1、或いは例えば特許文献2にも記載されているように、予め作成された索引(インデックス)を用いて検索速度を向上させる手法を適用するのが一般的である。   Moreover, in a system (structured document search system) that manages a large number of structured documents and manages a large number of structured documents, such as a database management system (DBMS) that operates on a database server, As described in Patent Document 1 or Patent Document 2, for example, it is common to apply a technique for improving the search speed using an index created in advance.

さて、XML文書データベースから複数のXML文書もしくはXML文書内の構造部分(ノード)を検索し、その検索結果を組み合わせて新規XML文書を作成したい場合がある。このような場合、従来は、次に述べる第1または第2の手法が適用されるのが一般的である。   In some cases, a plurality of XML documents or structural parts (nodes) in the XML document are searched from the XML document database, and a new XML document is created by combining the search results. In such a case, conventionally, the following first or second method is generally applied.

第1の手法は、XQueryのFLWOR(FOR,LET,WHERE,ORDER BY,RETURN)表現式を利用することを特徴とする。クライアントは、このXQueryのFLWOR表現式を利用することにより、データベースサーバに対して作成したい新規XML文書を構成する複数の構造部分を検索させると共に、その検索された複数の構造部分が組み合わされた新規XML文書を作成させることができる。つまりクライアントは、XQueryのFLWOR表現式を利用することにより、データベースサーバから当該FLWOR表現式で指定された複数の構造部分が組み合わされた新規XML文書を取得することができる。ここで、検索される構造部分も、XML文書の構造の特徴から、1つのXML文書であるといえる。   The first method is characterized by using the XQuery FLWOR (FOR, LET, WHERE, ORDER BY, RETURN) expression. The client uses the XQuery FLWOR expression to cause the database server to search for a plurality of structural parts constituting a new XML document to be created, and to combine the searched multiple structural parts. An XML document can be created. That is, by using the XQuery FLWOR expression, the client can acquire a new XML document in which a plurality of structural parts specified by the FLWOR expression are combined from the database server. Here, it can be said that the structural part to be searched is also one XML document because of the structural features of the XML document.

一方、第2の手法は、XPathと呼ばれる任意の文書構造を指定する構造指定情報を利用することを特徴とする。この第2の手法では、クライアントは、作成したい新規XML文書を構成する複数の構造部分(XML文書)を個々に取得するために、目的とする構造部分にそれぞれ対応するXPathを用いて、逐次データベースサーバに検索を要求する。データベースサーバは、クライアントから検索が要求される都度、対応するXPathで指定される構造部分(XML文書)を検索して当該クライアントに返す。これによりクライアントは、XPath毎に対応する構造部分(XML文書)を検索結果として取得する。クライアントは、取得された検索結果を、ドキュメントオブジェクトモデル(Document Object Model:DOM)もしくはXMLのスタイルシート言語(Extensible Stylesheet Language:XSL)への変換言語であるXSLT(XSL Transformations)を利用したアプリケーション処理により組み合わせて、目的の新規XML文書を作成する。
特開2005−227851号公報 特許第3754253号公報
On the other hand, the second method is characterized in that it uses structure designation information that designates an arbitrary document structure called XPath. In this second method, the client sequentially acquires a plurality of structure parts (XML documents) constituting a new XML document to be created by using an XPath corresponding to each of the target structure parts. Request a search from the server. Each time a search is requested from a client, the database server searches for the structure portion (XML document) specified by the corresponding XPath and returns it to the client. As a result, the client acquires a structure portion (XML document) corresponding to each XPath as a search result. The client obtains the obtained search result by an application process using XSLT (XSL Transformations) which is a transformation language to a document object model (DOM) or XML style sheet language (Extensible Stylesheet Language: XSL). In combination, a target new XML document is created.
JP 2005-227851 A Japanese Patent No. 3754253

前記第1の手法では、クライアントはXQueryのFLWOR表現式を利用することにより、データベースサーバに対して、複数のXML文書もしくはXML文書内の構造部分(ノード)の検索と、その検索結果が組み合わされた新規XML文書の作成とを行わせることができる。しかし、そのためには、クライアントはアプリケーション処理により複雑な構造のXQuery(つまり構造化文書の問い合わせ式)を作成(記述)する必要がある。このことは、効率的なアプリケーション開発を妨げる。   In the first method, the client uses the XQuery FLWOR expression to search the database server for a plurality of XML documents or structural parts (nodes) in the XML document and the search results. New XML documents can be created. However, for this purpose, the client needs to create (describe) an XQuery having a complicated structure (that is, a query expression for a structured document) by application processing. This hinders efficient application development.

一方、前記第2の手法では、クライアントは、複数のXML文書もしくはXML文書内の構造部分(ノード)の各々の検索のために、対応するXpath(Xpath式)を用いて、逐次データベースサーバに検索を要求して、その都度当該サーバから検索結果を取得する必要がある。このため、第2の手法では、クライアントとデータベースサーバとの間の通信量(トラフィック量)の増加を招く。また、クライアントは、取得された検索結果を、DOM/XSLTを利用したアプリケーション処理により組み合わせて、目的の新規XML文書を作成する必要がある。このため、クライアント上でのアプリケーション処理が煩雑になり、効率的なアプリケーション開発を妨げる。   On the other hand, in the second method, the client sequentially searches the database server using the corresponding Xpath (Xpath expression) for searching each of a plurality of XML documents or structural parts (nodes) in the XML document. It is necessary to obtain a search result from the server each time. For this reason, the second method causes an increase in the amount of traffic (traffic amount) between the client and the database server. In addition, the client needs to create a target new XML document by combining the acquired search results by application processing using DOM / XSLT. This complicates application processing on the client and hinders efficient application development.

本発明は上記事情を考慮してなされたものでその目的は、複数の構造化文書もしくは構造化文書内の構造部分を検索してその検索結果が組み合わされた新規構造化文書を作成する処理が、クライアント側でのアプリケーション処理に負担をかけることなく行える構造化文書検索システム及びデータベース管理プログラムを提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to search a plurality of structured documents or a structure portion in a structured document and create a new structured document in which the search results are combined. Another object of the present invention is to provide a structured document search system and database management program that can be executed without imposing a burden on application processing on the client side.

本発明の1つの観点によれば構造化文書検索システムが提供される。この構造化文書検
索システムは、問い合わせ式が埋め込まれた構造化文書を含む複数の構造化文書を格納す
る構造化文書データベースと、クライアントから与えられる検索要求に従う第1の検索処
理によって、前記構造化文書データベースから当該検索要求の示す検索条件を満たす構造
化文書を第1の検索結果として取得する検索手段と、前記第1の検索結果に問い合わせ式
が埋め込まれているかを判定する問い合わせ式判定手段と、前記第1の検索結果に問い合
わせ式が埋め込まれていると判定された場合、当該問い合わせ式に従う第2の検索処理を
実行する問い合わせ式実行手段と、前記問い合わせ式実行手段による前記第2の検索処理
の実行結果で、前記第1の検索結果に埋め込まれている前記問い合わせ式を置き換えて、
当該問い合わせ式が当該第2の検索処理の実行結果で置き換えられた第2の検索結果を前
記検索要求に対する検索結果とする置換手段と、前記クライアントから与えられる検索要
求中に含まれている情報であって、実行されるべき問い合わせ式を指定する情報を取得す
る問い合わせ式指定情報取得手段と、前記第1の検索結果に問い合わせ式が埋め込まれて
いると判定された場合、当該問い合わせ式を指定する情報が前記問い合わせ式指定情報取
得手段によって取得されているかに応じて、当該問い合わせ式に従う前記第2の検索処理
が実行されるべきかを判定する問い合わせ式実行判定手段とを具備し、前記問い合わせ式
実行手段は、前記第2の検索処理が実行されるべきと判定された場合に限り、当該第2の
検索処理を実行する。
According to one aspect of the present invention, a structured document retrieval system is provided. The structured document search system includes a structured document database that stores a plurality of structured documents including a structured document in which a query expression is embedded, and a first search process according to a search request given from a client. Search means for acquiring a structured document satisfying the search condition indicated by the search request from the document database as a first search result; query expression determination means for determining whether a query expression is embedded in the first search result; When it is determined that a query expression is embedded in the first search result, a query expression executing means for executing a second search process according to the query expression, and the second search by the query expression executing means In the execution result of the process, replace the query expression embedded in the first search result,
A replacement unit that uses the second search result in which the query expression is replaced with the execution result of the second search process as a search result for the search request, and a search request given from the client.
Get information that is included in the query that specifies the query expression to be executed
Query formula designation information acquisition means, and the query formula is embedded in the first search result.
If it is determined that the query expression specifying information is received,
The second search process according to the inquiry formula depending on whether it is acquired by the acquisition means
Query expression execution determination means for determining whether or not to execute, the query expression
Only when it is determined that the second search process should be executed, the execution means executes the second search process.
Perform search processing.

本発明によれば、検索要求に従う検索処理によって前記構造化文書データベースから検索された構造化文書に問い合わせ式が埋め込まれている場合に、当該問い合わせ式が実行されて、その実行結果(例えば構造化文書内の構造部分)で当該検索された構造化文書に埋め込まれている当該問い合わせ式が置き換えられて、その置き換え後の構造化文書が検索要求に対する検索結果として取得される。このため、複数の構造化文書もしくは構造化文書内の構造部分を検索してその検索結果が組み合わされた新規構造化文書を作成する処理が、元の構造化文書に単純な問い合わせ式を埋め込んでおくだけで、クライアント側でのアプリケーション処理に負担をかけることなく行え、アプリケーション開発の効率化が可能となる。   According to the present invention, when a query expression is embedded in a structured document searched from the structured document database by a search process according to a search request, the query expression is executed, and the execution result (for example, structured data) The query expression embedded in the searched structured document is replaced with the structural part in the document), and the structured document after the replacement is acquired as a search result for the search request. For this reason, the process of searching for multiple structured documents or structure parts in a structured document and creating a new structured document that combines the search results embeds a simple query expression in the original structured document. This makes it possible to perform application processing on the client side without imposing a burden and to improve the efficiency of application development.

以下、本発明の実施の形態につき図面を参照して説明する。
図1は本発明の一実施形態に係る構造化文書検索システムを含むクライアント−サーバシステムのハードウェア構成を示すブロック図である。図1のクライアント−サーバシステムは、主として、データベースサーバ(データベースサーバコンピュータ)10と、複数のクライアント端末(クライアント)とから構成される。複数のクライアント端末はクライアント端末20を含む。クライアント端末20上では、データベースサーバ10を利用するアプリケーション(アプリケーションプログラム)が動作する。クライアント端末20を含む複数のクライアント端末は、ローカルエリアネットワーク(LAN)のようなネットワーク30を介してデータベースサーバ10と接続されている。なお、図1にはクライアント端末20以外のクライアント端末は省略されている。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a hardware configuration of a client-server system including a structured document search system according to an embodiment of the present invention. The client-server system shown in FIG. 1 mainly includes a database server (database server computer) 10 and a plurality of client terminals (clients). The plurality of client terminals include a client terminal 20. On the client terminal 20, an application (application program) that uses the database server 10 operates. A plurality of client terminals including the client terminal 20 are connected to the database server 10 via a network 30 such as a local area network (LAN). In FIG. 1, client terminals other than the client terminal 20 are omitted.

データベースサーバ10は、ハードディスクドライブのような外部記憶装置40と接続されている。この外部記憶装置40は、データベース管理プログラム41及びXMLデータベース42を格納する。   The database server 10 is connected to an external storage device 40 such as a hard disk drive. The external storage device 40 stores a database management program 41 and an XML database 42.

データベース管理プログラム41は、データベースサーバ10によるXMLデータベース42の管理、及びクライアント端末からのXQuery等を用いた検索要求(問い合わせ)に基づく検索処理に用いられる。XMLデータベース42は構造化文書であるXML文書(XML文書データ)を格納する構造化文書データベースである。XMLデータベース42には、当該データベース42に格納されるXML文書に基づいて作成される索引等も格納される。   The database management program 41 is used for management of the XML database 42 by the database server 10 and search processing based on a search request (inquiry) using XQuery or the like from the client terminal. The XML database 42 is a structured document database that stores an XML document (XML document data) that is a structured document. The XML database 42 also stores an index created based on the XML document stored in the database 42.

本実施形態では、データベースサーバ10及び外部記憶装置40(に格納されているXMLデータベース42)によって構造化文書検索システム50が実現される。   In the present embodiment, the structured document search system 50 is realized by the database server 10 and the external storage device 40 (the XML database 42 stored in the database server 10).

図2は図1に示される構造化文書検索システム50の主として機能構成を示すブロック図である。構造化文書検索検索システム50は、データベース管理システム51及びXMLデータベース42から構成される。データベース管理システム51は、要求処理部52、格納処理部53及び検索処理部54を含む。これらの各処理部52乃至54は、図1のデータベースサーバ10が外部記憶装置40に格納されている検索処理プログラム41を読み込んで実行することにより実現される。このプログラム41は、コンピュータ読み取り可能な記憶媒体に予め格納して頒布可能である。また、このプログラム41が、ネットワーク30を介してデータベースサーバ10にダウンロードされても構わない。   FIG. 2 is a block diagram mainly showing a functional configuration of the structured document search system 50 shown in FIG. The structured document search / retrieval system 50 includes a database management system 51 and an XML database 42. The database management system 51 includes a request processing unit 52, a storage processing unit 53, and a search processing unit 54. Each of these processing units 52 to 54 is realized by the database server 10 of FIG. 1 reading and executing the search processing program 41 stored in the external storage device 40. This program 41 can be stored in advance in a computer-readable storage medium and distributed. Further, this program 41 may be downloaded to the database server 10 via the network 30.

XMLデータベース42には、XML文書格納部(構造化文書格納部)421及び索引格納部422が確保されている。XML文書格納部421は、複数のXML文書(XML文書データ)を格納するのに用いられる。索引格納部422は、XML文書格納部421に格納されているXML文書を検索するのに用いられるインデックス(索引)、例えば構造インデックスを保存する構造インデックスファイル423を格納するのに用いられる。   In the XML database 42, an XML document storage unit (structured document storage unit) 421 and an index storage unit 422 are secured. The XML document storage unit 421 is used to store a plurality of XML documents (XML document data). The index storage unit 422 is used to store an index (index) used for searching the XML document stored in the XML document storage unit 421, for example, a structure index file 423 for storing a structure index.

要求処理部52は、クライアント端末からネットワーク30を介して構造化文書検索システム50(内のデータベース管理システム51)に与えられる、格納要求や検索要求などの各種の要求(コマンド)を受け付けて当該要求の種別を判別し、その判別結果に応じて格納処理部53及び検索処理部54のいずれかに当該要求の指定する処理を実行させる。   The request processing unit 52 receives various requests (commands) such as a storage request and a search request given to the structured document search system 50 (internal database management system 51) from the client terminal via the network 30, and receives the request. The type of the request is determined, and either the storage processing unit 53 or the search processing unit 54 is caused to execute the process specified by the request according to the determination result.

格納処理部53は、格納要求を解析し、当該要求で指定されたXML文書及び当該XML文書のインデックスを、XMLデータベース42のそれぞれXML文書格納部421及び索引格納部422に格納する。格納処理部53は、XMLデータベース42のXML文書格納部421及び索引格納部422へのアクセスを操作するデータベース操作部530を含む。   The storage processing unit 53 analyzes the storage request, and stores the XML document designated by the request and the index of the XML document in the XML document storage unit 421 and the index storage unit 422 of the XML database 42, respectively. The storage processing unit 53 includes a database operation unit 530 that operates access to the XML document storage unit 421 and the index storage unit 422 of the XML database 42.

検索処理部54は、検索要求を解析し、当該検索要求で指定される検索条件(問い合わせ式)を満足する検索結果を生成する。検索処理部54は、この検索結果を生成するために、データベース操作部540、検索部541、問い合わせ式実行部542、問い合わせ式判定部543、置換部544、削除部545、ID取得部546及びID判定部547を含む。データベース操作部540は、XMLデータベース42のXML文書格納部421及び索引格納部422へのアクセスを操作する。残りの各部541〜547の機能については後述する。   The search processing unit 54 analyzes the search request and generates a search result that satisfies the search condition (query expression) specified by the search request. The search processing unit 54 generates a database search unit 540, a search unit 541, a query formula execution unit 542, a query formula determination unit 543, a substitution unit 544, a deletion unit 545, an ID acquisition unit 546, and an ID in order to generate this search result. A determination unit 547 is included. The database operation unit 540 operates access to the XML document storage unit 421 and the index storage unit 422 of the XML database 42. The functions of the remaining units 541 to 547 will be described later.

本実施形態では、XMLデータベース42のXML文書格納部421に格納されているXML文書を高速に検索する技術の1つとして、構造インデックス技術が用いられる。構造インデックス技術とは、XML文書をXMLデータベース42のXML文書格納部421に格納する際に、その文書の構造を示す情報(構造情報)を抽出後、抽出された構造をテンプレート(構造テンプレート)化し、その構造テンプレートとその構造情報のXMLデータベース42中の実際の位置を示すレコード(位置レコード)とを一意に割り振られたテンプレートIDと呼ばれるテンプレート識別情報により関連付けて索引化する技術である。   In the present embodiment, a structure index technique is used as one technique for quickly searching an XML document stored in the XML document storage unit 421 of the XML database 42. In the structure index technology, when an XML document is stored in the XML document storage unit 421 of the XML database 42, information (structure information) indicating the structure of the document is extracted, and the extracted structure is converted into a template (structure template). In this technique, the structure template and the record (position record) indicating the actual position of the structure information in the XML database 42 are associated with each other and indexed by template identification information called a template ID.

そのため本実施形態では、XML文書をXML文書格納部421に新たに格納する際に、構造インデックスが作成される。作成された構造インデックスは、構造インデックスファイル423に保存されて、索引格納部422に格納される。構造インデックスファイル423のデータ構造について、2つの具体例を挙げて順次説明する。   For this reason, in the present embodiment, a structure index is created when an XML document is newly stored in the XML document storage unit 421. The created structure index is stored in the structure index file 423 and stored in the index storage unit 422. The data structure of the structure index file 423 will be described sequentially with two specific examples.

図3は、XMLデータベース42のXML文書格納部421に、従来から知られている一般的な構造の2つのXML文書31及び32が格納されている場合における、当該XML文書31及び32の例を示す。XML文書31は、<部品>タグを含む要素(に対応する要素ノード)の内容(子ノード)として、それぞれ<部品番号>タグ、<部品名>タグ、<説明>タグ、<部品番号>タグ、<部品名>タグ及び<説明>タグを含む要素(に対応する要素ノード)を含む。XML文書32は、<在庫>タグを含む要素(に対応する要素ノード)の内容(子ノード)として、それぞれ<部品群>タグを含む2つの要素(に対応する要素ノード)を含む。<部品群>タグは、部品番号(@番号)の属性を含む。<部品群>タグを含む要素の内容は、<在庫数>タグを含む要素と<状況>タグを含む要素とを含む。   FIG. 3 shows an example of the XML documents 31 and 32 in the case where two XML documents 31 and 32 having a general structure conventionally known are stored in the XML document storage unit 421 of the XML database 42. Show. The XML document 31 includes <part number> tag, <part name> tag, <description> tag, and <part number> tag as contents (child nodes) of elements (element nodes corresponding to) including <part> tags. , <Component name> tag and element including <description> tag (corresponding element node). The XML document 32 includes two elements (element nodes corresponding to) each including a <part group> tag as contents (child nodes) of elements (element nodes corresponding to the elements) including <stock> tags. The <part group> tag includes an attribute of a part number (@ number). The content of the element including the <part group> tag includes an element including the <stock quantity> tag and an element including the <situation> tag.

図4は、図3に示すXML文書31及び32から作成された構造インデックスを保存する構造インデックスファイル423のデータ構造の一例を示す。構造インデックスファイル423は、構造インデックス管理部424を含む。構造インデックス管理部424は、構造テンプレート管理部424aと構造ポスティングエリア424bとから構成される。   FIG. 4 shows an example of the data structure of the structure index file 423 for storing the structure index created from the XML documents 31 and 32 shown in FIG. The structure index file 423 includes a structure index management unit 424. The structure index management unit 424 includes a structure template management unit 424a and a structure posting area 424b.

構造テンプレート管理部424aは、テンプレートIDと、当該IDが割り当てられたXML文書の構造の雛形を示す構造テンプレートとの対の集合(リスト)を格納する記憶部(構造テンプレート記憶部)である。本実施形態では、構造テンプレートには、構造を表す情報、例えば、ルートノードから目的のノードへのパスを表す情報が用いられる。例えば、構造テンプレート(パス)「/部品」は、rootノードの子ノードである部品ノードを示す。構造テンプレート(パス)「/部品」に含まれている「/」は、この例のようにパスの先頭に位置している場合、ルートノードを示す。   The structure template management unit 424a is a storage unit (structure template storage unit) that stores a set (list) of a pair of a template ID and a structure template indicating a template of the structure of the XML document to which the ID is assigned. In the present embodiment, information representing the structure, for example, information representing the path from the root node to the target node is used for the structure template. For example, the structure template (path) “/ part” indicates a part node that is a child node of the root node. “/” Included in the structure template (path) “/ part” indicates a root node when it is located at the head of the path as in this example.

一方、構造ポスティングエリア424bは、テンプレートIDと、当該IDが割り当てられた構造テンプレートと同一構造の情報(XML文書またはXML文書内の構造部分のデータ)のXMLデータベース42(のXML文書格納部421内)の位置を示す位置情報との対の集合(リスト)を格納する記憶部(構造テンプレート位置記憶部)である。ここで、位置情報はページ番号とページ内位置の情報とから構成される。   On the other hand, the structure posting area 424b has an XML database 42 (in the XML document storage unit 421) of the template ID and the information (data of the structure part in the XML document or XML document) having the same structure as the structure template to which the ID is assigned. ) Is a storage unit (structure template position storage unit) that stores a set (list) of pairs with position information indicating the position. Here, the position information includes a page number and information on the position within the page.

データベース15にXML文書を格納する単位はページと呼ばれる。図4の例では、第1及び第2ページに、それぞれ、図2のXML文書31及び32が格納されていることを示す。図4中の構造ポスティングエリア424bの例では、XML文書31及び32内の各構造テンプレートが格納されるページ内位置は、当該XML文書の先頭から順に割り当てられている。しかし、実際には、このような順序で割り当てられる必要はない。   A unit for storing an XML document in the database 15 is called a page. The example of FIG. 4 shows that the XML documents 31 and 32 of FIG. 2 are stored in the first and second pages, respectively. In the example of the structure posting area 424b in FIG. 4, the position in the page where the structure templates in the XML documents 31 and 32 are stored is assigned in order from the top of the XML document. In practice, however, it need not be assigned in this order.

構造テンプレート管理部424a及び構造ポスティングエリア424bを含む構造インデックス管理部424を利用することにより、実際のXML文書にアクセスすることなく、構造テンプレート管理部424aを走査するだけで、つまり構造テンプレート(構造インデックス)上の走査だけで、例えば“/部品/部品番号”のような構造(構造テンプレート)を指定する検索要求(問い合わせ要求)に従う検索処理を高速に行うことが可能となる。しかし、構造インデックス管理部424を利用するだけでは、即ち構造インデックスを利用するだけでは、「発明が解決しようとする課題」の欄でも述べたように、複数の構造化文書もしくは構造化文書内の構造部分を検索してその検索結果が組み合わされた新規構造化文書を作成する処理を効率的に行うことは難しい。   By using the structure index management unit 424 including the structure template management unit 424a and the structure posting area 424b, it is only necessary to scan the structure template management unit 424a without accessing the actual XML document. ) Only by the above scan, for example, it becomes possible to perform a search process in accordance with a search request (inquiry request) for designating a structure (structure template) such as “/ part / part number” at high speed. However, just using the structural index management unit 424, that is, using only the structural index, as described in the section “Problems to be solved by the invention”, a plurality of structured documents or structured documents It is difficult to efficiently perform a process of searching for a structure portion and creating a new structured document in which the search results are combined.

そこで本実施形態では、問い合わせ式が埋め込まれたXML文書が用いられる。図5は、図3のXML文書31に代えて用いられる、問い合わせ式が埋め込まれたXML文書33の一例を示す。XML文書33がXML文書31と最も異なる点は、<部品名>タグを含む要素(部品名要素ノード)と<説明>タグを含む要素(説明要素ノード)との間に、問い合わせ式(問い合わせ文)330が埋め込まれている点である。この問い合わせ式330は、当該問い合わせ式330の指定する条件を満たすXML文書またはXML文書内の構造部分のデータが設定されるべきXML文書33内の箇所に、予め埋め込まれている。前記したように、XML文書内の構造部分も、1つのXML文書である。したがって以下の説明では、XML文書またはXML文書内の構造部分を単にXML文書と表現する。   Therefore, in this embodiment, an XML document in which a query expression is embedded is used. FIG. 5 shows an example of an XML document 33 in which a query expression is embedded, which is used in place of the XML document 31 of FIG. The XML document 33 is most different from the XML document 31 in that a query expression (query text) is inserted between an element including a <part name> tag (part name element node) and an element including a <description> tag (description element node). ) 330 is embedded. This query expression 330 is embedded in advance in an XML document 33 that satisfies the conditions specified by the query expression 330 or a location in the XML document 33 in which data of a structure portion in the XML document is to be set. As described above, the structure part in the XML document is also one XML document. Therefore, in the following description, an XML document or a structural part in the XML document is simply expressed as an XML document.

問い合わせ式330、つまり<?xquery id=1 query=//在庫[部品群/@番号=123]/在庫数>は、「?xquery」でxquery処理を指示する。「//在庫」中の「在庫」に先行する「//」は任意位置を示し、「//在庫」は任意位置の<在庫>タグを含む要素(在庫要素、在庫ノード)を指定する。よって問い合わせ式330は、「query=//在庫[部品群/@番号=123」で、任意位置の<在庫>タグを含む要素(在庫ノード)の中から、「@番号(部品番号)」が「123」の部品の在庫数のタグ(<在庫数>タグ)を含む要素(在庫数ノード)を検索することを指定する検索式である。「id=1」については、後述する変形例で説明する。本実施形態では、問い合わせ式330に「id=1」の情報が必ずしも含まれている必要はない。   Query expression 330, that is, <? xquery id = 1 query = // inventory [part group / @ number = 123] / inventory number> indicates “? xquery” to indicate xquery processing. "//" preceding "Inventory" in "// Inventory" indicates an arbitrary position, and "// Inventory" designates an element (inventory element, inventory node) including an <Inventory> tag at an arbitrary position. Therefore, the inquiry formula 330 is “query = // inventory [parts group / @ number = 123”, and “@number (part number)” is selected from elements (inventory nodes) including <inventory> tags at arbitrary positions. This is a search expression that specifies that an element (a stock quantity node) including a tag of the stock quantity of the part “123” (<stock quantity> tag) is to be searched. “Id = 1” will be described in a later-described modification. In the present embodiment, the query expression 330 does not necessarily include “id = 1” information.

なお、問い合わせ式330中の英数記号は、実際には半角文字で記述される。しかし本明細書では、問い合わせ式330中の英数記号を便宜的に全角文字で表現している。   Note that the alphanumeric symbols in the query expression 330 are actually written in single-byte characters. However, in this specification, the alphanumeric symbols in the inquiry formula 330 are expressed by double-byte characters for convenience.

図6は、図3のXML文書31に代えて図5のXML文書33が用いられる場合の、XML文書31及び32から作成された構造インデックスを保存する構造インデックスファイル423に含まれている構造インデックス管理部424のデータ構造例を示す。なお図6では、構造インデックス管理部424内の構造ポスティングエリア424bは省略されている。   FIG. 6 shows the structure index included in the structure index file 423 that stores the structure index created from the XML documents 31 and 32 when the XML document 33 of FIG. 5 is used instead of the XML document 31 of FIG. The data structure example of the management part 424 is shown. In FIG. 6, the structure posting area 424b in the structure index management unit 424 is omitted.

図6に示す構造インデックス管理部424に含まれている構造テンプレート管理部424aが図4に示す構造テンプレート管理部424aと異なる点は、構造テンプレート「/部品/?xquery」が追加されていることである。ここでは構造テンプレート管理部424aに、テンプレートID=4と対応付けて構造テンプレート「/部品/?xquery」が追加(格納)されている。この場合、構造ポスティングエリア424bに、構造テンプレート「/部品/?xquery」に対応するテンプレートID及び(ページ番号、ページ内位置)として、テンプレートID=4及び(ページ番号、ページ内位置)=(1,4)が格納される。   The structure template management unit 424a included in the structure index management unit 424 shown in FIG. 6 is different from the structure template management unit 424a shown in FIG. 4 in that the structure template “/ part /? Xquery” is added. is there. Here, the structure template “/ part /? Xquery” is added (stored) in association with the template ID = 4 in the structure template management unit 424a. In this case, template ID = 4 and (page number, in-page position) = (1) as the template ID and (page number, in-page position) corresponding to the structure template “/ part /? Xquery” in the structure posting area 424b. , 4) are stored.

次に、本実施形態におけるXML文書検索処理について、問い合わせ式330が埋め込まれたXML文書の検索を例に、図7のフローチャートを参照して説明する。
まず、ユーザによるクライアント端末20の操作に従い、当該端末20から構造化文書検索システム50(データベースサーバ10)に対して、XML文書検索を指示する検索要求がネットワーク30を介して送られたものとする。このクライアント端末20からの検索要求は、構造化文書検索システム50に含まれているデータベース管理システム51の要求処理部52によって受け付けられる(ステップS1)。
Next, the XML document search processing in the present embodiment will be described with reference to the flowchart of FIG.
First, it is assumed that a search request for instructing XML document search is sent from the terminal 20 to the structured document search system 50 (database server 10) via the network 30 in accordance with the operation of the client terminal 20 by the user. . The search request from the client terminal 20 is accepted by the request processing unit 52 of the database management system 51 included in the structured document search system 50 (step S1).

要求処理部52は、クライアント端末20からの検索要求を受け付けると当該要求を解析して、当該要求を処理すべき機能部として検索処理部54を選択し、当該検索処理部54に当該検索要求を渡す(ステップS2)。この検索要求は問い合わせ式(例えばXQuery)を含む。   Upon receiving a search request from the client terminal 20, the request processing unit 52 analyzes the request, selects the search processing unit 54 as a functional unit that should process the request, and sends the search request to the search processing unit 54. Pass (step S2). This search request includes a query expression (for example, XQuery).

検索処理部54が要求処理部52から検索要求を受け取ると、当該検索処理部54の検索部541が起動される。すると検索部541は、要求処理部52から渡された検索要求(つまりクライアント端末20からの検索要求)に従う第1の検索処理を実行する(ステップS3)。この第1の検索処理では、上記検索要求に含まれている問い合わせ式(第1の問い合わせ式)に記述されている検索条件に一致する構造、例えばパス(XPath)「//部品」で指定される構造のXML文書(XML文書データ)を特定するための構造インデックスの集合を、構造インデックス管理部424から取得する処理が行われる。ここで、「//部品」は、先の「//在庫」の例から明らかなように、任意位置の<部品>タグを含む要素(部品要素、部品ノード)を指定する。   When the search processing unit 54 receives a search request from the request processing unit 52, the search unit 541 of the search processing unit 54 is activated. Then, the search unit 541 executes a first search process according to the search request passed from the request processing unit 52 (that is, the search request from the client terminal 20) (step S3). In the first search process, a structure that matches the search condition described in the query expression (first query expression) included in the search request, for example, a path (XPath) “/ part” is specified. A process of acquiring a set of structure indexes for specifying an XML document (XML document data) having a structure from the structure index management unit 424 is performed. Here, “// part” designates an element (part element, part node) including a <part> tag at an arbitrary position, as is clear from the previous example of “// stock”.

検索部541によって取得される構造インデックスは、検索条件で指定された構造を表す構造テンプレートと、当該テンプレートに固有のテンプレートIDと、その構造(構造情報)のXMLデータベース42中の実際の位置を示す位置レコード(ページ番号、ページ内位置)とを含む。ここでは、「/部品」を表す構造テンプレートを含む構造インデックスが少なくとも取得される。   The structure index acquired by the search unit 541 indicates a structure template representing the structure specified by the search condition, a template ID unique to the template, and an actual position of the structure (structure information) in the XML database 42. Position record (page number, position in the page). Here, at least a structure index including a structure template representing “/ part” is acquired.

検索部541は、第1の検索処理によって取得された構造インデックスの集合の中に未処理の構造インデックスがあるならば(ステップS4)、その未処理の構造インデックスを1つ取り出す(ステップS5)。検索部541は取り出された構造インデックスに含まれている位置レコード(ページ番号、ページ内位置)に基づいて、当該構造インデックスで指定されるXML文書を特定する(ステップS6)。つまり検索部541は、上記検索要求に含まれている問い合わせ式に記述されている検索条件に一致する構造のXML文書を特定(検索)する。すると検索処理部54の問い合わせ式判定部543が起動される。   If there is an unprocessed structure index in the set of structure indexes acquired by the first search process (step S4), the search unit 541 takes out one unprocessed structure index (step S5). Based on the position record (page number, in-page position) included in the extracted structure index, the search unit 541 specifies the XML document specified by the structure index (step S6). That is, the search unit 541 specifies (searches) an XML document having a structure that matches the search condition described in the query expression included in the search request. Then, the inquiry formula determination unit 543 of the search processing unit 54 is activated.

問い合わせ式判定部543は、特定(検索)されたXML文書(第1の検索結果)内に、図5に示す問い合わせ式330に相当する問い合わせ式が存在する(埋め込まれている)かを判定する(ステップS7)。特定されたXML文書内のどこに問い合わせ式が存在するかは、構造インデックス管理部424を参照することによって確認することができる。   The query formula determination unit 543 determines whether a query formula corresponding to the query formula 330 shown in FIG. 5 exists (embedded) in the specified (searched) XML document (first search result). (Step S7). It is possible to confirm where the query expression exists in the specified XML document by referring to the structure index management unit 424.

もし、問い合わせ式が存在するならば、検索処理部54の問い合わせ式実行部542が当該問い合わせ式(第2の問い合わせ式)に従う検索処理(第2の検索処理)を実行する(ステップS8)。検索処理部54の置換部544は、第2の検索処理で検索されたXML文書(XML文書もしくはXML文書内の構造部分)、つまり問い合わせ式の実行結果で、ステップS7で判定されたXML文書(第1の検索結果)中に埋め込まれている、当該検索処理を指定した問い合わせ式を置き換えて、その置き換え後のXML文書(第2の検索結果)を検索要求に対する検索結果とする(ステップS9)。   If there is a query expression, the query expression execution unit 542 of the search processing unit 54 executes a search process (second search process) according to the query expression (second query expression) (step S8). The replacement unit 544 of the search processing unit 54 is the XML document (the XML document or the structure portion in the XML document) searched in the second search process, that is, the XML document (determined in step S7), which is the execution result of the query expression. The query expression specifying the search processing embedded in the first search result) is replaced, and the replaced XML document (second search result) is used as the search result for the search request (step S9). .

この置換部544の問い合わせ式の置き換えにより、検索処理部54の検索部541は、クライアント端末20からの検索要求で指定された検索条件に合致するXML文書中の問い合わせ式が当該問い合わせ式に従って検索されたXML文書(XML文書もしくはXML文書内の構造部分)に置き換えられた新たなXML文書を、当該検索要求に対する検索結果として取得することができる。   By the replacement of the query expression of the replacement unit 544, the search unit 541 of the search processing unit 54 searches for the query expression in the XML document that matches the search condition specified in the search request from the client terminal 20 according to the query expression. The new XML document replaced with the XML document (the XML document or the structure portion in the XML document) can be acquired as a search result for the search request.

検索部541(検索処理部54)は、ステップS5で取り出された構造インデックスに基づく処理で検索要求に対する検索結果を取得すると(ステップS6〜S9)、ステップS4に戻る。   When the search unit 541 (search processing unit 54) acquires the search result for the search request by the process based on the structure index extracted in step S5 (steps S6 to S9), the process returns to step S4.

また検索部541(検索処理部54)は、特定されたXML文書内に問い合わせ式が存在しないならば(ステップS7)、当該XML文書を検索結果として取得して(ステップS10)、ステップS4に戻る。   If the query expression does not exist in the specified XML document (step S7), the search unit 541 (search processing unit 54) acquires the XML document as a search result (step S10), and returns to step S4. .

ステップS4において検索部541は、第1の検索処理によって取得された構造インデックスの集合の中に未処理の構造インデックスがあるかを判定する。もし、未処理の構造インデックスがあるならば、検索部541は未処理の構造インデックスを1つ取り出して(ステップS5)、再びステップS6を実行する。   In step S4, the search unit 541 determines whether there is an unprocessed structure index in the set of structure indexes acquired by the first search process. If there is an unprocessed structure index, the search unit 541 extracts one unprocessed structure index (step S5) and executes step S6 again.

これに対し、未処理の構造インデックスがないならば、要求処理部52が起動される。格納処理部53は、検索処理部54(検索部541)によって取得されている、クライアント端末20からの検索要求に対する検索結果を、当該クライアント端末20に返す(ステップS11)。   On the other hand, if there is no unprocessed structure index, the request processing unit 52 is activated. The storage processing unit 53 returns the search result for the search request from the client terminal 20 acquired by the search processing unit 54 (search unit 541) to the client terminal 20 (step S11).

次に、クライアント端末20からの検索要求に対する検索処理の具体例について、図8を参照して説明する。
まず、図8に示すように、XMLデータベース42のXML文書格納部421には、図5に示されるXML文書33と図3に示されるXML文書32とを含むXML文書群が格納されているものとする。XML文書33は<部品>タグを含み、当該<部品>タグを含む要素(部品ノード)は問い合わせ式330を含む。XML文書32は<在庫>タグを含み、当該<在庫>タグを含む要素(在庫ノード)は<部品群タグ>を含む。<部品群タグ>は部品番号(@番号)の属性(属性ノード)を含む。この属性の属性名は「番号(部品番号)」であり、値は「123」である。
Next, a specific example of search processing for a search request from the client terminal 20 will be described with reference to FIG.
First, as shown in FIG. 8, the XML document storage unit 421 of the XML database 42 stores an XML document group including the XML document 33 shown in FIG. 5 and the XML document 32 shown in FIG. And The XML document 33 includes a <part> tag, and an element (part node) including the <part> tag includes a query expression 330. The XML document 32 includes a <stock> tag, and an element (stock node) including the <stock> tag includes a <part group tag>. <Part group tag> includes an attribute (attribute node) of a part number (@ number). The attribute name of this attribute is “number (part number)” and the value is “123”.

XML文書33及び32がXMLデータベース42に格納されると、図6に示す構造インデックス管理部424が作成される。今、クライアント端末20からの検索要求によって「//部品」が指定された結果、当該「//部品」で指定される構造に一致するXML文書の構造インデックスが取得されたものとする。図8の例では、「//部品」で指定される構造に一致するXML文書は、<部品>タグを含むXML文書33である。このXML文書33は、「/部品」に一致する構造テンプレートを含む構造インデックスを構造インデックス管理部42から取得することにより、クライアント端末20からの検索要求の指定する検索条件に合致するXML文書として特定(検索)されるものとする。   When the XML documents 33 and 32 are stored in the XML database 42, the structure index management unit 424 shown in FIG. 6 is created. Assume that the structure index of the XML document that matches the structure specified by “// part” is acquired as a result of the designation of “// part” by the search request from the client terminal 20. In the example of FIG. 8, the XML document that matches the structure specified by “// part” is the XML document 33 including the <part> tag. The XML document 33 is specified as an XML document that matches the search condition specified by the search request from the client terminal 20 by acquiring the structure index including the structure template that matches “/ part” from the structure index management unit 42. (Search) shall be performed.

特定されたXML文書33には、問い合わせ式330が埋め込まれている。この場合、XML文書33がクライアント端末20からの検索要求に対する検索結果としてそのまま返されるのではなく、以下に述べるように当該XML文書33に埋め込まれている問い合わせ式330が実行される。ここで、XML文書33内のどこに問い合わせ式が格納されているかは、「/部品」の下位に/?queryを含む構造テンプレートを構造インデックス管理部424上で検索することにより確認できる。ここでは、「/部品/?query」の構造テンプレートを含む構造インデックス中の位置レコードから、問い合わせ式330の位置を確認できる。   A query expression 330 is embedded in the identified XML document 33. In this case, the XML document 33 is not returned as it is as a search result for the search request from the client terminal 20, but the query expression 330 embedded in the XML document 33 is executed as described below. Here, the query expression is stored in the XML document 33 under the “/ part” /? This can be confirmed by searching the structure index management unit 424 for a structure template including a query. Here, the position of the query expression 330 can be confirmed from the position record in the structure index including the structure template “/ part /? Query”.

問い合わせ式330の位置が確認されると、当該問い合わせ式330が実行される。ここでは、<在庫>タグを含む全ての要素(在庫ノード)の中から、「@番号(部品番号)」が「123」の部品の在庫数のタグ(<在庫数>タグ)を含む要素(在庫数ノード)が検索される。この問い合わせ式330の示す検索条件に合致する要素を含むXML文書は、図8の例ではXML文書32である。ここでは、XML文書32中の「@番号(部品番号)」が「123」の部品の在庫数ノードの情報、即ち<在庫数>100</在庫数>が、問い合わせ式330の実行結果として取得される。   When the position of the inquiry formula 330 is confirmed, the inquiry formula 330 is executed. Here, among all the elements (inventory nodes) including the <inventory> tag, the elements including the tag (<inventory number> tag) of the inventory number of the part whose “@ number (part number)” is “123” ( Stock node) is retrieved. The XML document including an element that matches the search condition indicated by the query expression 330 is the XML document 32 in the example of FIG. Here, the information of the inventory quantity node of the part whose “@ number (part number)” in the XML document 32 is “123”, that is, <stock quantity> 100 </ stock quantity> is acquired as the execution result of the query expression 330. Is done.

すると図8に示されるように、XML文書33中の問い合わせ式330が、問い合わせ式330の実行結果である「<在庫数>100</在庫数>」で置き換えられた新たなXML文書34が取得される。このXML文書34が、クライアント端末20からの検索要求に対する検索結果としてクライアント端末20に返される。   Then, as shown in FIG. 8, a new XML document 34 in which the query expression 330 in the XML document 33 is replaced with “<stock quantity> 100 </ stock quantity>” that is the execution result of the query expression 330 is acquired. Is done. This XML document 34 is returned to the client terminal 20 as a search result for the search request from the client terminal 20.

このように本実施形態においては、複数のXML文書(XML文書もしくはXML文書内の構造部分)、例えばXML文書及びXML文書内の構造部分を組み合わせて新しいXML文書を作成する必要があることが予測される場合、問い合わせ式が埋め込まれたXML文書がXMLデータベース42に予め格納される。すると、クライアント端末からの検索要求に応じて問い合わせ式が埋め込まれたXML文書が検索された場合、当該問い合わせ式が実行される。この問い合わせ式の実行によって取得されたXML文書(構造化文書内の構造部分)で、検索されたXML文書(第1の検索結果)中の当該問い合わせ式が置き換えられて、その問い合わせ式が置き換えられたXML文書(第2の検索結果)がクライアント端末からの検索要求に対する検索結果として取得される。   As described above, in this embodiment, it is predicted that it is necessary to create a new XML document by combining a plurality of XML documents (an XML document or a structure portion in the XML document), for example, an XML document and a structure portion in the XML document. If so, the XML document in which the query expression is embedded is stored in advance in the XML database 42. Then, when an XML document in which an inquiry formula is embedded is searched according to a search request from a client terminal, the inquiry formula is executed. The query expression in the retrieved XML document (first search result) is replaced with the XML document (structure part in the structured document) acquired by executing the query expression, and the query expression is replaced. The XML document (second search result) is acquired as a search result for the search request from the client terminal.

これにより本実施形態においては、複数のXML文書(XML文書もしくはXML文書内の構造部分)を組み合わせて新しいXML文書を作成する処理を、従来のように複雑な問い合わせ式を記述したり、クライアント端末側で毎回複雑な処理を行うことなく実行できる。また本実施形態においては、このような処理が、最終結果が得られるまで、全てXMLデータベース42上で実行できる。このため、クライアント端末側で毎回複雑な処理をする場合と比べて、クライアント端末と構造化文書検索システム50との間の通信量(トラフィック量)を抑えレスポンスタイムを短縮できる。   As a result, in the present embodiment, a process for creating a new XML document by combining a plurality of XML documents (XML document or a structure part in the XML document) is described as a complicated query expression as in the past, or a client terminal Can be executed without complicated processing each time. In the present embodiment, all such processing can be executed on the XML database 42 until the final result is obtained. For this reason, compared with the case where complicated processing is performed each time on the client terminal side, the communication amount (traffic amount) between the client terminal and the structured document search system 50 can be suppressed, and the response time can be shortened.

なお、本実施形態では、XML文書に埋め込まれる問い合わせ式が検索式である場合を前提としている。しかし、XML文書に埋め込まれる問い合わせ式が更新式であっても構わない。ここで、問い合わせ式に更新式を用いた場合の一例について簡単に説明する。まず、更新式により、当該更新式が埋め込まれているXML文書中の更新されるべき値(被更新データ)を含むノードと、更新データを含むXML文書中のノードとが指定されるものとする。更に具体的に述べるならば、更新式が埋め込まれているXML文書が在庫数ノードを含む部品ノードを含み、当該更新式によって、当該在庫数ノードの値を、「@番号(部品番号)」が「123」の部品の在庫ノードに含まれている在庫数ノードの値に更新することが指定されているものとする。この場合、更新式が埋め込まれているXML文書の在庫数ノードの値が、例えば図8に示されるXML文書32中の、「@番号(部品番号)」が「123」の部品の在庫数ノードの値「100」に更新される。   In the present embodiment, it is assumed that the query expression embedded in the XML document is a search expression. However, the query formula embedded in the XML document may be an update formula. Here, an example in which an update formula is used as an inquiry formula will be briefly described. First, it is assumed that a node including a value (updated data) to be updated in an XML document in which the update expression is embedded and a node in the XML document including update data are specified by the update expression. . More specifically, the XML document in which the update formula is embedded includes a part node including a stock quantity node, and the value of the stock quantity node is changed to “@ number (part number)” by the update formula. It is assumed that updating to the value of the inventory quantity node included in the inventory node of the part “123” is designated. In this case, the value of the inventory quantity node of the XML document in which the update formula is embedded is, for example, the inventory quantity node of the part whose “@ number (part number)” is “123” in the XML document 32 shown in FIG. Is updated to “100”.

[変形例]
上記実施形態では、第1の検索処理によって取得された構造インデックスの指定するXML文書に問い合わせ式が埋め込まれている場合には、当該問い合わせ式が必ず実行されて、その実行結果で当該問い合わせ式が置き換えられる。しかし、問い合わせ式が埋め込まれたXML文書であっても、当該問い合わせ式を実行せずに、当該問い合わせ式が埋め込まれる前のXML文書を検索結果として取得したい場合もある。
[Modification]
In the above embodiment, when an inquiry expression is embedded in the XML document designated by the structure index acquired by the first search process, the inquiry expression is always executed, and the inquiry expression is determined by the execution result. Replaced. However, even in the case of an XML document in which a query expression is embedded, there is a case where it is desired to acquire an XML document before the query expression is embedded as a search result without executing the query expression.

そこで、上記実施形態の変形例の特徴は、実行されるべき問い合わせ式を指定する付加情報(一種のXQueryのヒント情報)を検索要求中に含め、検索結果として取得される構造インデックスで指定されるXML文書のうち、当該付加情報で指定された問い合わせ式が埋め込まれているXML文書についてのみ、当該問い合わせ式が実行されるようにした点にある。   Therefore, the feature of the modified example of the above embodiment includes additional information (a kind of XQuery hint information) that specifies a query expression to be executed in the search request, and is specified by a structure index acquired as a search result. Among the XML documents, the query expression is executed only for the XML document in which the query expression specified by the additional information is embedded.

次に、上記実施形態の変形例におけるXML文書検索処理について、上記実施形態と同様に、問い合わせ式330が埋め込まれたXML文書の検索を例に、図9A及び図9Bのフローチャートを参照して説明する。なお、図9A及び図9Bにおいて、図7と同様の部分には同一符号を付してある。   Next, the XML document search processing in the modification of the above embodiment will be described with reference to the flowcharts of FIGS. 9A and 9B, taking the search of the XML document in which the query expression 330 is embedded as an example, as in the above embodiment. To do. 9A and 9B, the same parts as those in FIG. 7 are denoted by the same reference numerals.

まず、クライアント端末20からの検索要求が、構造化文書検索システム50に含まれているデータベース管理システム51の要求処理部52によって受け付けられたものとする(ステップS1)。この検索要求は、要求処理部52から検索処理部54に渡される(ステップS2)。この検索要求が、実行されるべき問い合わせ式を指定する情報(付加情報)が付加された問い合わせ式(第1の問い合わせ式)を含むものとする。本変形例では、XML文書に埋め込まれる問い合わせ式には、固有のID(問い合わせ式指定情報)が割り当てられている。そこで付加情報は、実行されるべき問い合わせ式を当該問い合わせ式のIDによって指定する。   First, it is assumed that a search request from the client terminal 20 is received by the request processing unit 52 of the database management system 51 included in the structured document search system 50 (step S1). This search request is transferred from the request processing unit 52 to the search processing unit 54 (step S2). It is assumed that this search request includes a query formula (first query formula) to which information (additional information) specifying a query formula to be executed is added. In this modification, a unique ID (inquiry expression designation information) is assigned to the inquiry expression embedded in the XML document. Therefore, the additional information specifies the query expression to be executed by the ID of the query expression.

検索処理部54のID取得部(問い合わせ式指定情報取得手段)546は、検索要求に付加情報が含まれている場合、当該付加情報から、実行されるべき問い合わせ式のID(問い合わせ式指定情報)の集合を取得する(ステップS2a)。すると検索処理部54の検索部541は検索要求(クライアント端末20からの検索要求)に従う第1の検索処理を実行して、当該検索要求に含まれている問い合わせ式(第1の問い合わせ式)に記述されている検索条件に一致する構造のXML文書(XML文書もしくはXML文書内の構造部分)を特定するための構造インデックスの集合を取得する(ステップS3)。   The ID acquisition unit (inquiry formula designation information acquisition means) 546 of the search processing unit 54, when additional information is included in the search request, the ID of the query formula to be executed (inquiry formula designation information) from the additional information. Is acquired (step S2a). Then, the search unit 541 of the search processing unit 54 executes a first search process according to the search request (search request from the client terminal 20), and the query expression (first query expression) included in the search request is executed. A set of structure indexes for specifying an XML document having a structure that matches the described search condition (an XML document or a structure portion in the XML document) is acquired (step S3).

検索部541は、取得された構造インデックスから未処理の構造インデックスを1つ取り出し(ステップS4,S5)、当該取り出された構造インデックスで指定されるXML文書を特定する(ステップS6)。検索処理部54のID判定部(問い合わせ式実行判定手段)547は、特定されたXML文書内に問い合わせ式が埋め込まれていると問い合わせ式判定部543によって判定されたならば(ステップS7)、当該問い合わせ式のIDが、ステップS2aで取得されたIDの集合に含まれているかを判定することにより、当該問い合わせ式が実行されるべきかを判定する(ステップS7a)。   The search unit 541 extracts one unprocessed structure index from the acquired structure index (steps S4 and S5), and specifies the XML document specified by the extracted structure index (step S6). The ID determination unit (query expression execution determination means) 547 of the search processing unit 54 determines that the query expression determination unit 543 determines that the query expression is embedded in the specified XML document (step S7). It is determined whether the query expression should be executed by determining whether the ID of the query expression is included in the set of IDs acquired in step S2a (step S7a).

もし、特定されたXML文書に埋め込まれている問い合わせ式のIDが、上記取得されたIDの集合に含まれているならば(ステップS7a)、検索処理部54の問い合わせ式実行部542は当該問い合わせ式を実行する(ステップS8)。検索処理部54の置換部544は、問い合わせ式の実行、つまり問い合わせ式に従う検索処理(第2の検索処理)の実行によって検索されたXML文書(XML文書もしくはXML文書内の構造部分)で、上記特定されたXML文書(第1の検索結果)中に埋め込まれている問い合わせ式を置き換えて、その置き換え後のXML文書(第2の検索結果)を検索要求に対する検索結果とする(ステップS9)。これにより検索部541(検索処理部54)は、問い合わせ式が第2の検索処理の実行によって検索されたXML文書(XML文書もしくはXML文書内の構造部分)で置き換えられたXML文書を、検索要求に対する検索結果として取得することができる。   If the ID of the query expression embedded in the specified XML document is included in the set of acquired IDs (step S7a), the query expression execution unit 542 of the search processing unit 54 performs the query. The expression is executed (step S8). The replacement unit 544 of the search processing unit 54 is an XML document (an XML document or a structure part in an XML document) searched by executing a query expression, that is, executing a search process (second search process) according to the query expression. The query expression embedded in the identified XML document (first search result) is replaced, and the replaced XML document (second search result) is used as the search result for the search request (step S9). As a result, the search unit 541 (search processing unit 54) searches the XML document in which the query expression is replaced with the XML document (the XML document or the structure portion in the XML document) searched by executing the second search process. As a search result for.

これに対し、特定されたXML文書に埋め込まれている問い合わせ式のIDが、上記取得されたIDの集合に含まれていないならば(ステップS7a)、問い合わせ式実行部542は当該問い合わせ式の実行が指定されていないものと判断して、当該問い合わせ式の実行を抑止する。この場合、検索処理部54の削除部545は、上記特定されたXML文書(第1の検索結果)に埋め込まれている問い合わせ式を削除して、その削除後のXML文書(第3の検索結果)を検索要求に対する検索結果とする(ステップS7b)。これにより検索部541(検索処理部54)は、問い合わせ式が削除されたXML文書を、検索要求に対する検索結果として取得することができる。   On the other hand, if the ID of the query expression embedded in the specified XML document is not included in the acquired ID set (step S7a), the query expression execution unit 542 executes the query expression. Is not specified, and execution of the query expression is suppressed. In this case, the deletion unit 545 of the search processing unit 54 deletes the query expression embedded in the specified XML document (first search result), and the deleted XML document (third search result). ) As a search result for the search request (step S7b). Accordingly, the search unit 541 (search processing unit 54) can acquire the XML document from which the query expression is deleted as a search result for the search request.

一方、特定されたXML文書内に問い合わせ式が埋め込まれていない場合(ステップS7)、上記実施形態と同様にステップS10が実行される。
検索部541(検索処理部54)は、ステップS7b,S9またはS10が実行されると、ステップS4に戻る。
On the other hand, when the query expression is not embedded in the specified XML document (step S7), step S10 is executed as in the above embodiment.
When step S7b, S9 or S10 is executed, the search unit 541 (search processing unit 54) returns to step S4.

次に、本変形例におけるクライアント端末20からの検索要求に対する検索処理の具体例について、図10を参照して説明する。
まず、図10に示すように、XMLデータベース42のXML文書格納部421には、図8と同様に、図5に示されるXML文書33と図3に示されるXML文書32とを含むXML文書群が格納されているものとする。XML文書33には問い合わせ式330が埋め込まれている。この問い合わせ式330は、当該問い合わせ式330のID(id)を含む。ここでは、問い合わせ式330のID(id)は1である。
Next, a specific example of search processing for a search request from the client terminal 20 in the present modification will be described with reference to FIG.
First, as shown in FIG. 10, in the XML document storage unit 421 of the XML database 42, an XML document group including the XML document 33 shown in FIG. 5 and the XML document 32 shown in FIG. Is stored. A query expression 330 is embedded in the XML document 33. This inquiry formula 330 includes the ID (id) of the inquiry formula 330. Here, the ID (id) of the query expression 330 is 1.

今、クライアント端末20から構造化文書検索システム50に対して、図10に示す検索要求100が与えられたものとする。この、検索要求100は、問い合わせ式101を含む。この問い合わせ式101は、{//部品}によりパス(XPath)「//部品」を指定する。問い合わせ式101には、付加情報102が付されている。付加情報102は、(#xquery id=1,2#)により、id(ID)=1の問い合わせ式及びid(ID)=2の問い合わせ式の実行を指定する。   Assume that the search request 100 shown in FIG. 10 is given from the client terminal 20 to the structured document search system 50. This search request 100 includes an inquiry formula 101. In this inquiry formula 101, a path (XPath) “// part” is designated by {// part}. Additional information 102 is attached to the inquiry formula 101. The additional information 102 designates execution of an inquiry expression with id (ID) = 1 and an inquiry expression with id (ID) = 2 by (#xquery id = 1, 2 #).

このような付加情報102が付加された問い合わせ式101「(#xquery id =1,2#){//部品}」は、「//部品」という問い合わせ式でヒットするXML文書に埋め込まれている問い合わせ式のうち、id(ID)が1または2の問い合わせ式だけ、その問い合わせ式を実行したい場合に用いられる。   The query expression 101 “(#xquery id = 1, 2 #) {// part}” to which the additional information 102 is added is embedded in the XML document hit by the query expression “// part”. This is used when it is desired to execute only the query expression with id (ID) 1 or 2 among the query expressions.

さて、付加情報102が付加された問い合わせ式101がクライアント端末20から構造化文書検索システム50に与えられた場合、検索処理部54(検索部541)は「//部品」で指定される構造に一致するXML文書、即ちクライアント端末20からの検索要求の指定する検索条件に合致するXML文書として、上記実施形態と同様にXML文書33を特定する。   When the query expression 101 to which the additional information 102 is added is given from the client terminal 20 to the structured document search system 50, the search processing unit 54 (search unit 541) has a structure designated by “// part”. The XML document 33 is specified as the matching XML document, that is, the XML document that matches the search condition specified by the search request from the client terminal 20 as in the above embodiment.

特定されたXML文書33には、問い合わせ式330が埋め込まれている。この問い合わせ式330のid(ID)は1であり、付加情報102で指定されたid(ID)の集合{1,2}に含まれている。この場合、検索処理部54(問い合わせ式実行部542)は問い合わせ式330を実行して、XML文書32中の「@番号(部品番号)」が「123」の部品の在庫数ノードの情報、即ち<在庫数>100</在庫数>を、当該問い合わせ式330の実行結果として取得する。   A query expression 330 is embedded in the identified XML document 33. The id (ID) of the query expression 330 is 1, and is included in the set {1, 2} of id (ID) specified by the additional information 102. In this case, the search processing unit 54 (query expression execution unit 542) executes the query expression 330, and information on the inventory quantity node of the part whose “@ number (part number)” in the XML document 32 is “123”, that is, <Stock quantity> 100 </ stock quantity> is acquired as an execution result of the inquiry formula 330.

検索処理部54(検索部541)は、図10において矢印103で示されるように、XML文書33中の問い合わせ式330が、当該問い合わせ式330の実行結果である「<在庫数>100</在庫数>」で置き換えられた新たなXML文書34を、クライアント端末20からの検索要求に対する検索結果として取得する。このXML文書34が、クライアント端末20からの検索要求に対する検索結果として当該クライアント端末20に返される。   As indicated by an arrow 103 in FIG. 10, the search processing unit 54 (search unit 541) indicates that the query expression 330 in the XML document 33 is an execution result of the query expression 330 “<stock quantity> 100 </ stock The new XML document 34 replaced with “number>” is acquired as a search result for the search request from the client terminal 20. The XML document 34 is returned to the client terminal 20 as a search result for the search request from the client terminal 20.

次に、クライアント端末20から構造化文書検索システム50に対して、図10に示す検索要求110が与えられたものとする。この、検索要求100は、問い合わせ式111を含む。この問い合わせ式111は、上記問い合わせ式101と同様に、{//部品}によりパス(XPath)「//部品」を指定する。問い合わせ式111には、付加情報112が付されている。付加情報112は、(#xquery id=0#)により、id(ID)=0の問い合わせ式の実行を指定する。   Next, it is assumed that the search request 110 shown in FIG. 10 is given from the client terminal 20 to the structured document search system 50. This search request 100 includes an inquiry formula 111. This inquiry formula 111 designates a path (XPath) “// part” by {// part} like the inquiry formula 101. Additional information 112 is attached to the inquiry formula 111. The additional information 112 specifies execution of a query expression with id (ID) = 0 by (#xquery id = 0 #).

付加情報112が付加された問い合わせ式111がクライアント端末20から構造化文書検索システム50に与えられた場合、検索処理部54(検索部541)は「//部品」で指定される構造に一致するXML文書して、付加情報102が付加された問い合わせ式101が与えられた場合と同様にXML文書33を特定する。   When the query expression 111 to which the additional information 112 is added is given from the client terminal 20 to the structured document search system 50, the search processing unit 54 (search unit 541) matches the structure specified by “// part”. The XML document 33 is specified in the same manner as when the query expression 101 to which the additional information 102 is added is given as an XML document.

特定されたXML文書33には、問い合わせ式330が埋め込まれている。この問い合わせ式330のid(ID)は1であり、付加情報112で指定されたid(ID)の集合{0}に含まれていない。この場合、検索処理部54は問い合わせ式330を実行せずに、図10において矢印113で示されるように、XML文書33中の問い合わせ式330が削除された新たなXML文書35を、クライアント端末20からの検索要求に対する検索結果として取得する。   A query expression 330 is embedded in the identified XML document 33. The id (ID) of the query expression 330 is 1, and is not included in the set {0} of id (ID) specified by the additional information 112. In this case, the search processing unit 54 does not execute the query expression 330, and the new XML document 35 from which the query expression 330 in the XML document 33 has been deleted, as indicated by the arrow 113 in FIG. As a search result for a search request from.

このように本変形例によれば、問い合わせ式が埋め込まれたXML文書を対象とした検索時に、実行されるべき問い合わせ式の指定を受け付けることにより、上記実施形態よりも効率的な検索を行うことができる。   As described above, according to the present modification, when a search is performed on an XML document in which a query expression is embedded, a search expression that is to be executed is accepted, thereby performing a more efficient search than the above embodiment. Can do.

なお、本発明は、上記実施形態またはその変形例そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。例えば、上記実施形態またはその変形例では、構造化文書としてXML文書を例にとって説明したが、これに限るものではない。本発明は、例えば、SGML(Standard Generalized Markup Language)文書のようなXML文書以外の構造化文書にも同様に適用できる。   In addition, this invention is not limited to the said embodiment or its modification example as it is, A component can be deform | transformed and embodied in the range which does not deviate from the summary in an implementation stage. For example, in the above-described embodiment or its modification, the XML document has been described as an example of the structured document, but the present invention is not limited to this. The present invention can be similarly applied to structured documents other than XML documents, such as SGML (Standard Generalized Markup Language) documents.

また、上記変形例では、実行されるべき問い合わせ式を指定する手段として、クライアント端末20からの検索要求に含まれている問い合わせ式101(111)にXQueryのヒント情報である付加情報102(112)を付加している。しかし、XQueryのヒント情報とは別のパラメータ等を用い、それを問い合わせ式101(111)とは独立にクライアント端末20から構造化文書検索システム50に渡すようにしても良い。   Further, in the above modification, as a means for designating a query expression to be executed, additional information 102 (112) which is hint information of XQuery is added to the query expression 101 (111) included in the search request from the client terminal 20. Is added. However, a parameter or the like different from the XQuery hint information may be used and passed from the client terminal 20 to the structured document search system 50 independently of the query expression 101 (111).

また、上記実施形態またはその変形例では、クライアント端末20がネットワーク30を介して構造化文書検索システム50のデータベースサーバ10に接続されている。しかし、クライアント端末20が直接に構造化文書検索システム50のデータベースサーバ10に接続されていても構わない。また、クライアント端末20上で動作するのと同様のアプリケーションがデータベースサーバ10上で動作する構成とすることにより、当該データベースサーバ10が有するキーボード、ディスプレイ等をクライアント端末20のように用いても、つまりデータベースサーバ10をクライアント端末に兼用しても構わない。   In the above embodiment or its modification, the client terminal 20 is connected to the database server 10 of the structured document search system 50 via the network 30. However, the client terminal 20 may be directly connected to the database server 10 of the structured document search system 50. Further, by adopting a configuration in which an application similar to that operating on the client terminal 20 operates on the database server 10, even if the keyboard, display, etc. of the database server 10 are used like the client terminal 20, that is, The database server 10 may also be used as a client terminal.

また、上記実施形態またはその変形例に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除しても良い。   In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment or the modification thereof. For example, you may delete some components from all the components shown by embodiment or its modification.

本発明の一実施形態に係る構造化文書検索システムを含むクライアント−サーバシステムのハードウェア構成を示すブロック図。1 is a block diagram showing a hardware configuration of a client-server system including a structured document search system according to an embodiment of the present invention. 図1に示される構造化文書検索システムの主として機能構成を示すブロック図。FIG. 2 is a block diagram mainly showing a functional configuration of the structured document search system shown in FIG. 1. 従来から知られている一般的な構造の2つのXML文書の例を示す図。The figure which shows the example of two XML documents of the general structure known conventionally. 図2に示される構造インデックスファイルの一例を示す図。The figure which shows an example of the structure index file shown by FIG. 問い合わせ式が埋め込まれたXML文書の一例を示す図。The figure which shows an example of the XML document with which the inquiry type | formula was embedded. 問い合わせ式が埋め込まれたXML文書を含む2つのXML文書から作成された構造インデックス管理部のデータ構造例を示すAn example of the data structure of the structure index management unit created from two XML documents including the XML document in which the query expression is embedded is shown. 同実施形態におけるXML文書検索処理の手順を示すフローチャート。6 is an exemplary flowchart showing the procedure of an XML document search process in the embodiment. 同実施形態における検索処理の具体例を説明するための図。The figure for demonstrating the specific example of the search process in the embodiment. 同実施形態の変形例におけるXML文書検索処理の手順を示すフローチャート。6 is an exemplary flowchart illustrating the procedure of an XML document search process according to a modification of the embodiment. 同実施形態の変形例におけるXML文書検索処理の手順を示すフローチャート。6 is an exemplary flowchart illustrating the procedure of an XML document search process according to a modification of the embodiment. 同実施形態の変形例における検索処理の具体例を説明するための図。The figure for demonstrating the specific example of the search process in the modification of the embodiment.

符号の説明Explanation of symbols

10…データベースサーバ、20…クライアント端末、30…ネットワーク、31〜35…XML文書、40…外部記憶装置、41…データベース管理プログラム、42…XMLデータベース、50…構造化文書検索システム、51…データベース管理システム、52…要求処理部、53…格納処理部、54…検索処理部、101,111,330…問い合わせ式、421…XML文書格納部、422…索引格納部、423…構造インデックスファイル、424…構造インデックス管理部、424a…構造テンプレート管理部、424b…構造ポスティングエリア、541…検索部、542…問い合わせ式実行部、543…問い合わせ式判定部、544…置換部、545…削除部、546…ID取得部(問い合わせ式指定情報取得手段)、547…ID判定部(問い合わせ式実行判定手段)。   DESCRIPTION OF SYMBOLS 10 ... Database server, 20 ... Client terminal, 30 ... Network, 31-35 ... XML document, 40 ... External storage device, 41 ... Database management program, 42 ... XML database, 50 ... Structured document search system, 51 ... Database management System 52... Request processing unit 53. Storage processing unit 54. Search processing unit 101, 111, 330 ... Query expression 421 ... XML document storage unit 422 ... Index storage unit 423 ... Structure index file 424 ... Structural index management unit, 424a ... structural template management unit, 424b ... structural posting area, 541 ... search unit, 542 ... query formula execution unit, 543 ... query formula determination unit, 544 ... substitution unit, 545 ... deletion unit, 546 ... ID Acquisition unit (inquiry type designation information acquisition means), 5 7 ... ID determination unit (query expression execution determination means).

Claims (2)

問い合わせ式が埋め込まれた構造化文書を含む複数の構造化文書を格納する構造化文書
データベースと、
クライアントから与えられる検索要求に従う第1の検索処理によって、前記構造化文書
データベースから当該検索要求の示す検索条件を満たす構造化文書を第1の検索結果とし
て取得する検索手段と、
前記第1の検索結果に問い合わせ式が埋め込まれているかを判定する問い合わせ式判定
手段と、
前記第1の検索結果に問い合わせ式が埋め込まれていると判定された場合、当該問い合
わせ式に従う第2の検索処理を実行する問い合わせ式実行手段と、
前記問い合わせ式実行手段による前記第2の検索処理の実行結果で、前記第1の検索結
果に埋め込まれている前記問い合わせ式を置き換えて、当該問い合わせ式が当該第2の検
索処理の実行結果で置き換えられた第2の検索結果を前記検索要求に対する検索結果とす
る置換手段と
前記クライアントから与えられる検索要求中に含まれている情報であって、実行される
べき問い合わせ式を指定する情報を取得する問い合わせ式指定情報取得手段と、
前記第1の検索結果に問い合わせ式が埋め込まれていると判定された場合、当該問い合
わせ式を指定する情報が前記問い合わせ式指定情報取得手段によって取得されているかに
応じて、当該問い合わせ式に従う前記第2の検索処理が実行されるべきかを判定する問い
合わせ式実行判定手段とを具備し、
前記問い合わせ式実行手段は、前記第2の検索処理が実行されるべきと判定された場合
に限り、当該第2の検索処理を実行する
ことを特徴とする構造化文書検索システム。
A structured document database for storing a plurality of structured documents including a structured document in which a query expression is embedded;
Search means for acquiring, as a first search result, a structured document that satisfies a search condition indicated by the search request from the structured document database by a first search process in accordance with a search request given by a client;
Query formula determination means for determining whether a query formula is embedded in the first search result;
When it is determined that a query formula is embedded in the first search result, query formula execution means for executing a second search process according to the query formula;
The query expression embedded in the first search result is replaced with the execution result of the second search process by the query expression executing means, and the query expression is replaced with the execution result of the second search process. Replacement means for using the second search result obtained as a search result for the search request ;
A information included in the search in the request given from the client, the query expression specified information acquiring means for acquiring information specifying a query expression to be executed,
When it is determined that the query expression is embedded in the first search result, the first information according to the query expression is determined depending on whether the information specifying the query expression is acquired by the query expression specifying information acquisition unit. ; and a query expression execution determining means for determining whether to second search processing is executed,
The structured document search system, wherein the query expression execution unit executes the second search process only when it is determined that the second search process should be executed.
複数の構造化文書を格納する構造化文書データベースを管理するデータベースサーバコ
ンピュータに、
クライアントから与えられる検索要求に従う第1の検索処理によって、前記構造化文書
データベースから当該検索要求の示す検索条件を満たす構造化文書を第1の検索結果とし
て取得するステップと、
前記第1の検索結果に問い合わせ式が埋め込まれているかを判定するステップと、
前記第1の検索結果に問い合わせ式が埋め込まれていると判定された場合、当該問い合
わせ式に従う第2の検索処理を実行するステップと、
前記第2の検索処理の実行結果で、前記第1の検索結果に埋め込まれている前記問い合
わせ式を置き換えて、当該問い合わせ式が当該第2の検索処理の実行結果で置き換えられ
た第2の検索結果を前記検索要求に対する検索結果とするステップと
前記クライアントから与えられる検索要求中に含まれている情報であって、実行されるべ
き問い合わせ式を指定する情報を取得するステップと、
前記第1の検索結果に問い合わせ式が埋め込まれていると判定された場合、当該問い合
わせ式を指定する情報が取得されているかに応じて、当該問い合わせ式に従う前記第2の
検索処理が実行されるべきかを判定するステップと、
前記第2の検索処理が実行されるべきと判定された場合に限り、当該第2の検索処理を
実行するステップと
を実行させるためのデータベース管理プログラム。
In a database server computer that manages a structured document database that stores a plurality of structured documents,
Obtaining a structured document satisfying a search condition indicated by the search request from the structured document database as a first search result by a first search process according to a search request given from a client;
Determining whether a query expression is embedded in the first search result;
If it is determined that a query expression is embedded in the first search result, executing a second search process according to the query expression;
A second search in which the query expression embedded in the first search result is replaced with the execution result of the second search process, and the query expression is replaced with the execution result of the second search process. A result as a search result for the search request ;
Information contained in the search request given by the client, which should be executed.
Obtaining information specifying a query expression;
If it is determined that a query expression is embedded in the first search result, the query
Depending on whether or not the information specifying the formula is acquired,
Determining whether a search process should be performed;
Only when it is determined that the second search process should be executed, the second search process is performed.
A database management program for executing the steps to be executed.
JP2006325035A 2006-11-30 2006-11-30 Structured document retrieval system and database management program Expired - Fee Related JP4568267B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006325035A JP4568267B2 (en) 2006-11-30 2006-11-30 Structured document retrieval system and database management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006325035A JP4568267B2 (en) 2006-11-30 2006-11-30 Structured document retrieval system and database management program

Publications (2)

Publication Number Publication Date
JP2008140081A JP2008140081A (en) 2008-06-19
JP4568267B2 true JP4568267B2 (en) 2010-10-27

Family

ID=39601476

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006325035A Expired - Fee Related JP4568267B2 (en) 2006-11-30 2006-11-30 Structured document retrieval system and database management program

Country Status (1)

Country Link
JP (1) JP4568267B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5296128B2 (en) * 2011-03-18 2013-09-25 株式会社東芝 Structured document management apparatus, method and program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11288412A (en) * 1998-04-02 1999-10-19 Hitachi Ltd Method and system for preparing document, and computer readable recording medium for recording document preparation program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11288412A (en) * 1998-04-02 1999-10-19 Hitachi Ltd Method and system for preparing document, and computer readable recording medium for recording document preparation program

Also Published As

Publication number Publication date
JP2008140081A (en) 2008-06-19

Similar Documents

Publication Publication Date Title
JP4189416B2 (en) Structured document management system and program
US7231386B2 (en) Apparatus, method, and program for retrieving structured documents
US7457812B2 (en) System and method for managing structured document
JP2003067402A (en) Structured document managing device and method therefor
JPH11242676A (en) Method for registering structured document, method for retrieving structured document, and portable medium used in these methods
US20060007464A1 (en) Structured data update and transformation system
US20060095456A1 (en) System and method for retrieving structured document
JP2005234837A (en) Structured document processing method, structured document processing system and its program
JP2005227851A (en) Method and device for structured data storage
US20110252313A1 (en) Document information selection method and computer program product
JP3786233B2 (en) Information search method and information search system
JP4568267B2 (en) Structured document retrieval system and database management program
JP2002215519A (en) Method and system for web page generation, web page generating program, and recording medium
JP4439497B2 (en) Search processing apparatus and program
JP2003281149A (en) Method of setting access right and system of structured document management
US8352481B2 (en) Server, data transfer method, and recording medium
JP3842572B2 (en) Structured document management method, structured document management apparatus and program
JP4289022B2 (en) Structured document processing method and apparatus, structured document processing program, and storage medium storing structured document processing program
JP4199916B2 (en) Document management method and apparatus
JP4393498B2 (en) Structured document management system and program
JP2008084128A (en) Device, method and program for designating element of structured document
JP2003288365A (en) Additive information management method and additive information management system
JP3923961B2 (en) XML variant search system and XML variant search method
JP4521413B2 (en) Database management system and program
JP3842574B2 (en) Information extraction method, structured document management apparatus and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090908

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091105

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100309

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100528

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20100617

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100713

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100806

R150 Certificate of patent or registration of utility model

Ref document number: 4568267

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130813

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees