
第
36
卷第
3
期
VoL36
No.3
计算机工程
Computer
Engineering
2010
年
2
月
February
2010
·软件技术与数据库·
文章编号
100
←
3428(201
的
03
→
06
9-0
3
文敲标识码
A
中固分类号
TP30
1.
6
XML/GML
非空间数据查询的结构连接算法
陈建华
M
,王华军口,苗放口,王卫红
3
(1.成都理工大学地球探测与信息技术教育部重点实验室,成都
610059;
2
成都理工大学信息工程学院,成都
610059;
3.
成都理工大学地球科学学院,成都
610059)
摘要:为利用
Dewey
前缀编码索引方案实现对
XM
L/
GML
文档的编码并消除其缺点,提出一种扩展的
Dewey
编码方案一
-Ex-Dewey
。
在保留
Dewey
前缀编码优点的同时提出节点插入及删除对已有节点编码值串无影响的更新策略。针对
Ex-Dewey
编码方案提出一种在
XM
Ll
GML
非空间数据查询时快速确定候选节点问先辈-子孙、父-子关系的结构化连接算法一一
ED-XQ-SJ
。给出算法思想、描述与验证。
该算法无须访问实际存储的节点,算法复杂度较低且
vo
开销减少。
关键询:可扩展标记语言;地理标记语言;编码索引;扩展
Dewey
编码;非空间数据查询;结构化连接
Structural
Join
AIgorithm
for
XML/
G:
ML
Non-spatial
Data
Querying
CHEN
Jian-hua
l
气
WANG
Hua-jun
l
气
MIAOFang
l
气
WANG
Wei-hong
3
(1.
Key Laboratory ofEarth Exp10ration & Information Techniques,
Minis
町
ofEducation
,
Chengdu University ofTechno10gy, Chengdu 610059;
2.
Co
lIege o
fI
nformation Engineering, Chengdu University ofTechno10gy, Chengdu 610059;
3.
Co
lI
ege ofGeo10gy Science, Chengdu University ofTechnology, Chengdu 610059)
(Abstract)
In order to take advantage
of
Dewey prefix encoding scheme to encode eXtensible Markup Language(XML)/Geography Markup
Language(GML) documents and eliminate Dewey encoding scheme's shortcoming, a kind
of
extended Dewey encoding scheme, Ex-Dewey, is
proposed.
Ex-D
巳
wey
achieves updating strategy
ofnode's
inserting and deleting
no
affecting others' encoding value, and also keeps the advantages
ofDewey encoding scheme.
And corresponding structural join algorithms, ED-XQ-SJ for XML or GML non-spatial data querying are proposed. The
algorithms' idea
, description and verification are given. The algorithms can directly determine the ancestors-descendants or parents-children
relationship between potential ancestor node set and descendant node set
, and
do
not access the real storage nodes. Their complexity
is
much
reduc
巳
d
,
and the 1/0 overhead
is
decreased obviously
as
well.
(Key
words)
eXtensible Markup Language(XML); Geography Markup Language(GML); encoding index; extended Dewey encoding; non-spatial
data querying; structural join
1
概述
为实现可扩展标记语言
(eXtensible
Markup
Language
,
XML)
数据、地理标记语言
(Geography
Markup
Language
,
GM
L)
[1-2
J
非空间数据的高效查询、更新、删除等操作,需要
在
XML
,
GML
数据存储时对其建立索引。目前研究人员己提
出多种
XML
数据索引方案。
Zhang
Chun
等人提出了三元组索引。
Paul
F.
Dietz
最早
采用树遍历的方法来判定节点树中任何一对节点的先辈-子
孙关系,即前序-后序编码方案。
Li
Quanzhong
与
Moon
Bongki
提出了扩展前序编码方案。上述
3
种
XML
编码索引方案的
缺点是缺乏灵活性,典型情况是:当一个新节点插入后,很
多树中节点的编码值都需重新遍历计算(即便在编码中引入
冗余数值间隔)。
文献
[3]
提出了将结构化文档建模为完全
K
元树
(Complete
K-ary
Tree)
的索引方案。其缺点是:即便对于一个
很小的
XML
文档,由于可能需要插入许多虚拟节点以构建
完全树,节点标识符将增长得非常快,从而极大地限制了欲
建立索引的文档的大小。针对完全
K
元树索引方案存在的问
题,文献
[4]
提出了一种特定
K
元树索引方案,其缺点是:当
一个新节点插入后,很多树中节点的编码值都需重新遍历
计算。
Dewey
编码
[5J
是一种前缀编码索引方案。它采用前缀编
码建立
XML
结构化文档中节点的先辈-子孙关系(包括父帽子
关系)、同胞关系。
Dewey
编码的优点是:能够简单、明确地
判断节点间的先辈-子孙关系、父-子关系和同胞关系,易于
进行
XML
查询的结构连接。节点的插入、删除只影响局部
范围。其缺点是:由于同层编码值连续,节点的插入、删除
将影响其后趋同胞节点及其子孙节点编码的变更。
2
Ex-Dewey
前缀编码索引方案
鉴于
Dewey
前缀编码索引方案具有易于判断节点问先
辈-子孙、父-子、同胞关系,易于进行
XML
查询的结构连接,
节点的插入、删除只影响局部范围等优点,为充分利用
Dewey
编码实现对
XM
Ll
GML
文档的编码并消除原方案中节点的插
入、删除影响其后趋同胞节点及其子孙节点编码的变更等缺
点,本文提出一种扩展的
Dewey(Extended
Dewey
,
Ex-Dewey)
编码索引方案。
基金项目:四川省教育厅基金资助项目
(2006AI17)
作者简介
z
陈建华(1
976
一),男,讲师、博士,主研方向:地理信息
系统与遥感;王华军、苗放,教授、博士生导师;王卫红,博士
研究生
收稿日期
2009-09-15
E-mail: chjh3@163.com
-69
一