JP4568267B2 - Structured document retrieval system and database management program - Google Patents
Structured document retrieval system and database management program Download PDFInfo
- 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
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,
また、データベースサーバ上で動作するデータベース管理システム(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
さて、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文書を作成する。
前記第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
データベースサーバ10は、ハードディスクドライブのような外部記憶装置40と接続されている。この外部記憶装置40は、データベース管理プログラム41及びXMLデータベース42を格納する。
The
データベース管理プログラム41は、データベースサーバ10によるXMLデータベース42の管理、及びクライアント端末からのXQuery等を用いた検索要求(問い合わせ)に基づく検索処理に用いられる。XMLデータベース42は構造化文書であるXML文書(XML文書データ)を格納する構造化文書データベースである。XMLデータベース42には、当該データベース42に格納されるXML文書に基づいて作成される索引等も格納される。
The
本実施形態では、データベースサーバ10及び外部記憶装置40(に格納されているXMLデータベース42)によって構造化文書検索システム50が実現される。
In the present embodiment, the structured
図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
XMLデータベース42には、XML文書格納部(構造化文書格納部)421及び索引格納部422が確保されている。XML文書格納部421は、複数のXML文書(XML文書データ)を格納するのに用いられる。索引格納部422は、XML文書格納部421に格納されているXML文書を検索するのに用いられるインデックス(索引)、例えば構造インデックスを保存する構造インデックスファイル423を格納するのに用いられる。
In the
要求処理部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
格納処理部53は、格納要求を解析し、当該要求で指定されたXML文書及び当該XML文書のインデックスを、XMLデータベース42のそれぞれXML文書格納部421及び索引格納部422に格納する。格納処理部53は、XMLデータベース42のXML文書格納部421及び索引格納部422へのアクセスを操作するデータベース操作部530を含む。
The
検索処理部54は、検索要求を解析し、当該検索要求で指定される検索条件(問い合わせ式)を満足する検索結果を生成する。検索処理部54は、この検索結果を生成するために、データベース操作部540、検索部541、問い合わせ式実行部542、問い合わせ式判定部543、置換部544、削除部545、ID取得部546及びID判定部547を含む。データベース操作部540は、XMLデータベース42のXML文書格納部421及び索引格納部422へのアクセスを操作する。残りの各部541〜547の機能については後述する。
The
本実施形態では、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
そのため本実施形態では、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
図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
図4は、図3に示すXML文書31及び32から作成された構造インデックスを保存する構造インデックスファイル423のデータ構造の一例を示す。構造インデックスファイル423は、構造インデックス管理部424を含む。構造インデックス管理部424は、構造テンプレート管理部424aと構造ポスティングエリア424bとから構成される。
FIG. 4 shows an example of the data structure of the
構造テンプレート管理部424aは、テンプレートIDと、当該IDが割り当てられたXML文書の構造の雛形を示す構造テンプレートとの対の集合(リスト)を格納する記憶部(構造テンプレート記憶部)である。本実施形態では、構造テンプレートには、構造を表す情報、例えば、ルートノードから目的のノードへのパスを表す情報が用いられる。例えば、構造テンプレート(パス)「/部品」は、rootノードの子ノードである部品ノードを示す。構造テンプレート(パス)「/部品」に含まれている「/」は、この例のようにパスの先頭に位置している場合、ルートノードを示す。
The structure
一方、構造ポスティングエリア424bは、テンプレートIDと、当該IDが割り当てられた構造テンプレートと同一構造の情報(XML文書またはXML文書内の構造部分のデータ)のXMLデータベース42(のXML文書格納部421内)の位置を示す位置情報との対の集合(リスト)を格納する記憶部(構造テンプレート位置記憶部)である。ここで、位置情報はページ番号とページ内位置の情報とから構成される。
On the other hand, the
データベース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
構造テンプレート管理部424a及び構造ポスティングエリア424bを含む構造インデックス管理部424を利用することにより、実際のXML文書にアクセスすることなく、構造テンプレート管理部424aを走査するだけで、つまり構造テンプレート(構造インデックス)上の走査だけで、例えば“/部品/部品番号”のような構造(構造テンプレート)を指定する検索要求(問い合わせ要求)に従う検索処理を高速に行うことが可能となる。しかし、構造インデックス管理部424を利用するだけでは、即ち構造インデックスを利用するだけでは、「発明が解決しようとする課題」の欄でも述べたように、複数の構造化文書もしくは構造化文書内の構造部分を検索してその検索結果が組み合わされた新規構造化文書を作成する処理を効率的に行うことは難しい。
By using the structure
そこで本実施形態では、問い合わせ式が埋め込まれた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
問い合わせ式330、つまり<?xquery id=1 query=//在庫[部品群/@番号=123]/在庫数>は、「?xquery」でxquery処理を指示する。「//在庫」中の「在庫」に先行する「//」は任意位置を示し、「//在庫」は任意位置の<在庫>タグを含む要素(在庫要素、在庫ノード)を指定する。よって問い合わせ式330は、「query=//在庫[部品群/@番号=123」で、任意位置の<在庫>タグを含む要素(在庫ノード)の中から、「@番号(部品番号)」が「123」の部品の在庫数のタグ(<在庫数>タグ)を含む要素(在庫数ノード)を検索することを指定する検索式である。「id=1」については、後述する変形例で説明する。本実施形態では、問い合わせ式330に「id=1」の情報が必ずしも含まれている必要はない。
なお、問い合わせ式330中の英数記号は、実際には半角文字で記述される。しかし本明細書では、問い合わせ式330中の英数記号を便宜的に全角文字で表現している。
Note that the alphanumeric symbols in the
図6は、図3のXML文書31に代えて図5のXML文書33が用いられる場合の、XML文書31及び32から作成された構造インデックスを保存する構造インデックスファイル423に含まれている構造インデックス管理部424のデータ構造例を示す。なお図6では、構造インデックス管理部424内の構造ポスティングエリア424bは省略されている。
FIG. 6 shows the structure index included in the
図6に示す構造インデックス管理部424に含まれている構造テンプレート管理部424aが図4に示す構造テンプレート管理部424aと異なる点は、構造テンプレート「/部品/?xquery」が追加されていることである。ここでは構造テンプレート管理部424aに、テンプレートID=4と対応付けて構造テンプレート「/部品/?xquery」が追加(格納)されている。この場合、構造ポスティングエリア424bに、構造テンプレート「/部品/?xquery」に対応するテンプレートID及び(ページ番号、ページ内位置)として、テンプレートID=4及び(ページ番号、ページ内位置)=(1,4)が格納される。
The structure
次に、本実施形態における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
要求処理部52は、クライアント端末20からの検索要求を受け付けると当該要求を解析して、当該要求を処理すべき機能部として検索処理部54を選択し、当該検索処理部54に当該検索要求を渡す(ステップS2)。この検索要求は問い合わせ式(例えばXQuery)を含む。
Upon receiving a search request from the
検索処理部54が要求処理部52から検索要求を受け取ると、当該検索処理部54の検索部541が起動される。すると検索部541は、要求処理部52から渡された検索要求(つまりクライアント端末20からの検索要求)に従う第1の検索処理を実行する(ステップS3)。この第1の検索処理では、上記検索要求に含まれている問い合わせ式(第1の問い合わせ式)に記述されている検索条件に一致する構造、例えばパス(XPath)「//部品」で指定される構造のXML文書(XML文書データ)を特定するための構造インデックスの集合を、構造インデックス管理部424から取得する処理が行われる。ここで、「//部品」は、先の「//在庫」の例から明らかなように、任意位置の<部品>タグを含む要素(部品要素、部品ノード)を指定する。
When the
検索部541によって取得される構造インデックスは、検索条件で指定された構造を表す構造テンプレートと、当該テンプレートに固有のテンプレートIDと、その構造(構造情報)のXMLデータベース42中の実際の位置を示す位置レコード(ページ番号、ページ内位置)とを含む。ここでは、「/部品」を表す構造テンプレートを含む構造インデックスが少なくとも取得される。
The structure index acquired by the
検索部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
問い合わせ式判定部543は、特定(検索)されたXML文書(第1の検索結果)内に、図5に示す問い合わせ式330に相当する問い合わせ式が存在する(埋め込まれている)かを判定する(ステップS7)。特定されたXML文書内のどこに問い合わせ式が存在するかは、構造インデックス管理部424を参照することによって確認することができる。
The query
もし、問い合わせ式が存在するならば、検索処理部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
この置換部544の問い合わせ式の置き換えにより、検索処理部54の検索部541は、クライアント端末20からの検索要求で指定された検索条件に合致するXML文書中の問い合わせ式が当該問い合わせ式に従って検索されたXML文書(XML文書もしくはXML文書内の構造部分)に置き換えられた新たなXML文書を、当該検索要求に対する検索結果として取得することができる。
By the replacement of the query expression of the
検索部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
これに対し、未処理の構造インデックスがないならば、要求処理部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
次に、クライアント端末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
First, as shown in FIG. 8, the XML
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文書33には、問い合わせ式330が埋め込まれている。この場合、XML文書33がクライアント端末20からの検索要求に対する検索結果としてそのまま返されるのではなく、以下に述べるように当該XML文書33に埋め込まれている問い合わせ式330が実行される。ここで、XML文書33内のどこに問い合わせ式が格納されているかは、「/部品」の下位に/?queryを含む構造テンプレートを構造インデックス管理部424上で検索することにより確認できる。ここでは、「/部品/?query」の構造テンプレートを含む構造インデックス中の位置レコードから、問い合わせ式330の位置を確認できる。
A
問い合わせ式330の位置が確認されると、当該問い合わせ式330が実行される。ここでは、<在庫>タグを含む全ての要素(在庫ノード)の中から、「@番号(部品番号)」が「123」の部品の在庫数のタグ(<在庫数>タグ)を含む要素(在庫数ノード)が検索される。この問い合わせ式330の示す検索条件に合致する要素を含むXML文書は、図8の例ではXML文書32である。ここでは、XML文書32中の「@番号(部品番号)」が「123」の部品の在庫数ノードの情報、即ち<在庫数>100</在庫数>が、問い合わせ式330の実行結果として取得される。
When the position of the
すると図8に示されるように、XML文書33中の問い合わせ式330が、問い合わせ式330の実行結果である「<在庫数>100</在庫数>」で置き換えられた新たなXML文書34が取得される。このXML文書34が、クライアント端末20からの検索要求に対する検索結果としてクライアント端末20に返される。
Then, as shown in FIG. 8, a
このように本実施形態においては、複数の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文書(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文書に埋め込まれる問い合わせ式が検索式である場合を前提としている。しかし、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
[変形例]
上記実施形態では、第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
まず、クライアント端末20からの検索要求が、構造化文書検索システム50に含まれているデータベース管理システム51の要求処理部52によって受け付けられたものとする(ステップS1)。この検索要求は、要求処理部52から検索処理部54に渡される(ステップS2)。この検索要求が、実行されるべき問い合わせ式を指定する情報(付加情報)が付加された問い合わせ式(第1の問い合わせ式)を含むものとする。本変形例では、XML文書に埋め込まれる問い合わせ式には、固有のID(問い合わせ式指定情報)が割り当てられている。そこで付加情報は、実行されるべき問い合わせ式を当該問い合わせ式のIDによって指定する。
First, it is assumed that a search request from the
検索処理部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
検索部541は、取得された構造インデックスから未処理の構造インデックスを1つ取り出し(ステップS4,S5)、当該取り出された構造インデックスで指定されるXML文書を特定する(ステップS6)。検索処理部54のID判定部(問い合わせ式実行判定手段)547は、特定されたXML文書内に問い合わせ式が埋め込まれていると問い合わせ式判定部543によって判定されたならば(ステップS7)、当該問い合わせ式のIDが、ステップS2aで取得されたIDの集合に含まれているかを判定することにより、当該問い合わせ式が実行されるべきかを判定する(ステップS7a)。
The
もし、特定された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
これに対し、特定された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
一方、特定された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
First, as shown in FIG. 10, in the XML
今、クライアント端末20から構造化文書検索システム50に対して、図10に示す検索要求100が与えられたものとする。この、検索要求100は、問い合わせ式101を含む。この問い合わせ式101は、{//部品}によりパス(XPath)「//部品」を指定する。問い合わせ式101には、付加情報102が付されている。付加情報102は、(#xquery id=1,2#)により、id(ID)=1の問い合わせ式及びid(ID)=2の問い合わせ式の実行を指定する。
Assume that the
このような付加情報102が付加された問い合わせ式101「(#xquery id =1,2#){//部品}」は、「//部品」という問い合わせ式でヒットするXML文書に埋め込まれている問い合わせ式のうち、id(ID)が1または2の問い合わせ式だけ、その問い合わせ式を実行したい場合に用いられる。
The
さて、付加情報102が付加された問い合わせ式101がクライアント端末20から構造化文書検索システム50に与えられた場合、検索処理部54(検索部541)は「//部品」で指定される構造に一致するXML文書、即ちクライアント端末20からの検索要求の指定する検索条件に合致するXML文書として、上記実施形態と同様にXML文書33を特定する。
When the
特定されたXML文書33には、問い合わせ式330が埋め込まれている。この問い合わせ式330のid(ID)は1であり、付加情報102で指定されたid(ID)の集合{1,2}に含まれている。この場合、検索処理部54(問い合わせ式実行部542)は問い合わせ式330を実行して、XML文書32中の「@番号(部品番号)」が「123」の部品の在庫数ノードの情報、即ち<在庫数>100</在庫数>を、当該問い合わせ式330の実行結果として取得する。
A
検索処理部54(検索部541)は、図10において矢印103で示されるように、XML文書33中の問い合わせ式330が、当該問い合わせ式330の実行結果である「<在庫数>100</在庫数>」で置き換えられた新たなXML文書34を、クライアント端末20からの検索要求に対する検索結果として取得する。このXML文書34が、クライアント端末20からの検索要求に対する検索結果として当該クライアント端末20に返される。
As indicated by an
次に、クライアント端末20から構造化文書検索システム50に対して、図10に示す検索要求110が与えられたものとする。この、検索要求100は、問い合わせ式111を含む。この問い合わせ式111は、上記問い合わせ式101と同様に、{//部品}によりパス(XPath)「//部品」を指定する。問い合わせ式111には、付加情報112が付されている。付加情報112は、(#xquery id=0#)により、id(ID)=0の問い合わせ式の実行を指定する。
Next, it is assumed that the
付加情報112が付加された問い合わせ式111がクライアント端末20から構造化文書検索システム50に与えられた場合、検索処理部54(検索部541)は「//部品」で指定される構造に一致するXML文書して、付加情報102が付加された問い合わせ式101が与えられた場合と同様にXML文書33を特定する。
When the
特定されたXML文書33には、問い合わせ式330が埋め込まれている。この問い合わせ式330のid(ID)は1であり、付加情報112で指定されたid(ID)の集合{0}に含まれていない。この場合、検索処理部54は問い合わせ式330を実行せずに、図10において矢印113で示されるように、XML文書33中の問い合わせ式330が削除された新たなXML文書35を、クライアント端末20からの検索要求に対する検索結果として取得する。
A
このように本変形例によれば、問い合わせ式が埋め込まれた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
また、上記実施形態またはその変形例では、クライアント端末20がネットワーク30を介して構造化文書検索システム50のデータベースサーバ10に接続されている。しかし、クライアント端末20が直接に構造化文書検索システム50のデータベースサーバ10に接続されていても構わない。また、クライアント端末20上で動作するのと同様のアプリケーションがデータベースサーバ10上で動作する構成とすることにより、当該データベースサーバ10が有するキーボード、ディスプレイ等をクライアント端末20のように用いても、つまりデータベースサーバ10をクライアント端末に兼用しても構わない。
In the above embodiment or its modification, the
また、上記実施形態またはその変形例に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除しても良い。 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.
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
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.
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)
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)
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 |
-
2006
- 2006-11-30 JP JP2006325035A patent/JP4568267B2/en not_active Expired - Fee Related
Patent Citations (1)
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 |