JP4165086B2 - Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program - Google Patents

Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program Download PDF

Info

Publication number
JP4165086B2
JP4165086B2 JP2002047795A JP2002047795A JP4165086B2 JP 4165086 B2 JP4165086 B2 JP 4165086B2 JP 2002047795 A JP2002047795 A JP 2002047795A JP 2002047795 A JP2002047795 A JP 2002047795A JP 4165086 B2 JP4165086 B2 JP 4165086B2
Authority
JP
Japan
Prior art keywords
value
tag
rdb
xml data
buffer
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
JP2002047795A
Other languages
Japanese (ja)
Other versions
JP2003248615A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2002047795A priority Critical patent/JP4165086B2/en
Publication of JP2003248615A publication Critical patent/JP2003248615A/en
Application granted granted Critical
Publication of JP4165086B2 publication Critical patent/JP4165086B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はXMLデータをRDBに格納する装置およびXMLデータをRDBから取得する装置に関する。
【0002】
【従来の技術】
XML(eXtensible Markup Language)で記述されたデータをRDB(Relational Data Base)に格納する際、XMLデータをそのまま全部ストリーム(Stream)で格納するのではなく、検索などが有効に行えるように、RDBの各カラムとXMLの各タグの値とを対応付けて幾つかのテーブルに格納する。このため、従来のこの種の格納装置は、RDBに格納しやすい他の形式のXMLデータにXMLデータを一括して変換してバッファに蓄積してからRDBに格納している。また、こうして格納されたXMLデータをRDBから取得する際には、XMLデータを一括して取り出してバッファに蓄積し、格納しやすい形式から目的のXMLデータの形式に変換している。RDBに格納しやすい形式のXMLデータは、通常XMLデータのタグがRDBのカラム名、タグの値がRDBのカラムの内容となる以下のような形式のXMLデータである。
【0003】

Figure 0004165086
【0004】
【発明が解決しようとする課題】
このような構成を有する従来の装置では、通常XSLT(eXtensible Style Language Transformation)プロセッサやパーズツリーであるDOM(Document Object Model)オブジェクトを使用するが、一般的にXSLTプロセッサまたはDOMオブジェクトがバッファとして使用するメモリ容量は、扱うXMLデータが大きくなればそれにつれて大きくなり、装置全体が使用するメモリ量をXMLデータのサイズによらずXMLの構造を表すデータ(DTD(Document Type Definition)またはXMLShema)の大きさと同じオーダーの一定値に保つことができない。
【0005】
その理由は、XMLデータを他形式のXMLデータに一括して変換してバッファに蓄積した後にDBに格納するため、繰り返し項目が多数あるサイズの大きいXMLデータについてこれを行う場合、使用メモリ量がXMLデータのサイズにほとんどの場合比例するからである。
【0006】
【発明の目的】
本発明の目的は、繰り返し項目が多いXMLデータをRDBに格納する場合に、XMLデータに繰り返し項目が多数あっても使用メモリ量をXMLデータのサイズによらず、XMLの構造を表すデータDTD等の大きさと同じオーダーの一定値に保つことができるようにすることにある。
【0007】
本発明の別の目的は、繰り返し項目が多いXMLデータをRDBから取得する場合に、XMLデータに繰り返し項目が多数あっても使用メモリ量をXMLデータのサイズによらず、XMLの構造を表すデータDTD等の大きさと同じオーダーの一定値に保つことができるようにすることにある。
【0008】
【課題を解決するための手段】
本発明のXMLデータのRDBへの格納装置は、格納対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、格納対象となる前記 XML データからタグの値を読み込んで該タグの XPath を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したタグの値を、該タグの XPath を含む前記組み合わせ中の前記 RDB のテーブル名及びカラム名で特定される前記 RDB のテーブルのカラムに対して書き込むことにより、前記XMLデータを前記RDBへ格納する格納手段とを備え前記格納手段は、前記XMLデータの繰り返し部分については、1つの繰り返し部分毎に、タグの値をバッファに蓄積した時点で前記RDBの当該繰り返し部分のタグの値を格納するテーブルに対して、レコード中の値が未だ定まっていないカラムにはダミーの値を使用したINSERT文を発行してレコードを挿入する手段と、前記ダミーの値を書き出したカラムの値に対応するタグの値を前記XMLデータから読み出したときにUPDATE文を発行して前記レコードを更新する手段とを含んでいる。
【0009】
また本発明のRDBからのXMLデータの取得装置は、取得対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、前記 RDB のテーブルのカラムの値を読み出して該テーブル名及びカラム名を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したカラムの値を、該テーブル名及びカラム名を含む前記組み合わせ中の前記 XPath で特定される前記タグの値として前記 XML データに書き出すことにより、前記RDBから前記XMLデータを取得する取得手段とを備え前記取得手段は、前記XMLデータの繰り返し部分については、当該繰り返し部分のタグの値を格納するテーブルに対してSELECT文を発行し、1レコード毎に、当該レコード中のカラムの値を該当するバッファに蓄積した後、当該繰り返し部分のタグに対応する値を前記バッファから読み出して前記XMLデータのストリームに書き出す処理を繰り返す手段を含んでいる。
【0010】
【作用】
本発明のXMLデータのRDBからの取得装置にあっては、XMLデータの繰り返し部分については、1つの繰り返し部分毎に、タグの値をバッファに蓄積した時点でRDBの当該繰り返し部分のタグの値を格納するテーブルに対して、レコード中の値が未だ定まっていないカラムにはダミーの値を使用したINSERT文を発行してレコードを挿入する。そして、ダミーの値を書き出したカラムの値に対応するタグの値をXMLデータから読み出したときにUPDATE文を発行して更新する。これにより、XMLデータの繰り返し部分のタグの値を格納するRDBのテーブルが、その繰り返し部分に含まれない外のタグの値をも格納する場合、当該テーブルに対するデータの書き出しがINSERT文、UPDATE文による複数回に別れるものの、XMLデータの繰り返し部分の数に関わらず一組分だけのバッファだけで足り、XMLデータのサイズがいくら大きくなっても内部データのサイズはDTDの大きさを超えることがない。
【0011】
また本発明のRDBからのXMLデータの取得装置にあっては、XMLデータの繰り返し部分については、当該繰り返し部分のタグの値を格納するテーブルに対してSELECT文を発行し、1レコード毎に、当該レコード中のカラムの値を該当するバッファに蓄積した後、当該繰り返し部分のタグに対応する値を前記バッファから読み出して前記XMLデータのストリームに書き出す処理を繰り返すため、XMLデータの繰り返し部分の数に関わらず一組分だけのバッファだけで足り、XMLデータのサイズがいくら大きくなっても内部データのサイズはDTDの大きさを超えることがない。
【0012】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して詳細に説明する。
【0013】
図1を参照すると、本発明の実施の形態におけるXMLデータのRDBへの格納装置100は、XMLデータのRDBへの格納手段101と、内部データDA101を記憶するメモリ102とを備え、格納対象となるXMLデータ103を記憶する入力装置104とXMLデータを格納するRDB105とに接続されている。入力装置104は例えば磁気ディスク、通信バッファ等である。なお、110は磁気ディスク、半導体メモリ等のコンピュータ可読記録媒体であり、格納用プログラムが記録されている。ここに記録された格納用プログラムは、格納装置100を構成するコンピュータに読み取られ、そのコンピュータの動作を制御することにより、そのコンピュータ上にモジュールとしての格納手段101を実現する。
【0014】
内部データDA101は、入力対象となるXMLデータ103毎に事前に用意されており、XMLデータ103の構造を表し、RDB105との対応関係を持ち、XMLデータ103の中の繰り返しの数に関わらず一組分だけのバッファを持っている。より具体的には、内部データDA101は、XMLデータ103の構造を表すデータ(DTDまたはXMLShema)について、XMLデータ103の繰り返し部分を子セグメントにした木構造の構造になっており、値が入りうるXMLのタグについて、そのXPathと、それと対応付けられているRDB105のテーブル名及びカラム名と、値を保持するバッファとを持っている。親セグメントと子セグメントとはポインタで連結される。
【0015】
格納手段101は、内部データDA101を順番にたどると同時に入力のXMLデータ103を読みながらRDB105に対してデータ追加操作を行うSQL文を発行するように動作する。このときにXMLデータ103のサイズがいくら大きくなっても内部データDA101のサイズは、DTDの大きさを超えることがない。
【0016】
また、本発明の実施の形態におけるRDBからのXMLデータの取得装置200は、RDBからのXMLデータの取得手段201と、内部データDA201を記憶するメモリ202とを備え、XMLデータを格納するRDB205と取得したXMLデータ203を記憶する出力装置204とに接続されている。出力装置204は例えば磁気ディスク、通信バッファ等である。なお、210は磁気ディスク、半導体メモリ等のコンピュータ可読記録媒体であり、取得用プログラムが記録されている。ここに記録された取得用プログラムは、取得装置200を構成するコンピュータに読み取られ、そのコンピュータの動作を制御することにより、そのコンピュータ上にモジュールとしての取得手段201を実現する。
【0017】
内部データDA201は、取得対象となるXMLデータ203毎に事前に用意されており、XMLデータ203の構造を表し、RDB205との対応関係を持ち、XMLデータ203の中の繰り返しの数に関わらず一組分だけのバッファを持っている。より具体的には、内部データDA201は、XMLデータ203の構造を表すデータ(DTDまたはXMLShema)について、XMLデータ203の繰り返し部分を子セグメントにした木構造の構造になっており、値が入りうるXMLのタグについて、そのXPathと、それと対応付けられているRDB205のテーブル名及びカラム名と、値を保持するバッファとを持っている。親セグメントと子セグメントとはポインタで連結される。
【0018】
取得手段201は、内部データDA201を順番にたどると同時にXMLデータ203を書き出しながらRDB205に対してデータ取得操作を行うSQL文を発行するよう動作する。このときにXMLデータ203のサイズがいくら大きくなっても内部データDA201のサイズは、DTDの大きさを超えることがない。
【0019】
次に、図2のフローチャートを参照して本実施の形態の格納装置100の全体の動作について詳細に説明する。
【0020】
まず、内部データDA101の着目する場所を先頭にする(図2のステップS101)。内部データDA101はセグメントの木構造になっているため、最初はルートのセグメントの先頭を着目する場所に定める。次に、XMLデータ103を内部データDA101の着目中のXPathに合致するところまで読む(ステップS102)。ここでXPathに合致するところがXMLデータ103になかったら(ステップS111でNO)、エラーにする。さらに、そのXPathに対応するタグが繰り返しの始まりかチェックし(ステップS112)、繰り返しの始まりの場合はステップS103に進み、繰り返しの始まりでない場合はステップS105に進む。繰り返しの始まりの箇所には子セグメントへのポインタが入っているので、ポインタの有無により繰り返しの始まりか否かが判明する。
【0021】
ステップS103では、親セグメントについてバッファに入っている値を元に、RDB105の該当するテーブルに対してINSERT文またはUPDATE文を発行する。INSERT文は当該親セグメントにおける初めての子セグメントの開始時(繰り返しの始まり)に使用され、UPDATE文は当該親セグメントにおける2番目以降の子セグメントの開始時(繰り返しの始まり)に使用される。INSERT文では、テーブルに1行が挿入されるが、その行の全てのカラムの値がバッファに入っていなければ、値が入っていないところはNULLなどのダミーのデータを入れる。次に、内部データDA101のそれに対応する子セグメントについて、「子セグメントについて開始」から始まる部分を再帰的に実行する(ステップS104)。そして、ステップS113に進む。
【0022】
他方、ステップS105では、XMLデータ103からXPathに対応する値を読んで内部データDA101のバッファに格納し、XMLデータ103のXPathに対応するXMLの終了タグを読み飛ばし、内部データDA101の着目する場所を次に進める。次に、もしも着目していたXPathが、RDB105のテーブルのカラムが子孫のセグメントからINSERT文を発行したDBレコードに対応付けられていた場合は、それらのDBレコードに対してUPDATE文を発行する(ステップS106)。そして、ステップS113に進む。
【0023】
ステップS113では、内部データの着目場所が着目中のセグメントの終わりかどうかチェックし、終わりでない場合はステップS102からの処理を繰り返し実行する。終わりの場合には、当該セグメントのバッファに追加された値がある場合は、バッファに入っている値を元にRDB105に対して、初めての書き出しの際にはINSERT文を発行し、2度目以降の同じレコードに対する書き出しの際にはUPDATE文を発行する(ステップS107)。そして、XMLデータ103の次の部分がそのセグメントを繰り返すタグになっているかチェックし、繰り返しになっている場合は、そのセグメントのバッファを再利用するためにステップS109でコピーしたバッファ以外のバッファを空にし(ステップS108)、ステップS102からの処理を繰り返し実行する。繰り返しでない場合はリターンする。なお、ステップS108でそのセグメントのバッファを全て空にするようにしても良いが、その場合にはステップS109からの処理を繰り返す。
【0024】
このように本実施の形態の格納装置100では、XMLデータ103をRDB105に格納する場合に、中間的にメモリ102上に持つ値はXMLデータ103の構造(DTD)の大きさとなるように構成されているため、たとえ繰り返し項目が多数あってXMLデータ103のサイズがいくら大きくなっても、中間的にメモリ102上に持つデータのサイズを入力XMLデータ103のサイズによらずDTDの大きさと同じオーダーの一定値にできる。
【0025】
次に、図3のフローチャートを参照して本実施の形態の取得装置200の全体の動作について詳細に説明する。
【0026】
まず、内部データDA201の着目する場所を先頭にする(図3のステップS201)。内部データDA201はセグメントの木構造になっているため、最初はルートのセグメントの先頭を着目する場所に定める。次に、そのセグメントの着目中のXPathに対応付けられているRDB205のテーブルに対しSELECT文を発行する(ステップS202)。次に、ステップS202で発行したSQL文の実行結果の次のレコードがあるかチェックする(ステップS203)。次のレコードがない場合(ステップS211でNO)、リターンする。次のレコードがある場合は、ステップS202で発行したSQL文の実行結果の次のレコードをフェッチし、得られた値を内部データDA201のそのセグメントのバッファに入れる(ステップS204)。
【0027】
次に、内部データDA201の着目場所のXPathがXMLデータ203の繰り返しに対応するタグかどうかチェックし(ステップS212)、繰り返しの始まりの場合はステップS205へ進み、繰り返しの始まりでない場合はステップS206に進む。繰り返しの始まりの箇所には子セグメントへのポインタが入っているので、ポインタの有無により繰り返しの始まりか否かが判明する。
【0028】
ステップS205では、そのXPathに対応する内部データDA201の子セグメントについて、「子セグメントについて開始」からの処理を再帰的に実行する。そして、ステップS213に進む。
【0029】
ステップS206では、内部データDA201の着目中のXPathに対応するバッファの値が空の場合にはRDB205に対してSELECT文を発行してバッファの値を埋める。そして、XPathに対応するタグとバッファの値をXMLデータ203に書き出し、内部データDA201の着目中の場所を次へ進める(ステップS207)。そして、ステップS213に進む。
【0030】
ステップS213では、内部データDA201の着目中の場所がそのセグメントの終わりかどうかチェックする。セグメントの終わりでない場合はステップS212からの処理を繰り返し実行する。セグメントの終わりの場合は、ステップS203からの処理を繰り返し実行する。
【0031】
本実施の形態の取得装置200では、XMLデータ203をRDB205から取得する場合、XMLデータ203はストリームとして書き出してしまい、中間的にメモリ202上に持つ値はXMLデータ203の構造(DTD)の大きさとなるように構成されているため、たとえ繰り返し項目が多数あってXMLデータ203のサイズがいくら大きくなっても、中間的にメモリ202上に持つデータのサイズをXMLデータ203のサイズによらずDTDの大きさと同じオーダーの一定値にできる。
【0032】
次に、具体的な実施例を用いて本実施の形態の動作を説明する。
【0033】
図4はXMLデータのDTDと、RDBのDBスキーマの具体例を示す。DTDでは要素型宣言部分のみを示してあり、要素Itemが繰り返される構造となっている。また、RDBは、PORequestテーブルとPOItemテーブルとの2つのテーブルを持つ。
【0034】
図5はXML中のタグとDBテーブルのカラムとの対応関係の具体例を示す。この例では、値が入りうるXMLのタグのうち、Xpathが“/POReq/PONumber”,“/POReq/PODate”, “/POReq/fromRole/BusinessId”, “/POReq/toRole/BusinessId”であるタグの値が、PORequestテーブルのカラムPOId,Date,From,Toの値に対応する。また、XMLの繰り返し部分のタグItemに含まれる、Xpathが、“/POReq/Item/POItemNumber”,“/POReq/Item/ProductId”,“/POReq/Item/Request/Amount”,“/POReq/Item/Request/Price”であるタグの値と、当該繰り返し部分の外にある、Xpathが“/POReq/Location”であるタグの値とが、POItemテーブルのカラムPOId,ItemNumber,PId,Quantity,RequestPrice,Locationの値に対応する。なお、PORequestテーブルのカラムPOIdとPOItemテーブルのカラムPOIdとは、プライマリキーとフォーリンキーの関係にある。
【0035】
図6は格納対象となるXMLデータの具体例を示す。この例では繰り返し項目1〜3の部分が繰り返し構造となっている。
【0036】
図7は内部データの具体例を示す。この例の内部データは、図6のXMLデータの構造を表す図4のDTDについて、XMLデータの繰り返し部分を子セグメント(セグメント2)、それ以外を親セグメント(セグメント1)とした木構造を有し、各セグメント1、2において、図5の対応関係に従って、値が入りうるXMLのタグについて、そのXPathと、それと対応付けられているRDBのテーブル名及びカラム名と、値を保持するバッファとを設定してある。このような内部データは例えば以下のように作成される。
【0037】
先ず、親セグメント1を生成する。次に、図5を参照すると、XMLの値が入りうる最初のXpathは“/POReq/PONumber”で、PORequestテーブルのカラムPOIdに対応するので、エントリE1を親セグメント1に生成する。同様にして、エントリE2〜E4を生成する。XMLの次のタグは繰り返しのタグItemなので、子セグメント2を生成し、親セグメント1にはタグItemのXpathと子セグメント2へのポインタを設定したエントリE5を生成する。次に、子セグメント2のエントリの生成に移るが、図5を参照すると、PORequestテーブルのカラムPOIdとPOItemテーブルのカラムPOIdとがプライマリキーとフォーリンキーの関係にあるため、プライマリキーに対応するXpathと、フォーリンキーを格納するテーブル及びカラムと、バッファとを持つエントリE50を生成した後、XMLの値が入りうる各Xpath用のエントリE51〜E54を生成する。次に、親セグメント1のエントリの生成に戻り、XMLの値が入りうる最後のXpath用のエントリE6を生成する。ここで、初期状態においては各エントリのバッファは空である。
【0038】
以下、図4のDTDとDBスキーマで、これらの間に図5に示す対応関係があり、入力するXMLデータが図6に示すもので、図7のような内部データが用意されている場合を例にして、格納装置100の具体的な動作を説明する。
【0039】
XMLデータを読み始める前の内部データDA101の初期状態は図7に示すものとなっており、この中のセグメント1の先頭のエントリE1が着目する場所としてセットされる(ステップS101)。次に、この場所に対応するXPath “/POReq/PONumber” に対応するところをXMLデータから読み出す(ステップS102)。先頭が対応するタグとなっているのでエラーにはならず、またこのXPathはXMLデータ中の繰り返しに対応するXPathではないのでステップS105に進む。
【0040】
ステップS105では、XMLデータの対応するタグの値 “order1” を内部データの対応するエントリE1のバッファに格納し、内部データの着目する場所を次に進める。着目中だったXPathが対応付けられているDBカラムは、子孫のセグメントでINSERT文を発行したレコードのものではないので、これに対するUPDATE文は発行されない(ステップS106)。次に、セグメントの終わりではないので、ステップS102からの処理を繰り返し実行する。XPath “/POReq/PODate”, “/POReq/fromRole/BusinessId”, “/POReq/toRole/BusinessId” について同様のこと(ステップS102、ステップS105)を繰り返した結果、内部データは図8に示すものとなる。
【0041】
次のXPath “/POReq/Item” については、このXPathがXMLデータ中の繰り返しに対応するので、子セグメント2に基づく処理(繰り返し部分の処理)に入る前の親セグメントに対する処理として、ステップS103の処理を実行する。具体的には、現在の内部データのセグメント1のバッファに入っている値を元にDBのPORequestテーブルに対しINSERT文を発行する(ステップS103)。ここで、操作対象となるテーブルはセグメント1のバッファが空でないものに対応するテーブルだけである。このため、PORequestテーブルだけが対象となり、エントリE6のバッファが空であるPOItemテーブルに対する操作は行われない。
【0042】
次に、このXPath “/POReq/Item”に対応する子セグメント2についてステップS102からの処理が再帰的に実行される(ステップS104)。
【0043】
先ず、子セグメント2の最初の XPath ”/POReq/PONumber”は、”/POReq/Item”以下のパスではなく先祖セグメントのXPathに対応したものであり、DBテーブルではプライマリキーとフォーリンキーの関係にあるものとなっており(これは、子セグメント中のXpathと同じXpathが親セグメントにあるかどうかで判明する)、この場合は、バッファに親のセグメントのバッファに入っている値 “order1”をコピーし(ステップS109)、次のXPath “POItemNumber”に進む。すなわち、親セグメントのバッファの値が、DBテーブルの親テーブルと子テーブルを関係つけるためのプライマリキーであれば、子セグメントに子テーブルの対応するフォーリンキーの項目があるため、ここに値をコピーするわけである。
【0044】
次に、子セグメント2におけるXPath “POItemNumber”, “ProductId”, “Request/Amout”, “Request/Price” についてステップS102、ステップS105が繰り返し実行された結果、内部データは図9に示すものとなる。
【0045】
これでセグメント2の終わりなので、セグメントの終了時の処理を行う(ステップS107)。今の場合、セグメント2のバッファに入っている値を元にDBのPOItemテーブルに対してINSERT文が発行される。このとき、テーブルPOItemテーブルのカラムLocationに対応する値は、エントリE6のバッファに未だ入っていないので、このカラムについてはNULLなどのダミーのデータが使用される。
【0046】
図6に示すXMLデータは、繰り返しのXPathの “/POReq/Item” が3つ含まれているので、同様のこと(ステップS102、ステップS105、ステップS107)をあと2回繰り返して、POItemテーブルに対してあと2回INSERT文が発行され、子セグメント2についての処理からセグメント1への処理へリターンする。
【0047】
セグメント1の次のXPathは “/POReq/Location”で、これに関しステップS102とステップS105を実行した結果、内部データは図10に示すものとなる。そして、”/POReq/Location”は、セグメント2に対応するDBのレコードのカラムに対応付けられているので、既にINSERT文が発行済みのPOItemテーブルのレコードに対して、このバッファに入っている値を元に、DBのPOItemテーブルに対してUPDATE文が発行される(ステップS106)。次にステップS107の実行に入るが、ステップS107は「そのセグメントのバッファで追加されたものがある場合」だけ処理を行うものであり、今の場合はバッファに新たに追加されたものがないため、何もしない。これでセグメント1の終わりで、XMLデータのRDBへの格納処理を終了する。このときにRDBに格納されているデータは図11に示すものとなる。
【0048】
以上の具体例では、ステップS103においてNULLなどのダミーのデータを入れる場面、同ステップS103においてUPDATE文を使用する場面、ステップS107においてUPDATE文を使用する場面は現れない。これらの場面は、例えば次のような具体例で現れる。
【0049】
例えば図7のエントリE2がエントリE5とE6の間にあるような場合を考える。このような場合、親セグメント1のエントリE4までの処理を終えて、繰り返し部分の処理に入る前の親セグメント1に対するステップS103において、エントリE2のバッファが未だ空なので、PORequestテーブルのカラムDateにはNULLなどのダミーのデータが入れられる。また、子セグメント1の処理を終えて、エントリE2の処理に移ると、ステップS105でエントリE2のバッファに値が入るため、親セグメント1の処理を終える際のステップS107において、エントリE2のバッファに入っている値がUPDATE文を使用して、PORequestテーブルのカラムDateに書き込まれる。
【0050】
また、ステップS103でUPDATE文が使用されるのは、親セグメント1に複数の繰り返し部分がある場合である。すなわち、1個目の子セグメントの処理に入る際の親セグメントに対するステップS103ではINSERT文が使用されるが、2個目以降の子セグメントの処理に入る際の親セグメントに対するステップS103の処理ではUPDATE文が使用される。
【0051】
次に、図4のDTDとDBスキーマで、これらの間に図5に示す対応関係があり、RDBに格納されているデータが図11に示すもので、図7のような内部データが用意されている場合を例にして、取得装置200の具体的な動作を説明する。
【0052】
XMLデータの書き出しを始める前の内部データDA201の初期状態は図7に示すものとなっており、この中のセグメント1の先頭のエントリE1が着目する場所としてセットされる(ステップS201)。次に、このセグメント1で対応付けられているDBカラムの値を取得するSELECT文が図11で示される内容のDBのPORequestテーブルに対し実行される(ステップS202)。レコードが存在するので、ステップS204に進む(ステップS203)。SELECT文の実行結果をフェッチすることにより、セグメント1のエントリE1〜E4のバッファの値が埋まる(ステップS204)。この時点で内部データDA201は図12に示すものとなる。
【0053】
最初のXPath “POReq/PONumber”は繰り返しの項目ではないのでステップS206に進む。対応するエントリE1のバッファは空でないのでSELECT文は発行されない(ステップS206)。内部データDA201のXPath “POReq/PONumber”に対応するタグとその値がXMLデータに書き出され、次のXPathに進む(ステップS207)。ここで、XMLデータに書き出すときのXMLの終了タグについては、そのタグに囲まれたところが閉じられるまで書き出しが遅延される。
【0054】
次に、XPath “/POReq/POData”, “/POReq/fromRole/BusinessId”, “/POReq/toRole/BusinessId” について同様のこと(ステップS207)を繰り返した結果、XMLデータの繰り返しに対応するXPath “/POReq/Item” の前までのXMLデータが書き出される。
【0055】
次のXPath “/POReq/Item”はXMLデータ中の繰り返しに対応するので、XPath “/POReq/Item”に対応する子セグメント2について「子セグメントについて開始」からの処理が再帰的に実行される(ステップS205)。子セグメント2の XPath”/POReq/PONumber”は、”/POReq/Item”以下のパスではなく先祖セグメントのXPathに対応したものであり、DBテーブルではプライマリキーとフォーリンキーの関係にあるものとなっており、この場合は、エントリE50のバッファに親セグメントのエントリE1のバッファに入っている値 “order1”がコピーされ、XPath “POItemNumber”に進む(ステップS208)。次に、このセグメント2で対応付けられているDBカラムの値を取得するSELECT文が図11で示される内容のDBのPOItemテーブルに対し実行される(ステップS202)。レコードが存在するので、ステップS204に進む(ステップS203)。SELECT文の実行結果をフェッチすることにより、セグメント2のエントリE51〜E54のバッファの値が埋まる(ステップS204)。
【0056】
次に、XPath “POItemNumber”, “ProductId”, “Request/Amout”, “Request/Price” についてステップS207が繰り返し実行された結果、XPath “POReq/Item”に対応する繰り返し項目の1つ目がXMLデータに書き出される。これでセグメント2の終わりなのでステップS203からの処理を繰り返す。図11に示すDBのPOItemテーブルは3つのレコードを含んでいるので、同様のこと(ステップS203、ステップS204、ステップS207)をあと2回繰り返して、残りの2つの繰り返し項目に対応する内容をXMLデータに書き出し、子セグメント2についての処理からセグメント1への処理へリターンする。
【0057】
セグメント1の次のXPathは “/POReq/Location”で、これに対応するエントリE6のバッファが空なので、DBのPOItemテーブルにSELECT文を発行しフェッチしてバッファを埋め(ステップS206)、ステップS207を実行し対応する内容がXMLデータに書き出される。これで、XMLデータのRDBからの取得処理を終了する。この時点で内部データDA201は図13に示すものとなり、書き出されたXMLデータは図6に示すものと同じものになる。
【0058】
以上本発明の実施の形態について説明したが、本発明は以上の例に限定されずその他各種の付加変更が可能である。例えば、図1では、格納装置101と取得装置201とのそれぞれに内部データDA101、内部データDA201を設けたが、同じ構造のXMLデータについては格納装置101と取得装置201とで内部データは同じになるので、格納と取得とを同時に行わない場合には、1つの内部データを格納装置101と取得装置201とで共通に設けるようにしても良い。この場合、格納装置101と取得装置201とをあわせて、格納・取得装置として1つの装置として実現するようにしても良い。
【0059】
【発明の効果】
以上説明したように本発明によれば、XMLデータをRDBに格納し、またRDBからXMLデータを取得する場合に、たとえXMLデータのサイズがいくら大きくなっても、使用メモリ量がDTDのサイズに比例した大きさに抑えられ、XMLデータのサイズによらずDTDの大きさと同じオーダーの一定値に抑えられる効果がある。その理由は、既存のXML処理系ではXMLデータのサイズに比例したメモリ容量を必要とするのに対し、本発明ではDTDの大きさに比例した内部データしかメモリ上に持たず、他のデータはDBへの格納ならDBに書き出してしまうし、DBからの取り出し時はXMLデータを作成するストリームに書き出してしまうためである。
【図面の簡単な説明】
【図1】本発明の実施の形態の構成を示すブロック図である。
【図2】本発明の実施の形態のXMLデータのRDBへの格納手段の動作を示す流れ図である。
【図3】本発明の実施の形態のRDBからのXMLデータの取得手段の動作を示す流れ図である。
【図4】 DTDとDBスキーマ情報の具体例を示す図である。
【図5】 XML中のタグとDBテーブルのカラムとの対応関係の具体例を示す図である。
【図6】 XMLデータの具体例を示す図である。
【図7】初期状態の内部データの具体例を示す図である。
【図8】 RDBにXMLデータを格納している最中の内部データの状態を示す図である。
【図9】 RDBにXMLデータを格納している最中の内部データの状態を示す図である。
【図10】 RDBにXMLデータを格納している最中の内部データの状態を示す図である。
【図11】 XMLデータを格納後のRDBの内容を示す図である。
【図12】 XMLデータをRDBから取り出している最中の内部データの状態を示す図である。
【図13】 XMLデータをRDBから取り出している最中の内部データの状態を示す図である。
【符号の説明】
100 XMLデータのDBへの格納装置
101 XMLデータのDBへの格納手段
102 内部データ
103 入力のXMLデータ
104 入力装置
106 RDB
110 記録媒体
200 DBからのXMLデータ取得装置
201 DBからのXMLデータ取得手段
202 内部データ
203 取得したXMLデータ
204 出力装置
205 RDB
210 記録媒体[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an apparatus for storing XML data in an RDB and an apparatus for acquiring XML data from the RDB.
[0002]
[Prior art]
When storing data described in XML (eXtensible Markup Language) in RDB (Relational Data Base), RDB's RDB (Relational Data Base) does not store all XML data as a stream (Stream), Each column is associated with each tag value in XML and stored in several tables. For this reason, this type of conventional storage device converts the XML data into other types of XML data that are easy to store in the RDB, accumulates them in a buffer, and then stores them in the RDB. In addition, when acquiring the XML data stored in this way from the RDB, the XML data is collectively extracted and stored in a buffer, and converted from a format that is easy to store into a format of the target XML data. XML data in a format that can be easily stored in the RDB is XML data in the following format, in which the XML data tag is usually the RDB column name and the tag value is the contents of the RDB column.
[0003]
Figure 0004165086
[0004]
[Problems to be solved by the invention]
In the conventional apparatus having such a configuration, an XSLT (eXtensible Style Language Transformation) processor or a DOM (Document Object Model) object that is a parse tree is generally used, but the XSLT processor or DOM object is generally used as a buffer. The memory capacity increases as the XML data handled increases, and the amount of memory used by the entire device depends on the size of the data (DTD (Document Type Definition) or XML Shema) that represents the structure of the XML regardless of the size of the XML data. Cannot keep a constant value in the same order.
[0005]
The reason is that XML data is converted into XML data of other formats at once, stored in the buffer, and then stored in the DB, so if you do this for large XML data with many repeated items, the amount of memory used will be This is because it is almost proportional to the size of XML data.
[0006]
OBJECT OF THE INVENTION
The object of the present invention is to store XML data with many repeated items in the RDB. Even if there are many repeated items in the XML data, the amount of memory used does not depend on the size of the XML data, the data DTD representing the structure of the XML, etc. It is to be able to keep a constant value of the same order as the size of.
[0007]
Another object of the present invention is to obtain data representing the structure of XML regardless of the size of the XML data, even if there are many repeated items in the XML data, when acquiring XML data with many repeated items from the RDB. The purpose is to be able to maintain a constant value in the same order as the size of the DTD or the like.
[0008]
[Means for Solving the Problems]
  The device for storing XML data in the RDB of the present invention displays the structure of XML data to be stored.Can be a value defined in the data XML For each tag, XPath And associated with the tag RDB The tag with the table name and column name and the buffer for holding the value are included, and the tag having one or more repetition designations has only one combination regardless of the actual number of repetitions.A memory for storing internal data;The storage target XML Read the tag value from the data and XPath And storing the tag value stored in the buffer in the buffer in the combination. XPath In the combination comprising RDB Specified by the table name and column name RDB By writing to the table column,Storage means for storing the XML data in the RDB,The storage means records, with respect to a repeated portion of the XML data, a record for a table that stores the tag value of the repeated portion of the RDB at the time when the tag value is accumulated in the buffer for each repeated portion. A means for inserting a record by issuing an INSERT statement using a dummy value for a column whose value is not yet determined, and a tag value corresponding to the column value in which the dummy value is written out And a means for issuing an UPDATE statement when updating the record to update the record.
[0009]
  The XML data acquisition device from the RDB of the present invention displays the structure of the XML data to be acquired.Can be a value defined in the data XML For each tag, XPath And associated with the tag RDB The tag with the table name and column name and the buffer for holding the value are included, and the tag having one or more repetition designations has only one combination regardless of the actual number of repetitions.A memory for storing internal data;Above RDB The column value of the table is read and stored in the buffer in the combination including the table name and the column name, and the column value stored in the buffer is stored in the buffer in the combination including the table name and the column name. XPath As the value of the tag specified by XML By exporting to data,Obtaining means for obtaining the XML data from the RDB;,For the repetitive part of the XML data, the acquisition unit issues a SELECT statement to the table storing the tag value of the repetitive part, and for each record, the value of the column in the record corresponds to the corresponding buffer. And storing the value corresponding to the tag of the repetitive portion from the buffer and writing it to the XML data stream.
[0010]
[Action]
  In the apparatus for acquiring XML data from the RDB according to the present invention, for the repeated portion of the XML data, the tag value of the repeated portion of the RDB at the time when the tag value is accumulated in the buffer for each repeated portion. For a table that stores a value, insert a record by issuing an INSERT statement using a dummy value for a column for which the value in the record is not yet determined. Then, when the tag value corresponding to the column value in which the dummy value is written is read from the XML data, an UPDATE statement is issued and updated. As a result, if the RDB table that stores the tag value of the repeated part of the XML data also stores the value of the other tag that is not included in the repeated part, the data write to the table is an INSERT or UPDATE statement. The number of repeated parts of XML dataRegardlessOnly one set of buffers is sufficient, and no matter how large the XML data size, the internal data size will not exceed the size of the DTD.
[0011]
  Further, in the XML data acquisition apparatus from the RDB of the present invention, for the repeated portion of the XML data, a SELECT statement is issued to the table storing the tag value of the repeated portion, and for each record, After accumulating the column values in the record in the corresponding buffer, the process of reading the value corresponding to the tag of the repetition part from the buffer and writing it to the XML data stream is repeated. InRegardlessOnly one set of buffers is sufficient, and no matter how large the XML data size, the internal data size will not exceed the size of the DTD.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[0013]
Referring to FIG. 1, an XML data RDB storage device 100 according to an embodiment of the present invention includes an XML data RDB storage means 101 and a memory 102 for storing internal data DA101. Are connected to an input device 104 that stores XML data 103 and an RDB 105 that stores XML data. The input device 104 is, for example, a magnetic disk or a communication buffer. Reference numeral 110 denotes a computer-readable recording medium such as a magnetic disk or a semiconductor memory, in which a storage program is recorded. The storage program recorded here is read by a computer constituting the storage device 100, and the operation of the computer is controlled to realize the storage means 101 as a module on the computer.
[0014]
  The internal data DA101 is prepared in advance for each XML data 103 to be input, represents the structure of the XML data 103, has a correspondence with the RDB 105, and is repeated in the XML data 103.Regardless of the number ofHas only one set of buffers. More specifically, the internal data DA101 has a tree-structured structure in which the repeated portion of the XML data 103 is a child segment of the data (DTD or XMLShema) representing the structure of the XML data 103, and a value can be entered. The XML tag has its XPath, the table name and column name of the RDB 105 associated therewith, and a buffer for holding the value. The parent segment and the child segment are connected by a pointer.
[0015]
The storage unit 101 operates to issue an SQL statement for performing data addition operation to the RDB 105 while reading the input XML data 103 at the same time as tracing the internal data DA101. At this time, no matter how large the size of the XML data 103 is, the size of the internal data DA101 does not exceed the size of the DTD.
[0016]
The apparatus 200 for acquiring XML data from the RDB according to the embodiment of the present invention includes an XML data acquiring unit 201 from the RDB and a memory 202 that stores internal data DA201, and an RDB 205 that stores XML data. It is connected to an output device 204 that stores the acquired XML data 203. The output device 204 is, for example, a magnetic disk or a communication buffer. Reference numeral 210 denotes a computer-readable recording medium such as a magnetic disk or a semiconductor memory, on which an acquisition program is recorded. The acquisition program recorded here is read by a computer constituting the acquisition apparatus 200, and the operation of the computer is controlled to realize the acquisition means 201 as a module on the computer.
[0017]
  The internal data DA201 is prepared in advance for each XML data 203 to be acquired, represents the structure of the XML data 203, has a correspondence with the RDB 205, and is repeated in the XML data 203.Regardless of the number ofHas only one set of buffers. More specifically, the internal data DA201 has a tree-structured structure in which the repeated portion of the XML data 203 is a child segment of the data (DTD or XMLShema) representing the structure of the XML data 203, and can contain a value. The XML tag has its XPath, the table name and column name of the RDB 205 associated therewith, and a buffer for holding the value. The parent segment and the child segment are connected by a pointer.
[0018]
The acquisition unit 201 operates to issue an SQL statement for performing a data acquisition operation to the RDB 205 while writing the XML data 203 while simultaneously tracing the internal data DA201. At this time, no matter how large the size of the XML data 203, the size of the internal data DA201 does not exceed the size of the DTD.
[0019]
Next, the overall operation of the storage device 100 of this embodiment will be described in detail with reference to the flowchart of FIG.
[0020]
First, the focused location of the internal data DA101 is set at the top (step S101 in FIG. 2). Since the internal data DA101 has a tree structure of segments, first, the head of the root segment is determined as the place of interest. Next, the XML data 103 is read up to a point that matches the XPath under consideration of the internal data DA101 (step S102). If there is no place in the XML data 103 that matches the XPath (NO in step S111), an error is generated. Further, it is checked whether or not the tag corresponding to the XPath is the start of repetition (step S112). If it is the start of repetition, the process proceeds to step S103, and if not, the process proceeds to step S105. Since the pointer to the child segment is entered at the beginning of the repetition, it is determined whether or not the repetition starts depending on the presence or absence of the pointer.
[0021]
In step S103, an INSERT statement or an UPDATE statement is issued to the corresponding table in the RDB 105 based on the value stored in the buffer for the parent segment. The INSERT statement is used at the start of the first child segment in the parent segment (start of repetition), and the UPDATE statement is used at the start of the second and subsequent child segments in the parent segment (start of repetition). In the INSERT statement, one row is inserted into the table. If the values of all the columns in the row are not in the buffer, dummy data such as NULL is inserted where there is no value. Next, with respect to the child segment corresponding to that of the internal data DA101, the part starting from “start for child segment” is recursively executed (step S104). Then, the process proceeds to step S113.
[0022]
On the other hand, in step S105, the value corresponding to the XPath is read from the XML data 103 and stored in the buffer of the internal data DA101, the end tag of the XML corresponding to the XPath of the XML data 103 is skipped, and the place of interest in the internal data DA101 Next. Next, if the focused XPath is associated with DB records that have issued INSERT statements from descendent segments, the RDB 105 table columns issue UPDATE statements for those DB records ( Step S106). Then, the process proceeds to step S113.
[0023]
In step S113, it is checked whether or not the focused location of the internal data is the end of the segment being focused. If not, the processing from step S102 is repeatedly executed. In the case of the end, if there is a value added to the buffer of the segment, issue an INSERT statement to the RDB 105 based on the value in the buffer when writing for the first time. When the same record is written, an UPDATE statement is issued (step S107). Then, it is checked whether the next part of the XML data 103 is a tag for repeating the segment. If the tag is repeated, a buffer other than the buffer copied in step S109 is used to reuse the segment buffer. It is emptied (step S108), and the processing from step S102 is repeatedly executed. Return if not repeated. In step S108, all the buffers of the segment may be emptied. In this case, the processing from step S109 is repeated.
[0024]
As described above, in the storage device 100 according to the present embodiment, when the XML data 103 is stored in the RDB 105, an intermediate value on the memory 102 is configured to have the size of the structure (DTD) of the XML data 103. Therefore, even if there are many repeated items and the size of the XML data 103 is increased, the size of the data on the memory 102 in the middle is the same order as the size of the DTD regardless of the size of the input XML data 103. Can be a constant value.
[0025]
Next, the overall operation of the acquisition apparatus 200 of this embodiment will be described in detail with reference to the flowchart of FIG.
[0026]
First, the focused location of the internal data DA201 is set at the top (step S201 in FIG. 3). Since the internal data DA201 has a tree structure of segments, first, the head of the root segment is determined as the place of interest. Next, a SELECT statement is issued to the table in the RDB 205 associated with the XPath being focused on for the segment (step S202). Next, it is checked whether there is a next record of the execution result of the SQL statement issued in step S202 (step S203). If there is no next record (NO in step S211), the process returns. If there is a next record, the next record of the execution result of the SQL statement issued in step S202 is fetched, and the obtained value is put in the buffer of that segment of the internal data DA201 (step S204).
[0027]
Next, it is checked whether or not the XPath at the target location of the internal data DA201 is a tag corresponding to the repetition of the XML data 203 (step S212). If the repetition starts, the process proceeds to step S205. If the repetition does not start, the process proceeds to step S206. move on. Since the pointer to the child segment is entered at the beginning of the repetition, it is determined whether or not the repetition starts depending on the presence or absence of the pointer.
[0028]
In step S205, for the child segment of the internal data DA201 corresponding to the XPath, the processing from “start for child segment” is recursively executed. Then, the process proceeds to step S213.
[0029]
In step S206, if the value of the buffer corresponding to the focused XPath in the internal data DA201 is empty, a SELECT statement is issued to the RDB 205 to fill the buffer value. Then, the tag corresponding to the XPath and the buffer value are written in the XML data 203, and the location of interest in the internal data DA201 is advanced to the next (step S207). Then, the process proceeds to step S213.
[0030]
In step S213, it is checked whether the location of interest in the internal data DA201 is the end of the segment. If it is not the end of the segment, the processing from step S212 is repeated. In the case of the end of the segment, the processing from step S203 is repeatedly executed.
[0031]
In the acquisition apparatus 200 according to the present embodiment, when the XML data 203 is acquired from the RDB 205, the XML data 203 is written out as a stream, and the value held in the memory 202 is the size of the structure (DTD) of the XML data 203. Therefore, even if there are a large number of repeated items and the size of the XML data 203 increases, the size of the data stored in the memory 202 is intermediately set to the DTD regardless of the size of the XML data 203. Can be a constant value in the same order as the size of.
[0032]
Next, the operation of this embodiment will be described using specific examples.
[0033]
FIG. 4 shows a specific example of the DTD of XML data and the DB schema of RDB. In the DTD, only the element type declaration part is shown, and the element Item is repeated. The RDB has two tables, a PORequest table and a POItem table.
[0034]
FIG. 5 shows a specific example of the correspondence relationship between tags in XML and DB table columns. In this example, among the XML tags that can contain values, the tags whose Xpath is “/ POReq / PONumber”, “/ POReq / PODate”, “/ POReq / fromRole / BusinessId”, “/ POReq / toRole / BusinessId” Corresponds to the values of the columns POId, Date, From, and To of the PORequest table. In addition, the Xpath included in the tag Item of the XML repeat part is “/ POReq / Item / POItemNumber”, “/ POReq / Item / ProductId”, “/ POReq / Item / Request / Amount”, “/ POReq / Item The value of the tag “/ Request / Price” and the value of the tag whose Xpath is “/ POReq / Location” outside the repeated part are the POItem table columns POId, ItemNumber, PId, Quantity, RequestPrice, Corresponds to the value of Location. Note that the column POId of the PORequest table and the column POId of the POItem table have a primary key and foreign key relationship.
[0035]
FIG. 6 shows a specific example of XML data to be stored. In this example, the repeated items 1 to 3 have a repeated structure.
[0036]
FIG. 7 shows a specific example of internal data. The internal data in this example has a tree structure for the DTD of FIG. 4 representing the structure of the XML data of FIG. In each of the segments 1 and 2, according to the correspondence relationship of FIG. 5, for the XML tag that can contain a value, the XPath, the RDB table name and column name associated therewith, and a buffer for holding the value Is set. Such internal data is created as follows, for example.
[0037]
First, the parent segment 1 is generated. Next, referring to FIG. 5, the first Xpath that can contain the XML value is “/ POReq / PONumber”, which corresponds to the column POId of the PORequest table, so the entry E1 is generated in the parent segment 1. Similarly, entries E2 to E4 are generated. Since the next tag of XML is a repetitive tag Item, a child segment 2 is generated, and an entry E5 in which an Xpath of the tag Item and a pointer to the child segment 2 are set in the parent segment 1 is generated. Next, the process proceeds to the generation of an entry for the child segment 2. Referring to FIG. 5, the column POId of the PORequest table and the column POId of the POItem table have a primary key and foreign key relationship, and therefore the Xpath corresponding to the primary key. Then, an entry E50 having a table and column for storing a foreign key, and a buffer is generated, and then entries E51 to E54 for each Xpath that can contain XML values are generated. Next, returning to the generation of the entry of the parent segment 1, the last Epath entry E6 that can contain the XML value is generated. Here, in the initial state, the buffer of each entry is empty.
[0038]
In the following, the DTD and DB schema in FIG. 4 have the correspondence shown in FIG. 5, the input XML data is shown in FIG. 6, and the internal data as shown in FIG. 7 is prepared. A specific operation of the storage device 100 will be described as an example.
[0039]
The initial state of the internal data DA101 before starting to read the XML data is as shown in FIG. 7, and the top entry E1 of the segment 1 is set as a place of interest (step S101). Next, the location corresponding to XPath “/ POReq / PONumber” corresponding to this location is read from the XML data (step S102). Since the head is a corresponding tag, no error occurs, and since this XPath is not an XPath corresponding to repetition in XML data, the process proceeds to step S105.
[0040]
In step S105, the value “order1” of the corresponding tag of the XML data is stored in the buffer of the corresponding entry E1 of the internal data, and the location where the internal data is focused is advanced. Since the DB column associated with the XPath that has been focused on is not the record of the INSERT statement issued by the descendant segment, the UPDATE statement for this is not issued (step S106). Next, since it is not the end of the segment, the processing from step S102 is repeatedly executed. XPath “/ POReq / PODate”, “/ POReq / fromRole / BusinessId”, “/ POReq / toRole / BusinessId” is similar (step S102, step S105), and the internal data is as shown in FIG. Become.
[0041]
As for the next XPath “/ POReq / Item”, since this XPath corresponds to the repetition in the XML data, the processing of the parent segment before entering the processing based on the child segment 2 (processing of the repeated portion) is performed in step S103. Execute the process. Specifically, an INSERT statement is issued to the PORequest table of the DB based on the value stored in the current internal data segment 1 buffer (step S103). Here, the table to be operated is only the table corresponding to the segment 1 buffer that is not empty. For this reason, only the PORequest table is targeted, and no operation is performed on the POItem table in which the buffer of the entry E6 is empty.
[0042]
Next, the processing from step S102 is recursively executed for the child segment 2 corresponding to this XPath “/ POReq / Item” (step S104).
[0043]
First, the first XPath “/ POReq / PONumber” of child segment 2 corresponds to the XPath of the ancestor segment, not the path below “/ POReq / Item”. In the DB table, the relationship between the primary key and foreign key (This is determined by whether the parent segment has the same Xpath as the Xpath in the child segment.) In this case, the value “order1” stored in the parent segment's buffer is stored in the buffer. Copy (step S109) and proceed to the next XPath “POItemNumber”. That is, if the value of the parent segment buffer is the primary key for associating the parent table and child table of the DB table, the child segment has a corresponding foreign key item in the child table, so copy the value here That is why.
[0044]
Next, as a result of repeatedly executing Step S102 and Step S105 for XPath “POItemNumber”, “ProductId”, “Request / Amout”, “Request / Price” in child segment 2, the internal data is as shown in FIG. .
[0045]
Since this is the end of segment 2, processing at the end of the segment is performed (step S107). In this case, an INSERT statement is issued for the POItem table in the DB based on the value stored in the segment 2 buffer. At this time, since the value corresponding to the column Location of the table POItem table is not yet entered in the buffer of the entry E6, dummy data such as NULL is used for this column.
[0046]
Since the XML data shown in FIG. 6 includes three repeated XPath “/ POReq / Item”, the same thing (step S102, step S105, step S107) is repeated twice more in the POItem table. On the other hand, the INSERT statement is issued two more times, and the process returns from the process for child segment 2 to the process for segment 1.
[0047]
The next XPath of the segment 1 is “/ POReq / Location”. As a result of executing Step S102 and Step S105 with respect to this, the internal data is as shown in FIG. Since “/ POReq / Location” is associated with the DB record column corresponding to segment 2, the value stored in this buffer for the POItem table record for which an INSERT statement has already been issued. Based on the above, an UPDATE statement is issued to the DB POItem table (step S106). Next, execution of step S107 is performed, but step S107 performs processing only when “there is an additional buffer in the segment”, and in this case there is no new addition in the buffer. ,do nothing. This completes the process of storing XML data in the RDB at the end of segment 1. At this time, the data stored in the RDB is as shown in FIG.
[0048]
In the above specific example, the scene where dummy data such as NULL is inserted in step S103, the scene where the UPDATE statement is used in step S103, and the scene where the UPDATE sentence is used in step S107 do not appear. These scenes appear in the following specific examples, for example.
[0049]
For example, consider a case where entry E2 in FIG. 7 is between entries E5 and E6. In such a case, the processing up to the entry E4 of the parent segment 1 is finished, and the buffer of the entry E2 is still empty in step S103 for the parent segment 1 before entering the processing of the repeated portion. Dummy data such as NULL is entered. Further, when the processing of the child segment 1 is finished and the processing of the entry E2 is started, the value is entered in the buffer of the entry E2 in step S105. Therefore, in the step S107 when the processing of the parent segment 1 is finished, The entered value is written to column Date of PORequest table using UPDATE statement.
[0050]
In addition, the UPDATE statement is used in step S103 when the parent segment 1 has a plurality of repeated portions. That is, in step S103 for the parent segment when entering the process of the first child segment, the INSERT statement is used in the process of step S103 for the parent segment when entering the process of the second and subsequent child segments. used.
[0051]
Next, the DTD and DB schema in FIG. 4 have the correspondence shown in FIG. 5, and the data stored in the RDB is shown in FIG. 11, and internal data as shown in FIG. 7 is prepared. The specific operation of the acquisition apparatus 200 will be described by taking the case of the case as an example.
[0052]
The initial state of the internal data DA201 before starting to write the XML data is as shown in FIG. 7, and the first entry E1 of the segment 1 in this is set as a place of interest (step S201). Next, a SELECT statement for obtaining the value of the DB column associated with this segment 1 is executed for the PORequest table of the DB having the contents shown in FIG. 11 (step S202). Since a record exists, the process proceeds to step S204 (step S203). By fetching the execution result of the SELECT statement, the buffer values of the entries E1 to E4 of the segment 1 are filled (step S204). At this time, the internal data DA201 is as shown in FIG.
[0053]
Since the first XPath “POReq / PONumber” is not a repeated item, the process proceeds to step S206. Since the buffer of the corresponding entry E1 is not empty, the SELECT statement is not issued (step S206). The tag corresponding to the XPath “POReq / PONumber” of the internal data DA201 and its value are written in the XML data, and the process proceeds to the next XPath (step S207). Here, with respect to the end tag of XML when writing to XML data, the writing is delayed until the portion surrounded by the tag is closed.
[0054]
Next, as a result of repeating the same for XPath “/ POReq / POData”, “/ POReq / fromRole / BusinessId”, “/ POReq / toRole / BusinessId” (Step S207), XPath “ The XML data up to “/ POReq / Item” is exported.
[0055]
Since the next XPath “/ POReq / Item” corresponds to the repetition in the XML data, the process from “start with child segment” is recursively executed for child segment 2 corresponding to XPath “/ POReq / Item”. (Step S205). XPath ”/ POReq / PONumber” of child segment 2 corresponds to the XPath of the ancestor segment, not the path below “/ POReq / Item”, and has a primary key and foreign key relationship in the DB table. In this case, the value “order1” stored in the buffer of entry E1 of the parent segment is copied to the buffer of entry E50, and the process proceeds to XPath “POItemNumber” (step S208). Next, a SELECT statement for acquiring the value of the DB column associated with this segment 2 is executed on the POItem table of the DB having the contents shown in FIG. 11 (step S202). Since a record exists, the process proceeds to step S204 (step S203). By fetching the execution result of the SELECT statement, the buffer values of the entries E51 to E54 of the segment 2 are filled (step S204).
[0056]
Next, step S207 is repeatedly executed for XPath “POItemNumber”, “ProductId”, “Request / Amout”, “Request / Price”. As a result, the first of the repeated items corresponding to XPath “POReq / Item” is XML. Written to the data. Since this is the end of segment 2, the processing from step S203 is repeated. Since the POItem table of the DB shown in FIG. 11 includes three records, the same thing (step S203, step S204, step S207) is repeated two more times, and the contents corresponding to the remaining two repetition items are expressed as XML. The data is written, and the process returns to the segment 1 process from the child segment 2 process.
[0057]
The next XPath of segment 1 is “/ POReq / Location”, and the buffer of the entry E6 corresponding to this is empty, so a SELECT statement is issued and fetched into the POItem table of the DB to fill the buffer (step S206), step S207 Is executed and the corresponding contents are written to the XML data. This completes the process of acquiring XML data from the RDB. At this point, the internal data DA201 is as shown in FIG. 13, and the written XML data is the same as that shown in FIG.
[0058]
Although the embodiments of the present invention have been described above, the present invention is not limited to the above examples, and various other additions and modifications can be made. For example, in FIG. 1, the internal data DA101 and the internal data DA201 are provided in the storage device 101 and the acquisition device 201, respectively. However, the XML data having the same structure is the same in the storage device 101 and the acquisition device 201. Therefore, if storage and acquisition are not performed at the same time, one internal data may be provided in common between the storage device 101 and the acquisition device 201. In this case, the storage device 101 and the acquisition device 201 may be combined and realized as one device as the storage / acquisition device.
[0059]
【The invention's effect】
As described above, according to the present invention, when the XML data is stored in the RDB and the XML data is acquired from the RDB, the amount of used memory becomes the size of the DTD no matter how large the size of the XML data is. There is an effect that it is suppressed to a proportional size and can be suppressed to a constant value in the same order as the size of the DTD regardless of the size of the XML data. The reason is that while the existing XML processing system requires a memory capacity proportional to the size of the XML data, the present invention has only internal data in proportion to the size of the DTD in the memory, and other data is This is because if it is stored in the DB, it will be written to the DB, and when it is extracted from the DB, it will be written to the stream that creates the XML data.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.
FIG. 2 is a flowchart showing an operation of a storage unit for storing XML data in an RDB according to the embodiment of this invention.
FIG. 3 is a flowchart showing an operation of a means for acquiring XML data from an RDB according to the embodiment of this invention.
FIG. 4 is a diagram illustrating a specific example of DTD and DB schema information.
FIG. 5 is a diagram illustrating a specific example of a correspondence relationship between a tag in XML and a column of a DB table.
FIG. 6 is a diagram illustrating a specific example of XML data.
FIG. 7 is a diagram illustrating a specific example of internal data in an initial state.
FIG. 8 is a diagram showing a state of internal data while XML data is stored in the RDB.
FIG. 9 is a diagram illustrating a state of internal data while XML data is stored in the RDB.
FIG. 10 is a diagram showing a state of internal data while XML data is stored in an RDB.
FIG. 11 is a diagram showing the contents of an RDB after storing XML data.
FIG. 12 is a diagram showing a state of internal data while XML data is being extracted from the RDB.
FIG. 13 is a diagram showing a state of internal data while XML data is being extracted from the RDB.
[Explanation of symbols]
100 XML data storage device in DB
101 Means for storing XML data in DB
102 Internal data
103 Input XML data
104 Input device
106 RDB
110 Recording medium
200 XML data acquisition device from DB
201 XML data acquisition means from DB
202 Internal data
203 Acquired XML data
204 Output device
205 RDB
210 Recording medium

Claims (6)

格納対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、格納対象となる前記 XML データからタグの値を読み込んで該タグの XPath を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したタグの値を、該タグの XPath を含む前記組み合わせ中の前記 RDB のテーブル名及びカラム名で特定される前記 RDB のテーブルのカラムに対して書き込むことにより、前記XMLデータを前記RDBへ格納する格納手段とを備え
前記格納手段は、前記XMLデータの繰り返し部分については、1つの繰り返し部分毎に、タグの値をバッファに蓄積した時点で前記RDBの当該繰り返し部分のタグの値を格納するテーブルに対して、レコード中の値が未だ定まっていないカラムにはダミーの値を使用したINSERT文を発行してレコードを挿入する手段と、前記ダミーの値を書き出したカラムの値に対応するタグの値を前記XMLデータから読み出したときにUPDATE文を発行して前記レコードを更新する手段とを含むことを特徴とするXMLデータのRDBへの格納装置。
The structure of the XML data to be stored target defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, A memory for storing internal data having a combination with a buffer for holding a value and having only one set of the combination regardless of the actual number of repetitions for a tag with one or more repetition designations, and a storage target read the tag value from the XML data to be stored in said buffer in said combination comprising XPath of the tag, the tag value stored in the buffer, the RDB in the combination comprising XPath of the tag by writing to the column of the table of the RDB specified by the table names and column names, and a storage means for storing the XML data into the RDB,
The storage means records, with respect to a repeated portion of the XML data, a record for a table that stores the tag value of the repeated portion of the RDB at the time when the tag value is accumulated in the buffer for each repeated portion. A means for inserting a record by issuing an INSERT statement using a dummy value for a column whose value is not yet determined, and a tag value corresponding to the column value in which the dummy value is written out And a means for updating the record by issuing an UPDATE statement when read from the XML data storage device in the RDB.
取得対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、前記 RDB のテーブルのカラムの値を読み出して該テーブル名及びカラム名を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したカラムの値を、該テーブル名及びカラム名を含む前記組み合わせ中の前記 XPath で特定される前記タグの値として前記 XML データに書き出すことにより、前記RDBから前記XMLデータを取得する取得手段とを備え
前記取得手段は、前記XMLデータの繰り返し部分については、当該繰り返し部分のタグの値を格納するテーブルに対してSELECT文を発行し、1レコード毎に、当該レコード中のカラムの値を該当するバッファに蓄積した後、当該繰り返し部分のタグに対応する値を前記バッファから読み出して前記XMLデータのストリームに書き出す処理を繰り返す手段を含むことを特徴とするRDBからのXMLデータの取得装置。
The structure of the XML data to be acquired object defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, It has a combination of a buffer to hold the values for the tags that 1 or more times specified a memory for storing the internal data having the combination of only one set amount regardless of its actual number of iterations, the RDB The column value of the table is read and stored in the buffer in the combination including the table name and the column name, and the column value stored in the buffer is stored in the buffer in the combination including the table name and the column name. An acquisition means for acquiring the XML data from the RDB by writing to the XML data as the value of the tag specified by XPath ;
For the repetitive part of the XML data, the acquisition unit issues a SELECT statement to the table storing the tag value of the repetitive part, and for each record, the value of the column in the record corresponds to the corresponding buffer. An apparatus for acquiring XML data from an RDB, comprising: means for repeating a process of reading a value corresponding to the tag of the repetitive portion from the buffer and writing the value to the XML data stream after being stored in the RDB.
格納対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、格納手段とを備えたコンピュータにおける XML データの RDB への格納方法であって、
前記格納手段が、格納対象となる前記 XML データからタグの値を読み込んで該タグの XPath を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したタグの値を、該タグの XPath を含む前記組み合わせ中の前記 RDB のテーブル名及びカラム名で特定される前記 RDB のテーブルのカラムに対して書き込むことにより、前記XMLデータを前記RDBへ格納する格納ステップを有し、且つ、
前記格納ステップは、前記XMLデータの繰り返し部分については、1つの繰り返し部分毎に、タグの値をバッファに蓄積した時点で前記RDBの当該繰り返し部分のタグの値を格納するテーブルに対して、レコード中の値が未だ定まっていないカラムにはダミーの値を使用したINSERT文を発行してレコードを挿入するステップと、前記ダミーの値を書き出したカラムの値に対応するタグの値を前記XMLデータから読み出したときにUPDATE文を発行して前記レコードを更新するステップとを含むことを特徴とするXMLデータのRDBへの格納方法。
The structure of the XML data to be stored target defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, A memory for storing internal data having a combination with a buffer for holding a value and having only one set of the combination regardless of the actual number of repetitions of a tag having one or more repetition designations; A method for storing XML data in an RDB on a computer equipped with
The storage means reads a tag value from the XML data to be stored, stores the tag value in the buffer in the combination including the tag XPath , and stores the tag value stored in the buffer as the tag XPath . A storage step of storing the XML data in the RDB by writing to the column of the RDB table specified by the table name and column name of the RDB in the combination including , and
In the storage step, for each repetition part of the XML data, a record is stored in the table that stores the tag value of the repetition part of the RDB when the tag value is accumulated in the buffer for each repetition part. Issue a INSERT statement using a dummy value to insert a record for a column whose value is not yet determined, and insert the record corresponding to the column value in which the dummy value was written out into the XML data A method of storing XML data in an RDB, comprising: issuing an UPDATE statement when reading from the database and updating the record.
取得対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリと、取得手段とを備えたコンピュータにおける RDB からの XML データの取得方法であって、
前記取得手段が、前記 RDB のテーブルのカラムの値を読み出して該テーブル名及びカラム名を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したカラムの値を、該テーブル名及びカラム名を含む前記組み合わせ中の前記 XPath で特定される前記タグの値として前記 XML データに書き出すことにより、前記RDBから前記XMLデータを取得する取得ステップを有し、且つ、
前記取得ステップは、前記XMLデータの繰り返し部分については、当該繰り返し部分のタグの値を格納するテーブルに対してSELECT文を発行し、1レコード毎に、当該レコード中のカラムの値を該当するバッファに蓄積した後、当該繰り返し部分のタグに対応する値を前記バッファから読み出して前記XMLデータのストリームに書き出す処理を繰り返すステップを含むことを特徴とするRDBからのXMLデータの取得方法。
The structure of the XML data to be acquired object defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, A memory for storing internal data having a combination with a buffer for holding a value and storing only one set of the combination for a tag with one or more repetition designations regardless of the actual number of repetitions; A method for acquiring XML data from an RDB on a computer equipped with
The acquisition unit reads the column value of the RDB table, stores the value in the buffer including the table name and the column name, and stores the column value stored in the buffer with the table name and the column name. An acquisition step of acquiring the XML data from the RDB by writing to the XML data as the value of the tag specified by the XPath in the combination including , and
For the repetitive part of the XML data, the acquisition step issues a SELECT statement to the table storing the tag value of the repetitive part, and for each record, the buffer value corresponding to the column value in the record is issued. A method for acquiring XML data from an RDB, comprising: a step of repeatedly storing a value corresponding to a tag of the repetitive portion from the buffer and writing the value to the XML data stream after being stored in the RDB.
格納対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリを備えたコンピュータを、
格納対象となる前記 XML データからタグの値を読み込んで該タグの XPath を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したタグの値を、該タグの XPath を含む前記組み合わせ中の前記 RDB のテーブル名及びカラム名で特定される前記 RDB のテーブルのカラムに対して書き込むことにより、前記XMLデータを前記RDBへ格納する格納手段であって、前記XMLデータの繰り返し部分については、1つの繰り返し部分毎に、タグの値をバッファに蓄積した時点で前記RDBの当該繰り返し部分のタグの値を格納するテーブルに対して、レコード中の値が未だ定まっていないカラムにはダミーの値を使用したINSERT文を発行してレコードを挿入する手段と、前記ダミーの値を書き出したカラムの値に対応するタグの値を前記XMLデータから読み出したときにUPDATE文を発行して前記レコードを更新する手段とを含む格納手段として機能させるプログラム。
The structure of the XML data to be stored target defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, A computer having a combination with a buffer for holding a value, and a memory for storing internal data having a combination of only one set for a tag with one or more repetition designations regardless of the actual number of repetitions The
Read the tag value from the XML data to be stored target stored in said buffer in said combination comprising XPath of the tag, the tag value stored in the buffer, in said combination comprising XPath of the tag by writing to the column of the table of the RDB specified by the table name and column names of the RDB, a storage means for storing the XML data into the RDB, the repeating portion of the XML data, 1 For each repeating part, when a tag value is accumulated in the buffer, a dummy value is assigned to a column in which the value in the record is not yet determined for the table storing the tag value of the repeating part of the RDB. Issuing the used INSERT statement to insert a record, and when reading the value of the tag corresponding to the column value in which the dummy value was written out from the XML data A program that functions as a storage means including a means for issuing an UPDATE statement to update the record.
取得対象となるXMLデータの構造を表すデータで定義された、値が入りうる XML のタグ毎に、該タグの XPath と、該タグと対応付けられている RDB のテーブル名及びカラム名と、値を保持するバッファとの組み合わせを有し、1回以上の繰り返し指定のあるタグについてはその実際の繰り返し数に関わらず一組分だけの前記組み合わせを有する内部データを記憶するメモリを備えたコンピュータを、
前記 RDB のテーブルのカラムの値を読み出して該テーブル名及びカラム名を含む前記組み合わせ中の前記バッファに記憶し、該バッファに記憶したカラムの値を、該テーブル名及びカラム名を含む前記組み合わせ中の前記 XPath で特定される前記タグの値として前記 XML データに書き出すことにより、前記RDBから前記XMLデータを取得する取得手段であって、前記XMLデータの繰り返し部分については、当該繰り返し部分のタグの値を格納するテーブルに対してSELECT文を発行し、1レコード毎に、当該レコード中のカラムの値を該当するバッファに蓄積した後、当該繰り返し部分のタグに対応する値を前記バッファから読み出して前記XMLデータのストリームに書き出す処理を繰り返す手段を含む取得手段として機能させるプログラム。
The structure of the XML data to be acquired object defined in the table to the data, for each XML tag value can enter, and XPath of the tag, and table names and column names of the RDB that is associated with the tag, A computer having a combination with a buffer for holding a value, and a memory for storing internal data having a combination of only one set for a tag with one or more repetition designations regardless of the actual number of repetitions The
Stored in said buffer in said combination comprising said table name and column names read the value in the column of the table of the RDB, the value of the column stored in the buffer, in the combination comprising the table name and column names The acquisition means for acquiring the XML data from the RDB by writing to the XML data as the value of the tag specified by the XPath of the XML data, and for the repeated portion of the XML data, Issue a SELECT statement to the table that stores the values, accumulate the column values in the record for each record in the corresponding buffer, and then read the value corresponding to the tag of the repeated part from the buffer. A program that functions as an acquisition unit including a unit that repeats a process of writing to the XML data stream.
JP2002047795A 2002-02-25 2002-02-25 Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program Expired - Fee Related JP4165086B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002047795A JP4165086B2 (en) 2002-02-25 2002-02-25 Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002047795A JP4165086B2 (en) 2002-02-25 2002-02-25 Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program

Publications (2)

Publication Number Publication Date
JP2003248615A JP2003248615A (en) 2003-09-05
JP4165086B2 true JP4165086B2 (en) 2008-10-15

Family

ID=28660765

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002047795A Expired - Fee Related JP4165086B2 (en) 2002-02-25 2002-02-25 Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program

Country Status (1)

Country Link
JP (1) JP4165086B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005088479A1 (en) 2004-03-16 2005-09-22 Turbo Data Laboratories Inc. Method for handling tree-type data structure, information processing device, and program
EP1764710A4 (en) 2004-06-03 2009-03-18 Turbo Data Lab Inc Layout generation method, information processing device, and program
WO2006080268A1 (en) 2005-01-25 2006-08-03 Turbo Data Laboratories Inc. Tree search, totalizing, sort method, information processing device, and tree search, totalizing, and sort program
US8140558B2 (en) 2009-05-22 2012-03-20 International Business Machines Corporation Generating structured query language/extensible markup language (SQL/XML) statements
JP5687219B2 (en) * 2012-01-20 2015-03-18 日本電信電話株式会社 Data search system, data search method, and data search program

Also Published As

Publication number Publication date
JP2003248615A (en) 2003-09-05

Similar Documents

Publication Publication Date Title
US8108773B2 (en) Method and apparatus for generating instances of documents
JP4604041B2 (en) An extension to the SQL language to modify set-valued and scalar-valued columns with a single statement
US8060818B2 (en) Method and apparatus for form adaptation
US6915304B2 (en) System and method for converting an XML data structure into a relational database
RU2004104096A (en) RELATIONSHIP OF DOCUMENT ITEMS WITH RELATED FIELDS, REQUESTS AND / OR PROCEDURES IN THE DATABASE
US20040133854A1 (en) Persistent document object model
US20040167917A1 (en) Database processing method and system
US8200702B2 (en) Independently variably scoped content rule application in a content management system
US8397157B2 (en) Context-free grammar
JP2006525600A5 (en)
JP2008052662A (en) Structured document management system and program
JP2007058623A (en) Data development method and data processing method for structured document
JP2005234837A (en) Structured document processing method, structured document processing system and its program
JP3205406B2 (en) Reference target variable determination processing method and translation processing system
Thao et al. Using versioned tree data structure, change detection and node identity for three-way xml merging
JP4165086B2 (en) Apparatus and method for storing XML data in RDB, apparatus and method for acquiring XML data from RDB, and program
US6763358B2 (en) Method and system for activating column triggers in a database management system
JP3763982B2 (en) Database processing method, apparatus for implementing the same, and medium on which processing program is recorded
US20080243904A1 (en) Methods and apparatus for storing XML data in relations
CN112783927A (en) Database query method and system
JP4234698B2 (en) Structured document processing system
CN114816247A (en) Logic data acquisition method and device
US20110185274A1 (en) Mark-up language engine
JP4242701B2 (en) Storage search device, storage search program, and storage search program recording medium
JP2004021551A (en) System, method, program, and recording medium for file conversion

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080613

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: 20080708

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: 20080721

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4165086

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120808

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130808

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees