JP2001331479A - Xml data conversion system and xml data conversion method - Google Patents

Xml data conversion system and xml data conversion method

Info

Publication number
JP2001331479A
JP2001331479A JP2000150400A JP2000150400A JP2001331479A JP 2001331479 A JP2001331479 A JP 2001331479A JP 2000150400 A JP2000150400 A JP 2000150400A JP 2000150400 A JP2000150400 A JP 2000150400A JP 2001331479 A JP2001331479 A JP 2001331479A
Authority
JP
Japan
Prior art keywords
dtd
xml
data
graph
conversion method
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.)
Granted
Application number
JP2000150400A
Other languages
Japanese (ja)
Other versions
JP3583688B2 (en
Inventor
Shuichi Nishioka
秀一 西岡
Makoto Onizuka
真 鬼塚
Shiro Kasuga
史朗 春日
Takashi Hozai
崇 芳西
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2000150400A priority Critical patent/JP3583688B2/en
Publication of JP2001331479A publication Critical patent/JP2001331479A/en
Application granted granted Critical
Publication of JP3583688B2 publication Critical patent/JP3583688B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an XML conversion system provided with a function for preserving the structure of XML requested in an XML data base without degrading retrieval performance. SOLUTION: A data base management system is provided with a flattening means (62) for flattening DTD before flattening for stipulating the XML and generating the DTD after flattening, a DTD graph preparation means (63) for preparing a DTD graph from the DTD after flattening, a schemer preparation means (64) for preparing the schemer of an object relational model from the DTD graph, a verified XML preparation means (65) for preparing the XML already verified for the DTD after flattening and an object relational model data preparation means (66) for preparing the data of the object relational model from the verified XML.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、情報流通における
データ変換形式として有望である妥当なXMLのデータ
変換方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a valid XML data conversion method which is promising as a data conversion format in information distribution.

【0002】[0002]

【従来の技術】妥当なXML(http://www.w3c.org/XML
/)をデータベース管理システムに格納する場合、XM
Lをリレーショナルモデルへ変換する方法が従来考えら
れている。
2. Description of the Related Art Valid XML (http://www.w3c.org/XML)
/) Is stored in the database management system, XM
Conventionally, a method of converting L into a relational model has been considered.

【0003】XMLをリレーショナルモデルへ変換する
には、第一に、XMLを規定するDTDを平坦化させ、
つぎに、平坦後のDTDを木構造のグラフ(DTDグラ
フ)へ変換する。該DTDグラフを生成後、リレーショ
ナルモデルを作成する方法は2通りある。
In order to convert XML to a relational model, first, the DTD that defines XML is flattened,
Next, the flattened DTD is converted into a tree-structured graph (DTD graph). After generating the DTD graph, there are two methods for creating a relational model.

【0004】たとえば、図1に示すような妥当なXML
をリレーショナルモデルに変換する場合、これらの2通
りの手法により、図2に示す2種類(図中(1)と
(2))のスキーマが作成され得る。これら2種類のス
キーマを生成する過程の処理の一部を図3,4に示す。
図3は第1の方法を示し、図4は第2の方法を示す。
For example, an appropriate XML as shown in FIG.
Is converted into a relational model, two types of schemas ((1) and (2) in the figure) shown in FIG. 2 can be created by these two methods. FIGS. 3 and 4 show a part of the process of generating these two types of schemas.
FIG. 3 shows the first method, and FIG. 4 shows the second method.

【0005】第1の方法(図3)では、あるノードが参
照されている数によって、定義を行う(S31)。ノー
ドが参照されている数が「0」の場合は、テーブル定義
する(S35)。一方、該参照されている数が「1」の
場合は、上位(親)のテーブルのDB属性として定義する
(S34)。ただし、該ノードとその親ノードとの関係
において“*”や“+”の参照関係がある場合は、デー
タベース属性とせず単独でテーブル定義する(S3
3)。また、該ノードへの参照数が「2」以上の場合
は、該ノードをテーブル定義する(S32,S35)。
In the first method (FIG. 3), a definition is made according to the number of times a certain node is referred to (S31). If the number of nodes referred to is "0", a table is defined (S35). On the other hand, if the number referred to is “1”, it is defined as the DB attribute of the upper (parent) table (S34). However, if there is a reference relationship of “*” or “+” in the relationship between the node and its parent node, the table is defined independently without using the database attribute (S3).
3). If the number of references to the node is "2" or more, the node is defined in a table (S32, S35).

【0006】以上より、図2における(1)のスキーマ
が生成される。
As described above, the schema of (1) in FIG. 2 is generated.

【0007】つぎに、第2の方法(図4)は、方法1と
ほぼ同様であるが、該ノードへの参照数が「2」以上の
場合でも、参照関係が“*”や“+”であるものがひと
つもない場合は上位のテーブルのDB属性として定義す
る(S44,S46)点で異なっている。
Next, the second method (FIG. 4) is almost the same as the method 1, but the reference relation is "*" or "+" even when the number of references to the node is "2" or more. If there is no such item, it is defined as the DB attribute of the upper table (S44, S46).

【0008】かかる第2の方法によれば、図2(2)に
示されるようなスキーマが生成される。
According to the second method, a schema as shown in FIG. 2 (2) is generated.

【0009】しかし、上記図2(1)と(2)に示されるいず
れのスキーマもXMLの木構造を示すノードやラインに
相当する情報を保存していないため、構造を含んだまま
XMLデータを格納することが困難であった。
However, none of the schemas shown in FIGS. 2 (1) and 2 (2) store information corresponding to nodes and lines indicating an XML tree structure. It was difficult to store.

【0010】図5に示す簡易な問い合わせ時も、最初に
「author」テーブルを検索して「lastnam
e」に該当する「authorID」を見つけ、次に
「paper」テーブルを検索し、前記「author
ID」に該当する「title」を選択するため、性能
に影響を及ぼす結合処理が頻繁に発生する可能性があっ
た。
At the time of a simple inquiry shown in FIG. 5, the "author" table is searched first, and "lastnam" is searched.
e ”, find“ authorID ”corresponding to“ e ”, then search the“ paper ”table,
Since "title" corresponding to "ID" is selected, there is a possibility that a coupling process that affects performance frequently occurs.

【0011】[0011]

【発明が解決しようとする課題】本発明の目的は、XM
Lデータベースで要求される、XMLの構造を保存し、
検索性能を劣化させない機能を含むXMLの変換方式を
実現することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an XM
Save the XML structure required by the L database,
An object of the present invention is to realize an XML conversion method including a function that does not deteriorate search performance.

【0012】[0012]

【課題を解決するための手段】本発明は、妥当なXML
を規定するDTDを平坦化し、平坦後のDTDに対して
検証済みのXMLをオブジェクトリレーショナルモデル
へ変換し、変換後のデータをデータベース管理システム
へ格納することを主要な特徴とする。
SUMMARY OF THE INVENTION The present invention provides a method for validating XML.
The main features of the present invention are to flatten the DTD that defines, to convert the verified XML for the flattened DTD to an object-relational model, and to store the converted data in the database management system.

【0013】DTDの平坦化工程は従来技術とほぼ同様
であるが、平坦後のDTDおよび検証済みのXMLをデ
ータベース管理システムに格納するデータへ変換する方
式が異なる。
The flattening process of the DTD is almost the same as that of the prior art, but the method of converting the flattened DTD and the verified XML into data to be stored in the database management system is different.

【0014】[0014]

【発明の実施の形態】まず、本発明の原理を図6,7,
8,9,10,11,12を用いて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, the principle of the present invention will be described with reference to FIGS.
This will be described using 8, 9, 10, 11, and 12.

【0015】図6は、本発明の原理を説明するための図
である。図6において、DTDおよび妥当なXMLが、
本発明にかかるデータ変換方法を実行するデータ変換方
式機構61に渡されると、該データ変換方式機構61は
本発明にかかるデータ変換方法を実行しオブジェクトリ
レーショナルスキーマおよびオブジェクトリレーショナ
ルデータを生成する。
FIG. 6 is a diagram for explaining the principle of the present invention. In FIG. 6, the DTD and valid XML are:
When passed to the data conversion method mechanism 61 that executes the data conversion method according to the present invention, the data conversion method mechanism 61 executes the data conversion method according to the present invention and generates an object-relational schema and object-relational data.

【0016】図6に示されるように、該データ変換方式
機構61は、XMLを規定する平坦化前のDTDを平坦
化し、平坦後のDTDを生成する平坦化手段62と、該
平坦後のDTDからDTDグラフを作成する、DTDグ
ラフ作成手段63と、該DTDグラフからオブジェクト
リレーショナルモデルのスキーマを作成する、スキーマ
作成手段64と、前記平坦後のDTDに対して検証済み
となるXMLを作成する検証済XML作成手段65と、
該検証済みとなるXMLからオブジェクトリレーショナ
ルモデルのデータを作成するオブジェクトリレーショナ
ルモデルデータ作成手段66とを備えている。
As shown in FIG. 6, the data conversion method mechanism 61 flattens a DTD before flattening, which defines XML, generates a flattened DTD, and a flattened DTD. A DTD graph creation unit 63 for creating a DTD graph from the DTD graph, a schema creation unit 64 for creating a schema of an object relational model from the DTD graph, and a validation for creating an XML that has been validated for the flattened DTD. XML creation means 65,
An object-relational model data creating unit 66 for creating object-relational model data from the verified XML.

【0017】なお、これら手段62から66は、それぞ
れの処理を実行するためのプログラムを格納した記憶装
置と、該記憶装置に接続され、該プログラムに基づいて
処理を実行するプロセッサとからなり、これら手段62
から66の記憶装置およびプロセッサはそれぞれ独立し
たものでなくても良く、たとえばこれら手段が1つの記
憶手段と一つのプロセッサを共用するように構成されて
も良い。該記憶装置はたとえば、ROM,RAM,CD
−ROM,MO,磁気記憶装置などデータの記憶および
再生可能な全ての形式の記憶装置であって良い。また、
該プロセッサは、たとえば一般に市場に供されているマ
イクロプロセッサで構成されて良い。
Each of these means 62 to 66 comprises a storage device storing a program for executing each process, and a processor connected to the storage device and executing a process based on the program. Means 62
To 66 may not be independent from each other. For example, these units may be configured to share one processor with one storage unit. The storage device is, for example, ROM, RAM, CD
-All types of storage devices capable of storing and reproducing data, such as ROM, MO, and magnetic storage devices, may be used. Also,
The processor may be constituted, for example, by a microprocessor generally available on the market.

【0018】つぎに、上記手段62から66のそれぞれ
において行われる処理工程について説明する。
Next, the processing steps performed in each of the means 62 to 66 will be described.

【0019】まず、平坦化手段62において行われる処
理工程について述べる。
First, the processing steps performed in the flattening means 62 will be described.

【0020】該平坦化手段62は、XMLを規定するD
TDを平坦化する。図7は、平坦化するパターンを示し
ている。本平坦化手段では、平坦化する必要が無いDT
Dの場合は処理を行わない。該平坦手段62では、図7
の「元」から「変換後」となるように、タグの内容モデ
ルを展開する。すなわち、省略記号「?」を除去し、繰
返し記号「+」を記号「*」で統一し、入れ子を展開
し、選択「|」は双方「、」を表現し、同一タグは繰返
しで統一する。
The flattening means 62 has a D
Flatten TD. FIG. 7 shows a pattern to be flattened. In this flattening means, there is no need to flatten DT
In the case of D, no processing is performed. In the flattening means 62, FIG.
The content model of the tag is expanded so that it changes from “source” to “after”. That is, the abbreviation "?" Is removed, the repetition symbol "+" is unified with the symbol "*", nesting is expanded, the selection "|" expresses both ",", and the same tag is unified repeatedly. .

【0021】以上の平坦化処理をフローチャートを図8
に示す。図8に示すように、まずタグの内容モデルのう
ち、「|」を「、」に置換する(S81)。つぎに、該
内容モデルにおいて、「?」を削除する(S82)。つ
ぎに、該内容モデルにおいて、「+」を「*」に置換す
る(S83)。つぎに、該内容モデルにおいて、括弧を
展開する(S84)。最後に、該内容モデルにおいて、
同一参照をまとめる(S85)。
FIG. 8 is a flowchart showing the above-described flattening process.
Shown in As shown in FIG. 8, first, in the content model of the tag, “|” is replaced with “,” (S81). Next, "?" Is deleted from the content model (S82). Next, “+” is replaced with “*” in the content model (S83). Next, parentheses are developed in the content model (S84). Finally, in the content model:
The same reference is put together (S85).

【0022】つぎに、DTDグラフ作成手段63におい
て行われる処理工程について述べる。
Next, the processing steps performed in the DTD graph creating means 63 will be described.

【0023】DTDグラフ作成手段63は、前記平坦化
手段62により作成された、平坦後のDTDから木構造
グラフ(DTDグラフ)を作成する。該DTDグラフを
作成する処理工程を図示するフローチャートを図9に示
す。該処理工程において、まず、平坦後のDTDの各エ
レメントにおいて、エレメントに属性があるかどうかを
調べる(S91)。エレメントに属性がある場合には、
該属性をエレメントの子ノードにする(S92)。エレ
メントに属性がない場合、または前記処理S92におい
てタグと属性をノードへ該属性をエレメントの子ノード
にした場合、そのエレメントの内容モデルに参照エレメ
ントがあるか否かを調べる(S93)。そのエレメント
の内容モデルに参照エレメントがある場合には、該内容
モデルの全エレメントを子ノードにし、記号「*」を該
当親ノードと子ノード間のラインに付記する(S9
4)。処理S93において参照エレメントが無い場合、
または処理S94を行った場合は、DTDグラフ作成手
段63において行われる処理工程が終了する。この処理
により、タグ間の参照をリンクへ、タグ間の関係をリン
クの関係へ変換される。
The DTD graph creating means 63 creates a tree structure graph (DTD graph) from the flattened DTD created by the flattening means 62. FIG. 9 is a flowchart illustrating processing steps for creating the DTD graph. In this processing step, first, it is checked whether or not each element of the flattened DTD has an attribute (S91). If the element has attributes,
The attribute is set as a child node of the element (S92). When the element has no attribute, or when the tag and the attribute are set to the node in the processing S92, and the attribute is set as the child node of the element, it is checked whether or not the content model of the element has a reference element (S93). If there is a reference element in the content model of the element, all elements of the content model are set as child nodes, and the symbol "*" is added to the line between the parent node and the child node (S9).
4). If there is no reference element in process S93,
Alternatively, when the process S94 has been performed, the processing steps performed in the DTD graph creating means 63 are completed. By this processing, the reference between the tags is converted into the link, and the relation between the tags is converted into the link relation.

【0024】つぎに、スキーマ作成手段64により行わ
れる処理工程について説明する。
Next, the processing steps performed by the schema creation means 64 will be described.

【0025】スキーマ作成手段64は、前記DTDグラ
フ作成手段63によって作成されたDTDグラフからオ
ブジェクトリレーショナルモデルのスキーマを作成す
る。該スキーマ作成を行う処理工程をフローチャートを
図10に示す。図10に示すように、まず該DTDグラ
フにおいて、ノードがリーフノードであるかリーフノー
ド以外(トップノードおよび中間ノード)であるかを調
べる(S101)。該処理S101において、ノードが
リーフノードであれば処理工程を終了する。一方、リー
フノード以外(トップノードおよび中間ノード)であれ
ば、該ノードをクラス定義する(S102)。つぎに、
クラス定義した該ノードの直下ノード群をDB属性とし
て定義する。このとき、直下ノードとの関係が「*」で
ある場合は、該直下ノードはsequence型DB属
性として定義する。また、直下ノードがリーフノードの
場合は、「string」か「int」か「floa
t」のDB属性として定義し、それ以外は、objec
t参照のDB属性として定義する。(S103)。つぎ
に、該ノードに親ノードがあるか否かを調べる(S10
4)。親ノードがある場合は、親ノードをあらわすクラ
スへの参照属性を定義する。クラス定義したノードに親
ノードが存在する場合は、親ノードに該当するクラスを
参照するDB属性を定義する。(S105)。親ノード
が無い場合、および処理工程S105において参照属性
を定義した場合は、該スキーマ作成を行う処理を終了す
る。
The schema creating means 64 creates a schema of the object relational model from the DTD graph created by the DTD graph creating means 63. FIG. 10 is a flowchart showing the processing steps for creating the schema. As shown in FIG. 10, first, it is checked whether the node is a leaf node or a node other than a leaf node (top node and intermediate node) in the DTD graph (S101). In step S101, if the node is a leaf node, the process ends. On the other hand, if the node is other than the leaf node (top node and intermediate node), the node is defined as a class (S102). Next,
A group of nodes immediately below the node for which the class is defined is defined as a DB attribute. At this time, if the relationship with the immediate node is “*”, the immediate node is defined as a sequence type DB attribute. If the immediate node is a leaf node, “string”, “int”, or “floor”
t ”, and the rest are objectc
It is defined as a t-reference DB attribute. (S103). Next, it is checked whether or not the node has a parent node (S10).
4). If there is a parent node, define a reference attribute to the class representing the parent node. If a parent node exists in the node where the class is defined, a DB attribute that refers to the class corresponding to the parent node is defined. (S105). When there is no parent node, and when the reference attribute is defined in the processing step S105, the process of creating the schema ends.

【0026】つぎに、検証済XML作成手段65により
行われる処理工程について説明する。
Next, the processing steps performed by the verified XML creating means 65 will be described.

【0027】検証済XML作成手段65は、平坦化前の
DTDに検証済みであるXMLを平坦後のDTDに対し
て検証済みのXMLとなるように変換することによっ
て、平坦後のDTDに対して検証済みとなるXMLを作
成する。該検証済みとなるXMLを作成する処理工程を
あらわしたフローチャートを図11に示す。まず、変換
前のXMLデータ、および平坦化手段62にて作成され
た平坦後のDTDを読み込む(S111)。変換前のX
MLデータにおけるタグ、親タグを各々取得する(S1
12)。それらを平坦後のDTDと比較し、平坦後のD
TDにあわせてタグ、親タグを再配置する(S113)
ことにより、変換前のXMLデータを検証済みの構造を
有するXMLデータ(検証済みXMLデータ)へ変換す
る(S114)。
The verified XML creating means 65 converts the XML, which has been verified to the DTD before flattening, into the XML, which has been verified for the DTD after flattening, to thereby convert the DTD after flattening. Create XML that has been verified. FIG. 11 is a flowchart showing processing steps for creating the verified XML. First, the XML data before conversion and the DTD after flattening created by the flattening means 62 are read (S111). X before conversion
Acquire the tag and the parent tag in the ML data (S1
12). They are compared with the flattened DTD and the flattened DTD
Relocate tags and parent tags according to TD (S113)
As a result, the XML data before conversion is converted into XML data having a verified structure (verified XML data) (S114).

【0028】最後に、オブジェクトリレーショナルモデ
ルデータ作成手段66により行われる処理工程について
説明する。
Finally, the processing steps performed by the object relational model data creating means 66 will be described.

【0029】該オブジェクトリレーショナルモデルデー
タ作成手段66は、該検証済XMLからオブジェクトリ
レーショナルモデルのデータを作成する。該オブジェク
トリレーショナルモデルのデータを作成する処理工程を
示すフローチャートを図12に掲げる。
The object-relational model data creating means 66 creates object-relational model data from the verified XML. FIG. 12 is a flowchart showing the processing steps for creating the data of the object relational model.

【0030】まず、検証済XML作成手段65により作
成された検証済XMLデータを読み込む(S121)。
つぎに、該検証済XMLデータから、タグ名、親タグ名
を取得する(S122)。つぎに、前記スキーマ作成手
段64により作成されたスキーマ(オブジェクトリレー
ショナルモデルのスキーマに該当する)を参照し、XM
Lデータのタグと親タグの情報から該当する型を取得す
る(S123)。S122において取得したタグ名、親
タグ名に該当する型を与えることによって、オブジェク
トリレーショナルモデルのデータを作成する(S12
4)。
First, the verified XML data created by the verified XML creating means 65 is read (S121).
Next, a tag name and a parent tag name are acquired from the verified XML data (S122). Next, referring to the schema (corresponding to the schema of the object relational model) created by the schema creating means 64, the XM
The corresponding type is acquired from the tag of the L data and the information of the parent tag (S123). By giving a type corresponding to the tag name and parent tag name acquired in S122, data of the object relational model is created (S12
4).

【0031】上記各手段により得られた該スキーマ、デ
ータを用いて、データベース67(図1参照)を構築す
る。
A database 67 (see FIG. 1) is constructed using the schema and data obtained by the above means.

【0032】[0032]

【実施例】図1,13,14,15,16に基づいて実
施例を説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment will be described with reference to FIGS.

【0033】図1のDTDおよび妥当なXMLを入力対
象とした場合を例にとって実施例を説明する。
The embodiment will be described by taking as an example a case where the DTD and the valid XML in FIG. 1 are input objects.

【0034】図1に示すようなDTDおよび妥当なXM
Lを前記平坦化手段62およびDTDグラフ作成手段6
3が、図8および図9に示す処理工程を実行すると、図
13に示すような、DTDグラフが作成される。
DTD and reasonable XM as shown in FIG.
Let L be the flattening means 62 and the DTD graph creating means 6
3 executes the processing steps shown in FIGS. 8 and 9, a DTD graph as shown in FIG. 13 is created.

【0035】本DTDグラフを基に、スキーマ作成手段
64が図10に示されるような処理工程を行い、オブジ
ェクトリレーショナルモデルへ変換すると図14に示す
スキーマが作成される。本スキーマでは、DTDグラフ
におけるリンクがオブジェクト参照属性として表現さ
れ、ノードがクラスとして表現されているため、リレー
ショナルモデルのスキーマと比べ、XMLの構造を保存
可能となることがわかる。
Based on this DTD graph, the schema creating means 64 performs the processing steps shown in FIG. 10 and converts it into an object-relational model to create the schema shown in FIG. In this schema, since the link in the DTD graph is expressed as an object reference attribute and the node is expressed as a class, it can be understood that the XML structure can be stored as compared with the schema of the relational model.

【0036】また、検証済XML作成手段65が図11
に示されるような処理工程を行うことにより、平坦処理
を行うと図1のDTDとなるXML(図15)に対し、
不足しているemailタグを省略という形式で補充す
ることにより図1のDTDに対し検証済みとなる。
Further, the verified XML creating means 65 corresponds to FIG.
By performing the processing steps as shown in FIG. 1, when the flattening processing is performed, the DTD shown in FIG.
By replenishing the missing e-mail tag in the form of being omitted, the DTD in FIG. 1 is verified.

【0037】これらの平坦後DTDに検証済みとなった
XMLデータを、オブジェクトリレーショナルモデルデ
ータ作成手段66において図12に示すような処理を行
うことにより、先のスキーマを基にオブジェクトリレー
ショナルモデルへ変換する。
The XML data that has been verified to the DTD after flattening is converted into an object-relational model based on the previous schema by performing the processing shown in FIG. 12 in the object-relational model data creating means 66. .

【0038】該オブジェクトリレーショナルモデルを用
いてデータベース投入用のデータを作成し、データベー
スユーティリティに入力し、データベースを構築する。
Using the object-relational model, data for entering a database is created and input to a database utility to construct a database.

【0039】以上より、本発明の目的であるXMLの構
造を保存するスキーマがDTDグラフから作成可能とな
り、妥当なXMLをデータベースへ格納することが可能
となる。
As described above, the schema for storing the XML structure, which is the object of the present invention, can be created from the DTD graph, and appropriate XML can be stored in the database.

【0040】また、該スキーマは、オブジェクトリレー
ショナルモデルであるため、格納したデータに対し問合
せを行った場合、性能を劣化させる結合処理が発生せ
ず、性能に影響が出ないトラバース処理(図16)のみ
で検索可能となり、検索性能が向上する。
Also, since the schema is an object-relational model, when a query is made on the stored data, no traversing process that does not affect the performance does not occur due to the coupling process that degrades the performance (FIG. 16). Only the search can be performed, and the search performance is improved.

【0041】[0041]

【発明の効果】上述のように、従来技術では、リレーシ
ョナルモデルに変換するのに対し、本発明では、オブジ
ェクトリレーショナルモデルに変換しているため、格納
したデータに対し問合せを行った場合、性能を劣化させ
る結合処理が発生せず、性能に影響が出ないトラバース
処理のみで検索可能となる。
As described above, in the prior art, the data is converted into the relational model, whereas in the present invention, the data is converted into the object relational model. The search can be performed only by the traversal process that does not affect the performance without causing the degrading combination process.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の対象となるDTDおよび妥当なXML
の例を示す図である。
FIG. 1 shows a DTD and a valid XML object of the present invention.
It is a figure showing the example of.

【図2】従来の変換方法により得られる2種類のスキー
マを示す図である。
FIG. 2 is a diagram showing two types of schemas obtained by a conventional conversion method.

【図3】従来の変換方法の一方を説明する為のフローチ
ャート図である。
FIG. 3 is a flowchart for explaining one of the conventional conversion methods.

【図4】従来の変換方法の他方を説明する為のフローチ
ャート図である。
FIG. 4 is a flowchart for explaining the other of the conventional conversion methods.

【図5】従来の変換方法により得られたリレーショナル
モデルを用いて、簡易な検索を行う場合を示す概念図で
ある。
FIG. 5 is a conceptual diagram showing a case where a simple search is performed using a relational model obtained by a conventional conversion method.

【図6】本発明にかかる変換方式を示す概略図である。FIG. 6 is a schematic diagram showing a conversion method according to the present invention.

【図7】平坦化するパターンを示している図である。FIG. 7 is a diagram showing a pattern to be flattened.

【図8】平坦化処理を示すフローチャート図である。FIG. 8 is a flowchart illustrating a flattening process.

【図9】DTDグラフを作成する処理工程を示すフロー
チャート図である。
FIG. 9 is a flowchart illustrating processing steps for creating a DTD graph.

【図10】スキーマ作成を行う処理工程を示すフローチ
ャート図である。
FIG. 10 is a flowchart illustrating processing steps for creating a schema.

【図11】該検証済みとなるXMLを作成する処理工程
を示すフローチャート図である。
FIG. 11 is a flowchart illustrating processing steps for creating the verified XML.

【図12】オブジェクトリレーショナルモデルのデータ
を作成する処理工程を示すフローチャートである。
FIG. 12 is a flowchart showing processing steps for creating data of an object relational model.

【図13】図8および図9に示す処理工程を実行すると
得られるDTDグラフを示す図である。
FIG. 13 is a diagram showing a DTD graph obtained by executing the processing steps shown in FIGS. 8 and 9;

【図14】図10に示されるような処理工程を行うと得
られるオブジェクトリレーショナルスキーマの例を示す
図である。
FIG. 14 is a diagram showing an example of an object relational schema obtained by performing the processing steps shown in FIG.

【図15】平坦処理を行うと図1のDTDとなるXML
の例を示す図である。
FIG. 15 shows an XML that becomes the DTD of FIG. 1 when flattening is performed.
It is a figure showing the example of.

【図16】本発明により、検索性能が向上することを示
す、概念図である。
FIG. 16 is a conceptual diagram showing that search performance is improved by the present invention.

【符号の説明】[Explanation of symbols]

61 … データ変換方式機構 62 … 平坦化手段 63 … DTDグラフ作成手段 64 … スキーマ作成手段 65 … 検証済XML作成手段 66 … オブジェクトリレーショナルモデルデータ作
成手段
61: Data conversion system mechanism 62: Flattening means 63: DTD graph creating means 64: Schema creating means 65: Validated XML creating means 66: Object relational model data creating means

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06F 12/00 547 G06F 12/00 547Q 17/30 140 17/30 140 (72)発明者 春日 史朗 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 (72)発明者 芳西 崇 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 Fターム(参考) 5B009 NA05 NA07 5B075 NR02 NR16 QT06 5B082 BA09 GA07 ──────────────────────────────────────────────────続 き Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G06F 12/00 547 G06F 12/00 547Q 17/30 140 17/30 140 (72) Inventor Shiro Kasuga Tokyo 2-3-1, Otemachi, Chiyoda-ku Nippon Telegraph and Telephone Corporation (72) Takashi Yoshinishi 2-3-1, Otemachi, Chiyoda-ku, Tokyo F-Term (in reference) 5B009 NA05 NA07 5B075 NR02 NR16 QT06 5B082 BA09 GA07

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 データベース管理システムにおいて、 XMLを規定する平坦化前の文書型定義(以下「DT
D」という)を平坦化し、平坦後のDTDを生成する平
坦化手段と、 該平坦後のDTDからDTDグラフを作成する、DTD
グラフ作成手段と、 該DTDグラフからオブジェクトリレーショナルモデル
のスキーマを作成する、スキーマ作成手段と、 前記平坦後のDTDに対して検証済みとなるXMLを作
成する検証済XML作成手段と、 該検証済みとなるXMLからオブジェクトリレーショナ
ルモデルのデータを作成するオブジェクトリレーショナ
ルモデルデータ作成手段とを具備する、ことを特徴とし
たデータ変換方式。
In a database management system, a document type definition (hereinafter referred to as “DT”) that defines XML before flattening.
D ”), and a flattening means for generating a flattened DTD, and a DTD graph from the flattened DTD.
A graph creation unit, a schema creation unit that creates a schema of an object relational model from the DTD graph, a verified XML creation unit that creates an XML that has been verified with respect to the flattened DTD, A data conversion method comprising: object relational model data creation means for creating object relational model data from XML.
【請求項2】 請求項1に記載のデータ変換方式におい
て、 前記平坦化手段は、DTDで宣言されたタグの内容モデ
ルにおいて、該モデルに含まれる省略記号を除去し、該
モデルに含まれる繰返し記号を統一し、該モデルに含ま
れる入れ子を展開し、該モデルに含まれる選択は双方を
表現するように変換し、同一タグは繰返しで統一するこ
とにより平坦後のDTDを作成することを特徴としたデ
ータ変換方式。
2. The data conversion method according to claim 1, wherein the flattening means removes an abbreviation symbol included in the model of the content model of the tag declared in the DTD and repeats the symbol included in the model. Unify the symbols, expand the nesting included in the model, convert the selections included in the model to represent both, and create a flat DTD by unifying the same tags repeatedly. Data conversion method.
【請求項3】 請求項2に記載のデータ変換方式におい
て、 前記DTDグラフ作成手段は、前記平坦化手段が作成し
た平坦後のDTDにおいて、タグと属性をノードへ変換
し、タグ間の参照をリンクへ変換し、タグ間の関係をリ
ンクの関係へ変換することにより、DTDグラフを作成
することを特徴としたデータ変換方式。
3. The data conversion method according to claim 2, wherein the DTD graph creation unit converts tags and attributes into nodes in the flattened DTD created by the flattening unit, and references between the tags. A data conversion method characterized in that a DTD graph is created by converting a link between links and a relation between tags into a link relation.
【請求項4】 請求項3に記載のデータ変換方式におい
て、 前記スキーマ作成手段は、前記DTDグラフ作成手段が
作成した前記DTDグラフにおいて、トップノードと中
間ノードとをクラスに定義し、リーフノードをデータベ
ースの属性に定義することにより、スキーマを作成する
ことを特徴としたデータ変換方式。
4. The data conversion method according to claim 3, wherein the schema creating unit defines a top node and an intermediate node in a class in the DTD graph created by the DTD graph creating unit, and defines a leaf node. A data conversion method characterized by creating schemas by defining them in database attributes.
【請求項5】 請求項4に記載のデータ変換方式におい
て、 前記検証済XML作成手段は、 XMLデータおよび平坦後DTDを読み込み、該読み込
んだXMLデータからタグ名および親タグ名を取得し、
平坦後DTDを参照して平坦後DTDに該当する構造に
変換し、平坦後DTDに対して検証済みのXMLデータ
を出力する、ことを特徴としたデータ変換方式。
5. The data conversion method according to claim 4, wherein the verified XML creating means reads the XML data and the flattened DTD, acquires a tag name and a parent tag name from the read XML data,
A data conversion method for converting a structure corresponding to a post-flat DTD with reference to a post-flat DTD, and outputting verified XML data to the post-flat DTD.
【請求項6】 請求項5に記載のデータ変換方式におい
て、 前記オブジェクトリレーショナルモデルデータ作成手段
は前記スキーマ作成手段によって作成されたスキーマを
参照し、 前記検証済XML作成手段により作成された検証済みX
MLデータのタグと親たくの情報から該当する型を取得
し、 該スキーマおよび型に基づいてオブジェクトリレーショ
ナルモデルのデータを作成することを特徴としたデータ
変換方式。
6. The data conversion method according to claim 5, wherein the object relational model data creating unit refers to a schema created by the schema creating unit, and verifies the verified X created by the verified XML creating unit.
A data conversion method characterized in that a corresponding type is obtained from ML data tags and information to be familiar with, and object relational model data is created based on the schema and the type.
【請求項7】 データベース管理システムにおいて、 XMLを規定する平坦化前の文書型定義(以下「DT
D」という)を平坦化し、平坦後のDTDを生成する平
坦化工程と、 該平坦後のDTDからDTDグラフを作成する、DTD
グラフ作成工程と、 該DTDグラフからオブジェクトリレーショナルモデル
のスキーマを作成する、スキーマ作成工程と、 前記平坦後のDTDに対して検証済みとなるXMLを作
成する検証済XML作成工程と、 該検証済みとなるXMLからオブジェクトリレーショナ
ルモデルのデータを作成するオブジェクトリレーショナ
ルモデルデータ作成工程とを具備する、ことを特徴とす
る、XMLデータ変換方法。
7. In a database management system, a document type definition (hereinafter referred to as “DT”) before flattening XML is defined.
D ”), and a flattening step of generating a flattened DTD; and forming a DTD graph from the flattened DTD.
A graph creation step, a schema creation step of creating a schema of an object-relational model from the DTD graph, a verified XML creation step of creating an XML that has been verified with respect to the flattened DTD, An object-relational model data creating step of creating object-relational model data from the XML.
【請求項8】 請求項7に記載のXMLデータ変換方法
において、 前記平坦化工程において、DTDで宣言されたタグの内
容モデルにおいて、該モデルに含まれる省略記号を除去
し、該モデルに含まれる繰返し記号を統一し、該モデル
に含まれる入れ子を展開し、該モデルに含まれる選択は
双方を表現するように変換し、同一タグは繰返しで統一
することにより平坦後のDTDを作成することを特徴と
するXMLデータ変換方法。
8. The XML data conversion method according to claim 7, wherein, in the flattening step, in the content model of the tag declared in the DTD, an abbreviation symbol included in the model is removed and included in the model. Unify the repetition symbols, expand the nesting included in the model, convert the selections included in the model to represent both, and create the flattened DTD by unifying the same tags repeatedly. A featured XML data conversion method.
【請求項9】 請求項8に記載のXMLデータ変換方法
において、 前記DTDグラフ作成工程において、前記平坦化手段が
作成した平坦後のDTDにおいて、タグと属性をノード
へ変換し、タグ間の参照をリンクへ変換し、タグ間の関
係をリンクの関係へ変換することにより、DTDグラフ
を作成することを特徴とするデータ変換方法。
9. The XML data conversion method according to claim 8, wherein in the DTD graph creation step, in the flattened DTD created by the flattening means, tags and attributes are converted into nodes, and reference between tags is performed. A data conversion method, wherein a DTD graph is created by converting a tag into a link and converting a relationship between tags into a link relationship.
【請求項10】 請求項9に記載のXMLデータ変換方
法において、 前記スキーマ作成工程において、前記DTDグラフ作成
手段が作成した前記DTDグラフにおいて、トップノー
ドと中間ノードとをクラスに定義し、リーフノードをデ
ータベースの属性に定義することにより、スキーマを作
成することを特徴としたXMLデータ変換方法。
10. The XML data conversion method according to claim 9, wherein in the schema creation step, a top node and an intermediate node are defined in a class in the DTD graph created by the DTD graph creation means, and a leaf node is defined. XML data conversion method, characterized in that a schema is created by defining XML as an attribute of a database.
【請求項11】 請求項10に記載のデータ変換方式に
おいて、 前記検証済XML作成工程において、XMLデータおよ
び平坦後DTDを読み込み、該読み込んだXMLデータ
からタグ名および親タグ名を取得し、平坦後DTDを参
照して平坦後DTDに該当する構造に変換し、平坦後D
TDに対して検証済みのXMLデータを出力する、こと
を特徴としたXMLデータ変換方法。
11. The data conversion method according to claim 10, wherein in the verified XML creation step, the XML data and the flattened DTD are read, and a tag name and a parent tag name are obtained from the read XML data. The flat DTD is converted to a structure corresponding to the flat DTD with reference to the flat DTD.
An XML data conversion method, comprising outputting verified XML data to a TD.
【請求項12】 請求項11に記載のデータ変換方式に
おいて、 前記オブジェクトリレーショナルモデルデータ作成工程
において、前記スキーマ作成手段によって作成されたス
キーマを参照し、前記検証済XML作成手段により作成
された検証済みXMLデータのタグと親タグの情報から
該当する型を取得し、該スキーマおよび型に基づいてオ
ブジェクトリレーショナルモデルのデータを作成するこ
とを特徴とするXMLデータ変換方式。
12. The data conversion method according to claim 11, wherein in the object relational model data creating step, a schema created by the schema creating means is referred to, and the verified XML created by the verified XML creating means is referred to. An XML data conversion method, wherein a corresponding type is obtained from information of a tag of XML data and a parent tag, and data of an object relational model is created based on the schema and the type.
【請求項13】 データベース管理システムにおいて、 XMLを規定する平坦化前の文書型定義(以下「DT
D」という)を平坦化し、平坦後のDTDを生成する平
坦化手段と、 該平坦後のDTDからDTDグラフを作成する、DTD
グラフ作成手段と、 該DTDグラフからオブジェクトリレーショナルモデル
のスキーマを作成する、スキーマ作成手段と、 前記平坦後のDTDに対して検証済みとなるXMLを作
成する検証済XML作成手段と、 該検証済みとなるXMLからオブジェクトリレーショナ
ルモデルのデータを作成するオブジェクトリレーショナ
ルモデルデータ作成手段とを具備し、 前記平坦化手段は、DTDで宣言されたタグの内容モデ
ルにおいて、該モデルに含まれる省略記号を除去し、該
モデルに含まれる繰返し記号を統一し、該モデルに含ま
れる入れ子を展開し、該モデルに含まれる選択は双方を
表現するように変換し、同一タグは繰返しで統一するこ
とにより平坦後のDTDを作成し、 前記DTDグラフ作成手段は、前記平坦化手段が作成し
た平坦後のDTDにおいて、タグと属性をノードへ変換
し、タグ間の参照をリンクへ変換し、タグ間の関係をリ
ンクの関係へ変換することにより、DTDグラフを作成
し、 前記スキーマ作成手段は、前記DTDグラフ作成手段が
作成した前記DTDグラフにおいて、トップノードと中
間ノードとをクラスに定義し、リーフノードをデータベ
ースの属性に定義することにより、スキーマを作成し、 前記検証済XML作成手段は、XMLデータおよび平坦
後DTDを読み込み、該読み込んだXMLデータからタ
グ名および親タグ名を取得し、平坦後DTDを参照して
平坦後DTDに該当する構造に変換し、平坦後DTDに
対して検証済みのXMLデータを出力し、 前記オブジェクトリレーショナルモデルデータ作成手段
は、前記スキーマ作成手段によって作成されたスキーマ
を参照し、前記検証済XML作成手段により作成された
検証済みXMLデータのタグと親タグの情報から該当す
る型を取得し、該スキーマおよび型に基づいてオブジェ
クトリレーショナルモデルのデータを作成することを特
徴としたデータ変換方式。
13. A database management system, comprising: a document type definition (hereinafter referred to as “DT”) that defines XML before flattening.
D ”), and a flattening means for generating a flattened DTD, and a DTD graph from the flattened DTD.
A graph creation unit, a schema creation unit that creates a schema of an object relational model from the DTD graph, a verified XML creation unit that creates an XML that has been verified with respect to the flattened DTD, Object relational model data creating means for creating object relational model data from the XML, wherein the flattening means removes an abbreviation symbol included in the model from the content model of the tag declared in the DTD. Unify the repetition symbols included in the model, expand the nests included in the model, convert the selections included in the model to represent both, and unify the same tag by repetition to obtain a flattened DTD. Wherein the DTD graph creating means creates the flatness created by the flattening means. In the DTD, a tag and an attribute are converted into a node, a reference between tags is converted into a link, and a relationship between tags is converted into a link relationship, thereby creating a DTD graph. In the DTD graph created by the DTD graph creating means, a schema is created by defining a top node and an intermediate node in a class, and defining a leaf node in an attribute of a database, and the verified XML creating means comprises: The data and the flattened DTD are read, the tag name and the parent tag name are obtained from the read XML data, the flattened DTD is referred to, the structure is converted to a structure corresponding to the flattened DTD, and the DTD after flattened is verified. The object relational model data creating means outputs the XML data of With reference to the created schema, the corresponding type is obtained from the information of the tag and the parent tag of the verified XML data generated by the verified XML generating means, and the data of the object relational model is obtained based on the schema and the type. A data conversion method characterized by creating.
JP2000150400A 2000-05-22 2000-05-22 XML data conversion method and XML data conversion method Expired - Lifetime JP3583688B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000150400A JP3583688B2 (en) 2000-05-22 2000-05-22 XML data conversion method and XML data conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000150400A JP3583688B2 (en) 2000-05-22 2000-05-22 XML data conversion method and XML data conversion method

Publications (2)

Publication Number Publication Date
JP2001331479A true JP2001331479A (en) 2001-11-30
JP3583688B2 JP3583688B2 (en) 2004-11-04

Family

ID=18656121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000150400A Expired - Lifetime JP3583688B2 (en) 2000-05-22 2000-05-22 XML data conversion method and XML data conversion method

Country Status (1)

Country Link
JP (1) JP3583688B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7209034B2 (en) 2003-04-17 2007-04-24 International Business Machines Corporation Providing services with respect to a building according to the condition of the building
US7231591B2 (en) 2003-03-31 2007-06-12 Nec Corporation Computer system suitable for communications of structured documents
JP2015508529A (en) * 2011-12-23 2015-03-19 アミアト・インコーポレーテッド Scalable analysis platform for semi-structured data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231591B2 (en) 2003-03-31 2007-06-12 Nec Corporation Computer system suitable for communications of structured documents
US7209034B2 (en) 2003-04-17 2007-04-24 International Business Machines Corporation Providing services with respect to a building according to the condition of the building
JP2015508529A (en) * 2011-12-23 2015-03-19 アミアト・インコーポレーテッド Scalable analysis platform for semi-structured data
JP2017157229A (en) * 2011-12-23 2017-09-07 アマゾン・テクノロジーズ・インコーポレーテッド Scalable analysis platform for semi-structured data

Also Published As

Publication number Publication date
JP3583688B2 (en) 2004-11-04

Similar Documents

Publication Publication Date Title
US7024425B2 (en) Method and apparatus for flexible storage and uniform manipulation of XML data in a relational database system
Stuckenschmidt et al. Index structures and algorithms for querying distributed RDF repositories
US7478100B2 (en) Method and mechanism for efficient storage and query of XML documents based on paths
JP4406609B2 (en) Techniques for managing multiple hierarchies of data from a single interface
US6311187B1 (en) Propogating updates efficiently in hierarchically structured data under a push model
US7660805B2 (en) Method of generating data servers for heterogeneous data sources
US7219102B2 (en) Method, computer program product, and system converting relational data into hierarchical data structure based upon tagging trees
US9122422B2 (en) Representing models in systems development lifecycle (SDLC) tools using a network of internet resources
US7555707B1 (en) Method and system for data binding in a block structured user interface scripting language
US9361398B1 (en) Maintaining a relational database and its schema in response to a stream of XML messages based on one or more arbitrary and evolving XML schemas
US20050010896A1 (en) Universal format transformation between relational database management systems and extensible markup language using XML relational transformation
US7941417B2 (en) Processing structured electronic document streams using look-ahead automata
US20070219959A1 (en) Computer product, database integration reference method, and database integration reference apparatus
US20040220912A1 (en) Techniques for changing xml content in a relational database
EP1016987A2 (en) Propagating updates efficiently in hierarchically structured data
JP2010225181A (en) Registry driven interoperability and exchange of document
EP2211277A1 (en) Method and apparatus for generating an integrated view of multiple databases
JP5060345B2 (en) Database processing apparatus, information processing method, and program
CN111752542B (en) Database query interface engine based on XML template
KR101221306B1 (en) Method and system for navigation of a data structure
JP4309818B2 (en) Structured document management device, search device, storage method, search method, and program
US20060242169A1 (en) Storing and indexing hierarchical data spatially
JP4724177B2 (en) Index for accessing XML data
US20090307187A1 (en) Tree automata based methods for obtaining answers to queries of semi-structured data stored in a database environment
JP2001331479A (en) Xml data conversion system and xml data conversion method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040514

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040729

R151 Written notification of patent or utility model registration

Ref document number: 3583688

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20080806

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080806

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090806

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090806

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100806

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100806

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110806

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120806

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130806

Year of fee payment: 9

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

EXPY Cancellation because of completion of term