JP4521413B2 - Database management system and program - Google Patents
Database management system and program Download PDFInfo
- Publication number
- JP4521413B2 JP4521413B2 JP2007030890A JP2007030890A JP4521413B2 JP 4521413 B2 JP4521413 B2 JP 4521413B2 JP 2007030890 A JP2007030890 A JP 2007030890A JP 2007030890 A JP2007030890 A JP 2007030890A JP 4521413 B2 JP4521413 B2 JP 4521413B2
- Authority
- JP
- Japan
- Prior art keywords
- document
- structured document
- original
- database
- registered
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、文書(電子化文書)及び当該文書を検索するのに用いられる索引が格納されるデータベースを管理するデータベース管理システムに係り、特に当該データベースに登録されている文書の更新に伴って発生する文書再登録処理に好適なデータベース管理システム及びプログラムに関する。 The present invention relates to a database management system that manages a database that stores a document (an electronic document) and an index used to search for the document, and particularly occurs when a document registered in the database is updated. The present invention relates to a database management system and program suitable for document re-registration processing.
近年、例えばオフィスにおいては、当該オフィスで扱われる種々の文書(電子化文書)を情報検索の目的で検索が可能なデータベース(DB)に登録し管理するデータベース管理システム(DBMS)が構築されるようになってきている。このようなシステムでは、データベースに登録されている文書の内容が更新されると、更新された文書の当該データベースへの再登録が行われる。 In recent years, for example, in an office, a database management system (DBMS) for registering and managing various documents (digitized documents) handled in the office in a database (DB) that can be searched for the purpose of information search is constructed. It is becoming. In such a system, when the content of a document registered in the database is updated, the updated document is re-registered in the database.
オフィスで扱われる文書、例えばパーソナルコンピュータのワードプロセッシング・ソフトゥエアで作成した文書(オフィス文書)は、更新の単位が文書である。このため、データベースに登録されている文書の更新が発生した場合、データベースへの情報登録も文書単位の再登録となるのが一般的である。 Documents handled in the office, for example, documents created with word processing software of a personal computer (office documents), are updated in units of documents. For this reason, when a document registered in the database is updated, information registration in the database is generally re-registered in document units.
ところで、データベースに登録された文書の例えば全文検索を可能とするには、当該文書に含まれる単語を抽出して、その抽出された単語を索引としてデータベースに登録する必要がある(例えば、特許文献1及び2参照)。このため、データベースに登録されている文書の更新が発生した場合には、次のような一連の操作
(1)既登録文書の削除
(2)削除文書の索引削除
(3)再登録文書の全文検索のための索引として用いられる単語の抽出(再登録文書のスキャン)
(4)索引の作成
(5)文書の登録
が必要となる。
By the way, in order to enable, for example, full-text search of a document registered in the database, it is necessary to extract words included in the document and register the extracted words as an index in the database (for example, patent literature). 1 and 2). Therefore, when a document registered in the database is updated, the following series of operations (1) Delete the registered document (2) Delete the index of the deleted document (3) Full text of the re-registered document Extract words used as index for search (scan for re-registered documents)
(4) Index creation (5) Document registration is required.
また、文書の一部分の更新を行う場合、例えばXML文書のような構造化文書の特定の構造のみを指定して更新を行う場合、その部分のみの更新(部分更新)が発生する。部分更新が発生した場合、文書全体の再登録ではなく、変更箇所のみの再登録となる。このため、文書の部分更新が増えると、データベース内の登録文書は複数の領域に分断される。
上述のように、データベースに登録されている文書の更新に伴う当該データベースへの文書の再登録は文書単位に行われるのが一般的であり、その再登録のためには上記5つの操作が必要である。この再登録処理の中で最も時間を要する処理は、索引に関する処理(索引処理)であり、文書のサイズが大きいほど索引処理に時間がかかる。つまり、文書のサイズが大きいほど再登録処理に長時間を要する。 As described above, when a document registered in the database is updated, the re-registration of the document to the database is generally performed for each document, and the above five operations are necessary for the re-registration. It is. The most time-consuming process in the re-registration process is an index process (index process). The larger the document size, the longer the index process takes. That is, the larger the document size, the longer the re-registration process.
本発明は上記事情を考慮してなされたものでその目的は、更新後の文書のうち元の既登録文書に対して変更が発生した箇所のデータに絞ってデータベースへの登録を行うことにより、索引作成のコストを削減し、再登録処理に要する時間を短縮することができるデータベース管理システム及びプログラムを提供することにある。 The present invention has been made in consideration of the above circumstances, and its purpose is to perform registration in the database by narrowing down the data of locations where changes have occurred to the original registered document among the updated documents, An object of the present invention is to provide a database management system and program capable of reducing the cost of index creation and shortening the time required for re-registration processing.
本発明の1つの観点によれば、文書及び当該文書を検索するのに用いられる索引が格納されるデータベースを管理するデータベース管理システムが提供される。このシステムは、前記データベースに登録されるべき文書に対応する元の文書が前記データベースに既に登録されている場合、前記登録されるべき文書のうち前記元の文書に対して変更が発生した箇所のデータを差分データとして抽出する差分抽出手段と、前記変更が発生した箇所のみの索引を更新する索引更新手段と、前記差分抽出手段によって抽出された差分データのみを前記データベースに登録する差分登録手段と、前記元の文書に、前差分登録手段によって前記データベースに登録された差分データへのリンクを設定するリンク付け手段とを具備する。 According to one aspect of the present invention, there is provided a database management system for managing a database in which a document and an index used for searching the document are stored. In this system, when an original document corresponding to a document to be registered in the database has already been registered in the database, a part of the document to be registered where a change has occurred to the original document is recorded. Difference extraction means for extracting data as difference data, index update means for updating the index of only the portion where the change has occurred, difference registration means for registering only the difference data extracted by the difference extraction means in the database Linking means for setting a link to the difference data registered in the database by the previous difference registration means in the original document.
本発明によれば、更新後の文書のうち元の既登録文書に対して変更が発生した箇所のデータに絞ってデータベースに登録することにより、索引作成のコストを削減し、再登録処理に要する時間を短縮することができる。 According to the present invention, the cost of index creation is reduced by registering in the database only the data of the part where the change has occurred in the original registered document among the updated documents, and it is necessary for the re-registration process. Time can be shortened.
以下、本発明の実施の形態につき図面を参照して説明する。
図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 according to an embodiment of the present invention. The client-server system mainly includes a database server (database server computer) 10 and a plurality of client terminals. The plurality of client terminals include a
データベースサーバ10は、ハードディスクドライブのような外部記憶装置40と接続されている。この外部記憶装置40は、データベース管理プログラム41及びデータベース42を格納する。
The
データベース管理プログラム41は、データベースサーバ10によるデータベース42の管理、及びクライアント端末からの検索要求に基づく検索処理に用いられる。データベース42は検索の対象となる複数の文書を格納する文書部421と、当該文書部421に格納されている文書を検索するのに用いられる索引(索引データ)を格納する索引部422とを含む。
The
本実施形態では、データベースサーバ10によってデータベース管理システム50が実現される。図2はデータベース管理システム50の主として機能構成を示すブロック図である。データベース管理システム50は、検索部51、差分抽出部52、索引処理部53、登録部54及び文書検索部55を含む。
In the present embodiment, the
検索部51は、クライアント端末20からデータベース管理システム50(データベースサーバ10)に対して文書登録要求が与えられた場合に、要求された文書に対応する既登録文書をデータベース42(内の文書部421)から検索する。差分抽出部52は、既登録文書がデータベース42に存在する場合、つまり文書の再登録の場合、要求された文書と当該既登録文書とを比較して、差分(変更箇所)のデータ(差分データ)を抽出する。
When a document registration request is given from the
索引処理部53は、データベース42内の索引部422を対象とする索引作成・更新処理を行う。索引処理部53は、索引更新部531及び索引作成部532を含む。索引更新部531は、差分抽出部52によって抽出された差分データを対象とする索引の更新を行う。索引作成部532は、要求された文書に対応する既登録文書がデータベース42に存在しない場合、つまり新規文書の登録の場合、当該新規文書の索引をデータベース42の索引部422内に作成する。
The
登録部54は、要求された文書に関する登録処理を行う。登録部54は、差分登録部541、リンク付け部542、原文登録部543及び文書登録部544を含む。
差分登録部541は、上記抽出された差分データをデータベース42の文書部421に登録する。リンク付け部542は、文書部421に登録される差分データと当該文書部421に既に登録されている文書(元文書)とのリンク付けを行う。リンク付け部542はまた、文書の再登録時に、要求された文書が原文文書として原文登録部543によって文書部421に登録された場合、差分データとのリンク付けがなされた元文書に当該原文文書へのリンク付けを行う。
The
The
原文登録部543は、既登録文書(元文書)との差分データが抽出された文書(要求された文書)を原文文書として文書部421に登録する。文書登録部544は、新規文書を文書部421に登録する。
The original
文書検索部55は、クライアント端末20からデータベース管理システム50(データベースサーバ10)に対して文書検索要求が与えられた場合に、要求された検索条件に合致する文書をデータベース42内の索引部422を利用して検索する。なお、検索部51に文書検索部55の機能を持たせても良い。
When a document search request is given from the
本実施形態において、検索部51、差分抽出部52、索引処理部53、登録部54及び文書検索部55は、図1のデータベースサーバ10が外部記憶装置40に格納されているデータベース管理プログラム41を当該サーバ10内のメモリ(図示せず)に読み込んで実行することにより実現されるものとする。このプログラム41は、コンパクトディスク、或いはROMのような、コンピュータ読み取り可能な記憶媒体に予め格納して頒布可能である。また、このプログラム41が、ネットワーク30を介してデータベースサーバ10にダウンロードされても構わない。
In the present embodiment, the
次に、上記実施形態で適用される文書登録処理について、図3のフローチャートを参照して説明する。
まず、クライアント端末20からデータベース管理システム50(データベースサーバ10)に対して、ネットワーク30を介して文書登録が要求されたものとする。クライアント端末20からデータベース管理システム50に与えられる要求は、当該システム50内の図示せぬ要求管理部で受け付けられる。この例のように、文書登録要求の場合、当該要求は検索部51に渡される。
Next, the document registration process applied in the above embodiment will be described with reference to the flowchart of FIG.
First, it is assumed that document registration is requested from the
検索部51は、クライアント端末20からの文書登録要求を受け取ると、データベース42内の文書部421に登録されている文書を検索する(ステップS1)。一般に、文書部421に登録される文書にはファイル名のようなIDが付されており、要求された文書のIDに一致するIDの文書が検索される。検索部51は検索の結果に基づき、要求された文書と同一のIDの文書が既に文書部421に登録されているかを判定する(ステップS2)。
When receiving the document registration request from the
もし、要求された文書と同一のIDの文書が文書部421に登録されていないならば、検索部51は新規文書の登録が要求されたものとして、索引処理部53内の索引作成部532に制御を渡す。これを受けて索引作成部532は、要求された文書(登録対象文書)を形態素解析することにより、当該文書を検索するのに必要な索引(例えば単語索引)を作成してデータベース42の索引部422に登録する(ステップS3)。登録された索引は、当該索引の作成に用いられた単語(語彙)を含む登録対象文書へのリンクを(表すリンク情報を)含む。ここでは説明の簡略化のために、単語索引が作成されるものとしているが、全文検索に適したN−グラム索引が作成されるものであっても構わない。
If a document having the same ID as the requested document is not registered in the
ステップS3において索引作成部532は、上記要求された文書から上記登録された索引へのリンク(逆リンク)を、当該文書に埋め込む(設定する)。すると文書登録部544は、登録された索引への逆リンクが埋め込まれた上記要求された文書を文書部421に登録する(ステップS4)。
In step S3, the
この時点におけるデータベース42内の文書部421及び索引部422の状態例を図4に示す。図4の例では、文書部421には、「高速検索DB処理システム」という内容の文書400が登録されている。文書部421には文書400以外の文書も登録されているが、図4では省略されている。一方、索引部422には、単語「高速」「検索」「DB」「処理」「システム」を含む各単語に関する索引、即ち「高速」「検索」「DB」「処理」「システム」を含む単語(の文字列)毎に、その単語を含む文書を指す索引が登録されている。
An example of the state of the
単語「高速」「検索」「DB」「処理」「システム」に関する索引は、それぞれ、当該索引(図4においてハッチングが施された矩形枠)から当該索引で示される単語を含む文書400へのリンク(を表すリンク情報)401,402,403,404,405を持つ。図4では、リンク401,402,403,404,405は矢印で表されており、当該矢印の基端及び先端は、それぞれリンク元及びリンク先を示す。
Each of the indexes related to the words “high speed”, “search”, “DB”, “processing”, and “system” is a link from the index (a rectangular frame hatched in FIG. 4) to the
また図4では、リンク401,402,403,404,405(を表す矢印)の先端は文書400内の単語「高速」「検索」「DB」「処理」「システム」の位置を指している。このような表現は、リンク401,402,403,404,405が文書400内の単語「高速」「検索」「DB」「処理」「システム」に基づいて設定されたことの理解を容易にするために適用されたものである。リンク401,402,403,404,405は、対応する単語「高速」「検索」「DB」「処理」「システム」をキーワードとする検索処理で文書400を検索するためには、当該文書400を指し示だけで十分である。このようにリンク401,402,403,404,405は文書400を指し示すが、説明の都合で、当該文書400内の単語「高速」「検索」「DB」「処理」「システム」を指し示すと表現することもある。
In FIG. 4, the tips of
一方、文書400は、当該文書400から当該文書400に含まれる単語「高速」「検索」「DB」「処理」「システム」に関する索引への逆リンク411,412,413,414,415は矢印で表されている。この逆リンク411,412,413,414,415(を表す矢印)の基端は文書400内の単語「高速」「検索」「DB」「処理」「システム」の箇所に位置している。このような表現も、先のリンク401,402,403,404,405と同様に、文書400内の単語「高速」「検索」「DB」「処理」「システム」に基づいて設定されたことの理解を容易にするために適用されたものである。逆リンク411,412,413,414,415は、文書400から当該文書400内の単語「高速」「検索」「DB」「処理」「システム」に基づいて作成された索引(リンク401,402,403,404,405)を辿ることができるだけで十分である。
On the other hand, in the
なお、図4において、単語「高速」「DB」「処理」「システム」に関する索引のうち、ハッチングが施されていない矩形枠から当該索引で示される単語を含む文書(文書400以外の文書)へのリンク、及びその逆リンクは省略されている。 In FIG. 4, among the indexes related to the words “high speed”, “DB”, “processing”, and “system”, from a rectangular frame not hatched to a document (a document other than the document 400) including the word indicated by the index. This link and its reverse link are omitted.
次に、クライアント端末20からデータベース管理システム50(データベースサーバ10)に対して再び文書登録が要求されたものとする。このとき、データベース42内の文書部421及び索引部422は、図4に示す状態にあるものとする。また、クライアント端末20からの要求が、「高速検索DB処理システム」という内容の文書(つまり文書400)が文書単位で更新された、「高速検索XML処理システム」という内容の文書を対象とする登録要求であるものとする。
Next, it is assumed that document registration is requested again from the
データベース管理システム50の検索部51は、クライアント端末20からの文書登録要求を受け取ると、データベース42内の文書部421に登録されている文書を検索する(ステップS1)。検索部51は検索の結果に基づき、要求された文書と同一のIDの文書が既に文書部421に登録されているかを判定する(ステップS2)。
When receiving the document registration request from the
もし、要求された文書と同一のIDの文書が文書部421に登録されているならば、検索部51は既登録文書に対応する更新文書の登録(再登録)が要求されたものとして、差分抽出部52に制御を渡す。これを受けて差分抽出部52は、文書部421から既登録文書(つまり更新前の文書)を取り出す(ステップS5)。差分抽出部52は、クライアント端末20から要求された更新済み文書(再登録文書)と文書部421から取り出された既登録文書との差分のデータ(差分データ)を、例えば単語(語彙)単位で抽出する(ステップS6)。
If a document having the same ID as that of the requested document is registered in the
ここでは、「高速検索DB処理システム」という内容の文書(文書400)が「高速検索XML処理システム」という内容の文書に更新されている。つまり、「高速検索DB処理システム」のうちの「DB」が「XML」に変更されている。この場合、更新後の文書文書のうち、元の既登録文書(元文書)400に対して変更が発生した箇所(変更箇所)のデータ、つまり「XML」が、文書400中の「DB」に対応する差分データとして抽出される。
Here, the document (document 400) having the content “fast search database processing system” is updated to the document having the content “fast search XML processing system”. That is, “DB” in the “fast search DB processing system” is changed to “XML”. In this case, in the updated document document, data of a portion (changed portion) where the original registered document (original document) 400 has changed, that is, “XML” is stored in “DB” in the
索引処理部53内の索引更新部531は、抽出された差分データ「XML」に対応する文書400中の単語「DB」を指す索引(つまり文書400へのリンク403)を索引部422から削除する(ステップS7)。ステップS7において索引更新部531は、単語「DB」の索引への逆リンク413を当該文書400から削除すると共に、当該文書400中の単語「DB」に削除を表す特定情報(削除マーク)を付加する(ステップS7)。ステップS7において索引更新部531は更に、抽出された差分データ(変更後の単語)「XML」に関する索引(索引データ)を作成して索引部422に追加する。作成された索引は、差分データ(変更後の単語)「XML」に対応する変更箇所の単語(変更前の単語)「DB」を含む文書(元文書)400へのリンクを持つ。このように索引更新部531は、差分抽出部52によって差分データが抽出された変更箇所に関する索引データのみを更新する(ステップS7)。
The
索引更新部531はステップS7を実行すると、登録部54内の差分登録部541に制御を渡す。すると差分登録部541は、差分データ、つまり単語「XML」のみを、文書部421に登録する(ステップS8)。
When executing the step S7, the
リンク付け部542は、文書400(元の文書)中の削除マークが付された単語「DB」から差分登録部541によって登録された差分データ「XML」へのリンク(文書リンク)を当該文書400に設定する(ステップS9)。このステップS9においてリンク付け部542は、文書部421に登録された差分データ「XML」と文書リンクによってリンクされている文書400に、当該差分データ「XML」に関する索引データへの逆リンクを埋め込む。
The linking
このように本実施形態においては、文書単位で更新が行われた場合でも、文書部421に既に登録されている元の文書(既登録文書)と更新された文書(再登録対象文書)との差分が抽出されて、その差分のデータのみ文書部421に登録されると共に、その差分のデータが抽出された変更箇所についてのみ索引が作成・更新される。このため、更新された文書(再登録対象文書)全体を対象とする索引処理が必要であった従来技術に比べて変更箇所が限られ、索引処理に要する時間を短縮して高速な文書登録処理(再登録処理)を実現することができる。図4には、簡略化のために、極めて小さいサイズの文書400の例が示されているが、サイズが大きい文書の場合には、この効果は一層大きくなる。
As described above, in this embodiment, even when updating is performed in document units, the original document (registered document) already registered in the
図5に、図4に示す示す状態で、差分データ「XML」が登録された直後の文書部421及び索引部422の状態を示す。図5の例では、文書(元文書)400中の単語「DB」に記号×で示される削除マークが付されており、この単語「DB」から差分データ「XML」に文書リンク431が設定されている。また、単語「XML」を含む文書を指し示すための索引は、当該単語「XML」との間に文書リンク431が設定されている文書(元文書)400へのリンク406を含む。一方、文書(元文書)400には、単語「XML」に関する索引への逆リンク416が埋め込まれている。また、図4と比較することによって明らかなように、リンク403及び逆リンク413が削除されている。
FIG. 5 shows the state of the
その後、「高速検索XML処理システム」という内容の文書(つまり更新された文書400)が文書単位で更に更新された結果、クライアント端末20からデータベース管理システム50(データベースサーバ10)に対して、「高速検索XML管理システム」という内容の文書(更新文書)を対象とする登録要求が与えられたものとする。この場合、単語「管理」が、文書400中の「処理」に対する差分データとして抽出される(ステップS6)。これにより、「管理」のみ文書部421に登録されると共に、「管理」及び「処理」についてのみ、それぞれ索引の作成及び更新が行われる。
Thereafter, as a result of further updating the document having the content “high-speed search XML processing system” (that is, the updated document 400) in units of documents, the
図6に、図5に示す示す状態で、差分データ「管理」が登録された直後の文書部421及び索引部422の状態を示す。図6の例では、文書400中の単語「処理」に削除マーク“×”が付されており、この単語「処理」から差分データ「管理」に文書リンク432が設定されている。また、単語「管理」を含む文書を指し示すための索引は、単語「管理」との間に文書リンク432が設定されている文書400へのリンク407を含む。一方、文書400には、単語「管理」に関する索引への逆リンク417が埋め込まれている。
FIG. 6 shows the state of the
さて、図6に示されるように、文書400中の削除マークが付されている単語「DB」及び「処理」と単語(差分データ)「XML」及び「管理」との間に、それぞれ文書リンク431及び432が設定されている状態で、単語「高速」「検索」「XML」「管理」及び「システム」の少なくとも1つを含む文書の検索が要求されたものとする。この要求は、要求管理部によって文書検索部55に渡される。すると文書検索部55は、索引部422に登録されている索引に基づいて、単語「高速」「検索」「XML」「管理」及び「システム」の少なくとも1つを含む文書を文書部421から検索する。この検索により、文書400を含む文書群が検索される。
Now, as shown in FIG. 6, there are document links between the words “DB” and “processing” with deletion marks in the
ドキュメント管理システムのようなシステムにおける文書検索では、文書単位の取り出しが多い。したがって、例えば文書400が検索された場合には、次のような文字列取り出しを含む文書取り出し処理が行われる。
In document retrieval in a system such as a document management system, document units are often retrieved. Therefore, for example, when the
まず文書400中の文字列「高速検索」が取り出される。次に、文字列「高速検索」に後続し、削除マークが付されている単語「DB」から文書リンク431を辿ることにより、当該単語「DB」に対する更新後の単語「XML」が取り出される。続いて、単語「DB」に後続し、削除マークが付されている単語「処理」から文書リンク432を辿ることにより、当該単語「処理」に対する更新後の単語「管理」が取り出される。そして、単語「処理」に後続する単語「システム」が取り出される。つまり、更新された文書の内容「高速検索XML管理システム」が取り出される。また、上述の文書取り出し処理では、文書400に設定されている索引への逆リンクを取り除く処理が行われる。
First, the character string “fast search” in the
図6から明らかなように、差分データの登録が繰り返されると、文書(元文書)400から差分データへの文書リンクが増える。ところが、差分データへの文書リンクの数が多い文書の取り出しが行われる文書検索処理では、文書取り出し時に当該文書リンクに基づく差分データ取り出しのためのコストがかかる。 As is apparent from FIG. 6, when the registration of the difference data is repeated, the document links from the document (original document) 400 to the difference data increase. However, in a document search process in which a document having a large number of document links to difference data is extracted, there is a cost for extracting the difference data based on the document link when the document is extracted.
そこで本実施形態では、差分データの登録が繰り返されても、更新された文書の内容を簡単に取り出すことができる仕組みを適用している。以下、この仕組みについて、先に挙げた図3のフローチャートを参照して説明する。 Therefore, in the present embodiment, a mechanism is employed in which the contents of the updated document can be easily extracted even if the registration of difference data is repeated. Hereinafter, this mechanism will be described with reference to the above-described flowchart of FIG.
リンク付け部542は、上記ステップS9を実行すると原文登録部543を起動する。原文登録部543は、クライアント端末20から要求された文書自体を原文文書としてデータベース42の文書部421に登録する(ステップS10)。するとリンク付け部542は、差分データとのリンク付けがなされた元文書から当該原文文書へのリンク(原文文書リンク)を、当該元文書に設定する(ステップS11)。これにより、図3のフローチャートに従う文書登録処理は終了する。
When executing step S9, the linking
図7は、図6に示す状態で、原文文書の登録と元文書から当該原文文書へのリンクの設定とが実行された直後の文書部421の状態を示す。図7の例では、「高速検索XML管理システム」という内容の文書を対象とする登録要求が与えられて、図3のフローチャートに従う文書登録処理がステップS11まで実行された結果、当該文書が原文文書430として文書部421に登録されている。また、元文書400には、原文文書430(つまり元文書400に対応する更新後の文書)へのリンク(原文文書リンク)440が設定されている。本実施形態では、文書(元文書)400が検索された場合、上記リンク440に基づき、以下に述べるように、原文文書430の内容を高速で取り出すことができる。
FIG. 7 shows the state of the
今、単語「高速」「検索」「XML」「管理」及び「システム」の少なくとも1つを含む文書の検索が要求された結果、文書(元文書)400を含む文書群が登録部54によって検索されたものとする。ここで、文書(元文書)400が検索された場合、文書検索部55は、当該文書(元文書)400に設定されているリンク440に基づき、原文文書430の内容を取り出す。
Now, as a result of a request for searching for a document including at least one of the words “high speed”, “search”, “XML”, “management”, and “system”, the
このように本実施形態によれば、検索された文書(元文書)から差分データへのリンクを辿ることなく、差分データが反映されている文書の内容、つまり原文文書の内容を高速で取り出すことができる。しかも、原文文書には、元文書と異なって索引への逆リンクが設定されていないため、原文文書の内容を取り出す際に逆リンクを取り除く必要がなく、一層高速な文書取り出しが可能となる。 As described above, according to the present embodiment, the contents of the document reflecting the difference data, that is, the contents of the original document document can be extracted at high speed without following the link from the retrieved document (original document) to the difference data. Can do. In addition, unlike the original document, the reverse link to the index is not set in the original document document, so that it is not necessary to remove the reverse link when extracting the contents of the original document document, and the document can be extracted at a higher speed.
ここで、更新(再登録)が頻繁に発生する文書の場合、再登録が要求される都度、更新された文書が原文文書として文書部421に登録されることから、当該文書部421のための記憶領域は大容量を必要とする。そこで、原文文書を圧縮して文書部421に登録すると良い。
Here, in the case of a document that is frequently updated (re-registered), the updated document is registered in the
[変形例]
次に、上記実施形態の変形例について説明する。
上記実施形態で適用される文書登録処理は、文書の更新が文書単位で行われる場合を前提としている。しかし、文書の部分更新が行われる場合にも、上記実施形態と同様の登録処理が適用できる。
[Modification]
Next, a modification of the above embodiment will be described.
The document registration process applied in the above embodiment is premised on the case where the document is updated in units of documents. However, the registration process similar to that in the above embodiment can also be applied when partial updating of a document is performed.
文書の部分更新の場合、差分抽出部52は、部分更新箇所の更新データをそのまま差分データとする。このため本変形例において、差分抽出部52による差分抽出に要する時間は、上記実施形態に比べて短縮される。但し、文書の部分更新の場合、文書単位の更新と異なって、原文文書として文書部421に登録可能な再登録文書(更新文書)は存在しないため、原文登録部543は次のような処理を行う必要がある。
In the case of partial update of the document, the
原文登録部543は、文書の部分更新の場合、部分更新が発生した文書(元文書)と原文文書リンクによってリンク付けされている原文文書を文書部421から取り出す。原文登録部543は、文書部421から取り出された原文文書に部分更新の内容(更新部分)を反映する更新処理(部分更新処理)を行う。なお、既登録の文書に対する最初の部分更新の場合には、元文書とリンク付けされている原文文書は存在しない。このような場合、原文登録部543は元文書を文書部421から取り出して、その取り出された元文書に更新部分を反映する。
In the case of a partial update of a document, the original
原文登録部543は、更新部分が反映された文書(原文文書または元文書)を新たな原文文書として文書部421に登録する。元文書が検索された場合、この新たな原文文書が文書取り出しの対象となる。
The original
このように上記実施形態の変形例においては、部分更新の場合でも、既登録の原文文書または元文書を用いて当該部分更新の内容(更新部分)が反映された文書を取得して、その更新部分が反映された文書を原文文書として文書部421に登録することにより、既登録の文書が部分更新によって分断されるを防止することができる。文書取り出し時には、この更新部分が反映された原文文書を取り出すことで、当該文書取り出しの高速化を図ることができる。
As described above, in the modification of the above embodiment, even in the case of partial update, a document that reflects the content (updated part) of the partial update is acquired using the registered original document or original document, and the update is performed. By registering the document in which the part is reflected in the
また、上記実施形態では、差分(変更箇所)の検出が単語(語彙)単位で行われる。しかし、タグを用いて階層的な構造が記述される、XML(Extensible Markup Language)文書のような構造を持つ文書(つまり構造化文書)の場合には、単語単位で差分が検出されると、変更箇所が多数になり、文書のリンク処理が複雑となる。そこで、構造化文書における更新(変更)の単位がタグを用いて記述される要素の単位となる場合が多いことを考慮して、当該構造化文書を対象とする登録処理では、要素の単位に差分が検出される構成を適用すると良い。 Moreover, in the said embodiment, the detection of a difference (change location) is performed per word (vocabulary). However, in the case of a document having a structure such as an XML (Extensible Markup Language) document in which a hierarchical structure is described using tags (that is, a structured document), if a difference is detected in units of words, There are many changes, and the document linking process becomes complicated. Therefore, in consideration of the fact that the unit of update (change) in a structured document is often the unit of an element described using a tag, in the registration process for the structured document, the unit of the element is used. A configuration in which a difference is detected may be applied.
図8は、構造化文書の代表であるXML文書の一例を示す。図8に示すXML文書は、要素(名称要素)81を含む。名称要素81は、<名称>タグと当該要素81の内容(値)である文字列(テキスト)「高速検索DB処理システム」含む。もし、図8に示すXML文書が更新された結果、名称要素81に含まれている文字列「高速検索DB処理システム」中の「DB」が「XML」に変更されたXML文書の登録が要求された場合、差分抽出部52は、名称要素81を差分(変更箇所)として抽出すれば良い。
FIG. 8 shows an example of an XML document that is a representative of a structured document. The XML document shown in FIG. 8 includes an element (name element) 81. The name element 81 includes a <name> tag and a character string (text) that is the content (value) of the element 81 “fast search DB processing system”. If the XML document shown in FIG. 8 is updated, registration of the XML document in which “DB” in the character string “Fast Search DB Processing System” included in the name element 81 is changed to “XML” is requested. When it is done, the
なお、本発明は、上記実施形態またはその変形例そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態またはその変形例に開示されている複数の構成要素の適宜な組み合わせにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除してもよい。 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. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment or its modification. For example, you may delete a some component from all the components shown by embodiment or its modification.
10…データベースサーバ、20…クライアント端末、30…ネットワーク、40…外部記憶装置、41…データベース管理プログラム、42…データベース、50…データベース管理システム、51…検索部、52…差分抽出部、53…索引処理部、54…登録部、55…文書検索部、531…索引更新部、532…索引作成部、541…差分登録部、542…リンク付け部、543…原文登録部、544…文書登録部。
DESCRIPTION OF
Claims (4)
前記データベースに登録されるべき構造化文書であって、変更が発生した箇所を含む登録されるべき構造化文書に対応する元の構造化文書が前記データベースに既に登録されている場合、前記登録されるべき構造化文書のうち前記元の構造化文書に対して変更が発生した箇所が存在する要素を差分データとして抽出する差分抽出手段と、
前記変更が発生した箇所が存在する要素のみの索引を更新する索引更新手段と、
前記差分抽出手段によって抽出された差分データのみを前記データベースに登録する差分登録手段と、
前記登録されるべき構造化文書を原文構造化文書として前記データベースに登録する原文登録手段と、
前記データベースに登録された差分データへのリンクと当該差分データに関する索引への逆リンクとを、当該差分データの前記データベースへの登録に応じて前記元の構造化文書に設定するリンク付け手段であって、前記元の構造化文書が検索された場合に当該元の構造化文書に対応する原文構造化文書にアクセスするのに用いられる当該原文構造化文書へのリンクを、当該原文構造化文書の前記データベースへの登録に応じて当該元の構造化文書に設定するリンク付け手段とを具備し、
前記差分抽出手段は、前記データベースに登録されている前記元の構造化文書または前記元の構造化文書とリンクされている原文構造化文書に対する部分更新が発生した場合、当該部分更新が発生した箇所を含む要素の更新データをそのまま前記差分データとして用い、
前記原文登録手段は、前記部分更新が発生した、前記元の構造化文書または前記原文構造化文書を取り出して、当該元の構造化文書または当該原文構造化文書に前記部分更新の内容を反映して、その部分更新の内容が反映された新たな原文構造化文書を前記データベースに登録する
ことを特徴とするデータベース管理システム。 In a database management system for managing a structured document in which a hierarchical structure is described using tags and a database in which an index used to search the structured document is stored,
If a structured document to be registered in the database and an original structured document corresponding to the structured document to be registered including the part where the change has occurred is already registered in the database, the registered document A difference extraction unit that extracts, as difference data, an element in which a change has occurred in the original structured document among the structured documents to be processed;
Index update means for updating only the index of the element where the change has occurred;
Difference registration means for registering only the difference data extracted by the difference extraction means in the database;
Source text registration means for registering the structured document to be registered in the database as a source text structured document;
The reverse link to the previous SL links and index on the difference data to the difference data registered in the database, with linking means for setting the original structured document in accordance with the registration in the database of the difference data there are, a link to the original structured document used to access the original structured document corresponding to the structured document of those said original when said original structured document is retrieved, the original structured Linking means for setting the original structured document according to the registration of the document in the database ,
When the partial extraction of the original structured document registered in the database or the original structured document linked to the original structured document occurs, the difference extraction unit Using the update data of the element including
The original text registration means takes out the original structured document or the original text structured document in which the partial update has occurred, and reflects the content of the partial update in the original structured document or the original text structured document. And register a new source text structured document reflecting the contents of the partial update in the database.
Database management system which is characterized a call.
前記データベースに登録されるべき構造化文書であって、変更が発生した箇所を含む登録されるべき構造化文書に対応する元の構造化文書が前記データベースに既に登録されている場合、前記登録されるべき構造化文書のうち前記元の構造化文書に対して変更が発生した箇所が存在する要素を差分データとして抽出するステップと、
前記変更が発生した箇所が存在する要素のみの索引を更新するステップと、
前記抽出された差分データのみを前記データベースに登録するステップと、
前記登録されるべき構造化文書を原文構造化文書として前記データベースに登録するステップと、
前記データベースに登録された差分データへのリンクと当該差分データに関する索引への逆リンクとを、当該差分データの前記データベースへの登録に応じて前記元の構造化文書に設定するステップと、
前記元の構造化文書が検索された場合に当該元の構造化文書に対応する前記データベースに登録された前記原文構造化文書にアクセスするのに用いられる当該原文構造化文書へのリンクを、当該原文構造化文書の前記データベースへの登録に応じて当該元の構造化文書に設定するステップと、
前記データベースに登録されている前記元の構造化文書または前記元の構造化文書とリンクされている原文構造化文書に対する部分更新が発生した場合、当該部分更新が発生した箇所を含む要素の更新データをそのまま前記差分データとして用いるステップと、
前記部分更新が発生した、前記元の構造化文書または前記原文構造化文書を取り出して、当該元の構造化文書または当該原文構造化文書に前記部分更新の内容を反映して、その部分更新の内容が反映された新たな原文構造化文書を前記データベースに登録するステップと
を実行させるためのプログラム。 A database server computer that manages a database storing a structured document in which a hierarchical structure is described using tags and an index used to search the structured document;
If a structured document to be registered in the database and an original structured document corresponding to the structured document to be registered including the part where the change has occurred is already registered in the database, the registered document A step of extracting, as difference data, an element in which a portion where a change has occurred with respect to the original structured document among the structured documents to be performed;
Updating the index of only the element where the location where the change occurred,
Registering only the extracted difference data in the database;
Registering the structured document to be registered in the database as a source text structured document;
Setting a reverse link to a link and the index on the difference data to the difference data registered in the database, the original structured document in accordance with the registration in the database of the difference data,
A link to the original structured document used to access the original structured document said registered in the database corresponding to the original structured document when the structured document before Kimoto is retrieved, Setting the original structured document in the original structured document in response to registration in the database ;
When a partial update occurs to the original structured document registered in the database or a source text structured document linked to the original structured document, update data of an element including a portion where the partial update occurs Directly using the difference data as the difference data;
The original structured document or the original text structured document in which the partial update has occurred is taken out, and the contents of the partial update are reflected in the original structured document or the original text structured document. A program for executing a step of registering a new original text structured document reflecting the contents in the database .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007030890A JP4521413B2 (en) | 2007-02-09 | 2007-02-09 | Database management system and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007030890A JP4521413B2 (en) | 2007-02-09 | 2007-02-09 | Database management system and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008197815A JP2008197815A (en) | 2008-08-28 |
JP4521413B2 true JP4521413B2 (en) | 2010-08-11 |
Family
ID=39756713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007030890A Expired - Fee Related JP4521413B2 (en) | 2007-02-09 | 2007-02-09 | Database management system and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4521413B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4688111B2 (en) | 2008-11-28 | 2011-05-25 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Information processing apparatus, database system, information processing method, and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0397067A (en) * | 1989-09-09 | 1991-04-23 | Sanyo Electric Co Ltd | Information filing device |
JPH03278247A (en) * | 1990-03-28 | 1991-12-09 | Fuji Xerox Co Ltd | Hyper medium system |
JPH06250895A (en) * | 1993-02-26 | 1994-09-09 | Fujitsu Ltd | Structured data base system |
-
2007
- 2007-02-09 JP JP2007030890A patent/JP4521413B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0397067A (en) * | 1989-09-09 | 1991-04-23 | Sanyo Electric Co Ltd | Information filing device |
JPH03278247A (en) * | 1990-03-28 | 1991-12-09 | Fuji Xerox Co Ltd | Hyper medium system |
JPH06250895A (en) * | 1993-02-26 | 1994-09-09 | Fujitsu Ltd | Structured data base system |
Also Published As
Publication number | Publication date |
---|---|
JP2008197815A (en) | 2008-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9454597B2 (en) | Document management and retrieval system and document management and retrieval method | |
JP4256416B2 (en) | Data structure conversion system and program | |
JP2008052662A (en) | Structured document management system and program | |
US7457812B2 (en) | System and method for managing structured document | |
JP4237813B2 (en) | Structured document management system | |
JP5063877B2 (en) | Information processing apparatus and computer program | |
JP2008083769A (en) | Document search apparatus and method | |
US20110252313A1 (en) | Document information selection method and computer program product | |
JP2001109754A (en) | Retrieving method using index file and device used for the method | |
JP4521413B2 (en) | Database management system and program | |
JP2005107931A (en) | Image search apparatus | |
JP4439496B2 (en) | Search processing apparatus and program | |
JP2004220176A (en) | Database search system and search method, method for forming data file used for search, and storage medium storing data file | |
JP2010272006A (en) | Relation extraction apparatus, relation extraction method and program | |
JP4734400B2 (en) | Document search apparatus and program | |
JP2008026964A (en) | Retrieval processor and program | |
JP4091586B2 (en) | Structured document management system, index construction method and program | |
JP4199916B2 (en) | Document management method and apparatus | |
JP2002207768A (en) | Information processing system, its method and recording medium recorded with information processing program operating on computer | |
JP4304226B2 (en) | Structured document management system, structured document management method and program | |
JP3923961B2 (en) | XML variant search system and XML variant search method | |
JP4160627B2 (en) | Structured document management system and program | |
JP2001014342A (en) | Method and device for document retrieval | |
JP4568267B2 (en) | Structured document retrieval system and database management program | |
JP2008090459A (en) | Structured document management system and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20091008 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091020 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100209 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100324 |
|
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: 20100427 |
|
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: 20100524 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130528 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130528 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140528 Year of fee payment: 4 |
|
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 |