• Aucun résultat trouvé

Algebra-based extraction of tree patterns in XQuery

N/A
N/A
Protected

Academic year: 2021

Partager "Algebra-based extraction of tree patterns in XQuery"

Copied!
13
0
0

Texte intégral

(1)

HAL Id: inria-00001147

https://hal.inria.fr/inria-00001147

Submitted on 10 Mar 2006

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Algebra-based extraction of tree patterns in XQuery

Andrei Arion, Veronique Benzaken, Ioana Manolescu, Yannis Papakonstantinou, Ravi Vijay

To cite this version:

Andrei Arion, Veronique Benzaken, Ioana Manolescu, Yannis Papakonstantinou, Ravi Vijay. Algebra-

based extraction of tree patterns in XQuery. 2006. �inria-00001147�

(2)

Algebra-based identification of tree patterns in XQuery

1,2

2

! "#%$'&

1

( $)*+$-,%,.

3

0/1 2

3- 4

1,4

1

INRIA Futurs, Gemo group, France [email protected]

2

LRI, Univ. Paris 11, France [email protected]

3

CSE Dept., UCSD, USA [email protected]

4

IIT Bombay, India [email protected]

Abstract. Query processing performance in XML databases can be greatly enhanced by the usage of materialized views whose content has been stored in the database. This requires a method for identifying query subexpressions matching the views, a process known as view-based query rewriting. This process is quite complex for relational databases, and all the more daunting on XML databases.

Current XML materialized view proposals are based on tree patterns, since query navigation is conceptually close to such patterns. However, the existing algorithms for extracting tree patterns from XQuery do not detect patterns across nested query blocks. Thus, complex, useful tree pattern views may be missed by the rewriting algorithm. We present a novel tree pattern extraction algorithm from XQuery queries, able to identify larger patterns than previous methods. Our algorithm has been implemented in an XML database prototype [5]. We study its perfor- mance, and the overall benefits of our tree pattern identification approch.

1 Introduction

576 98:;4<#=>?@>?BACD.EF$G& -,.#4H>>H+I,'"@$, 6 9$J,%K;4<#=>?@>?LM

8N "OQPIR9+S;LM?TB& %U; 6 &>V,'&6 IW8:;4H+I& %$$'>V$X,6 7$.@>?WLFTB,. #U

B2.Y9$P 516 Z!$G,.+-%U;& ?TH+I,'[K$-,'B, 6 Z,%\@$', 6 Z%$'#,9L]$T!I %$

^

&?THTH#4&##

view definitions

_ Y 6 H$' XI J4!-2%$

,. ?,'L`4Y 6 &6 +J,'$

@LX,

6

I J4aTB,.&

6

V@LX,

6

b+-%Uc&?TH+I,'2.Y9$P

576

#=->?+J,$ZLQ,

6

I J4d&

TH,.&

6

Y9,6 B2%Y

,6

HTH.e& ?,;4f+&%$$>YW##\S

$'& <K\>>? b+J,NLG,

6

;4K& ?TH+I,%,'<&K\S?\I,.-&.,.#4HLM?Tg,

6

ZTH@,'-=#!2.YbP

?,'L`4>h$%LM#2.Y9$bLMVI J4i I%$V$>i\jI,!& ?,%T!, ^P>P

$V##

,6 H,.d2.Y

v

&,% kd,6 V%$'#,bL7;4

q

l@_ h2?# & ^P>P $Z, 6 W3J?

@L2%Y1$

v 1

v 2

I2#,b,.H,6 I J4

q

l@_ Pj8N "OkI J4d?,%T!,a I2?#&

-Y7 ##Q -$J,.IhY 6 d2.Y9$bh-%$-+- $,. f$

tree patterns

& ?,%>

,'+#%$Q@LS #T!,'$F$'@,'$-L`4>[$+j & m&$-,'&.,.'#? #=,.$6 +$WADn

DoEcP 2

+S+#=*8N dO

'p>[LM'@>TH ?,%,'Z$J,.',' >?%$*#$'WTH@,'-=#],' X+,,. $qADr

DD

D s

D%tEuP 516 .Lv-

,' W+,,. $9K?,'- $J,.>HT!I #LMq8N "OaTB,. # H2%Y1$bAs

-w n

DD

DCEcP

RXY7?-V$G+#=& <H, 6 9& ?,.p,1@Lx8:;4<+-I& $-$'>!\@$' <<[+j -$$-,',1$J,.P?yk

TH?9$?TH9$'TH+#@$$TH+I,'$WH, 6 $7& ?,.p,

\.z4B+%$' ?,'Kp,P

(3)

persistent identifiers

&6 ,.m -$bV@L,'

structural

,6 ,N$ \?4a&?TH+->K,6 V ?,.mJ$

id 1

id 2

L

,;Y7Z#TH ?,$

e 1

e 2

?W&H & 7Y 6 .,6 $'?THq$-,'&.,.#S #=,.?$6 +<pS$J,'$q\S%,;Y7

e 1

e 2

LM?H$-,.&

Y 6 .,6

e 1

$Kh& 6 # +-,

H$\#> @L

e 2

P 576 ",. %$-,<L

$J,.-&%,''# ?,.mJ$V$N,6 @,b $J,%\#$6 >h$'&6 -#=,'$6 +$H &.,.#4f$VT& 6 THV.e& ,

,6 !%2>,.>ZLM?T

e 1

,'

e 2

b,6 q,%\@$'7,'W2 L`4b,@P1T!-$Q$-,'&.,.#

+-?+S$.#$

6 %2IZ\S TB9$'NLv

$' ?P>PFAC D@EcP

We assume persistent IDs are available in the store

P 576 $1TB 4 \I,9V@,9 H,.

6 2Z$J,.&.,.#++S;,.%$P

Rb$' & ? $-$'T!+I,. $b,

6

,HaTB,'-=#h2.Y TB 4a$-,.-

^

i

_

node IDs

ADr DC

D%tE

^

ii

_

values

^vP?P , 6 B,''p,B $B &.,.#4 H #T!, b, 6 B2?#0@LZ

,-,.\I,.

_ ADr@E

^

iii

_ I

content

,6 ,Q$ ,6 QLM##$\I,. q,'N,X[8N "OH #T!,

^7b+S?,'q,.N,

6

@,7$'\I,'

_ AnEcP 516

$9$-$'T!+I,.K+ 2%$1LMqzpS\#92.Y >?'#=,;4P

5 ,%NI2??,.@>NL],.-Z+,,'-IUc$6 +SdTB,. =# <2.Y9$

6 $7,.VJ$-,.Y 6 & 6

2.Y9$9&<\SZ$!Lv7bI J4

q

P 576 $9+-I& $-$1&<\jW$ K@$9[,''$'#@,'>

q

,'N$'?TH

query patterns p q1 , . . . , p qn

LM## Y1 h\?4aB-%Y9,'>@Lq%2 J4dI J4d+,,.

p qi

$'>K,

6

N2.Y

+,-,. $

p v1 , . . . , p vm

P

576

VmJ$-,Z$-,'+ ^I J4Uu,.@U;+,-,. d,.$'#=,.?

_ $[&-&=#vP

,.,'2#4

,6

W\>>?X,

6

1I J4B+@,-,. $

,6

W\>> X,

6

72.Y ^$_ ,6

,7&B\SW$' !,'N-%Y9,'7,

6

T

,6

$

,6

# $-$1& ?TH+I,.@,'$9-TH!,.\SZ++# 0H,'+KLF,

6

92.Y9$P

576

N& ?,.-\I,.?0@L*,

6 $W++SW$9!+-2?\#40& &.,#>?,6 T ?,.L4>B,' [+,,'-$

"- $pS+- $-$' ""V#=->?[8W:Z J4$\$'.,@P

516

bI2,%@>?@L*,

6 $TH.,

6

29pS$-,.>

%$aAn

D

EZ$V,6 ,!,6 +,,'-$HY7,.L`4 -<$-,.-&.,.#4 #=->?, 6 +.2$BY7?$

K+J,'& #=WTB 4H$'+2 1%$-,. B8: J4\#&.$

Y 6 &6 Y1$1@,1, 6 Z&$[K+.2$

++-&6 %$PIyk1>?-?KG#>?,6 T BB#>?\

$'&

^

@$Y71YW##$ 6 Y

_ ,6 1,.$'#=,.?

$I,'b&?T!+#'pdZ,.8:;4d& ?TH+#pS,J4

"$-,''> 6 ,-LM?;Y1-0,''$'#=,'aTH.,6 $ZTB 4

#I$'W, 6 W$'\I,'#$'TB?,'&W #=,.$6 +$\j.,;Y7 Kb+,,'-KbI J4P

576 7++S*$XJ>I H@$ LM?##Y9$P &.,.VCTH@,'2?,.%$],6 q NLM?*+,,. -& >?,.V

8W:Z J4NI $P &.,.?Ns1$'.,'$F,6 QLM'TH#\&.>?-?NLMF, 6 Q,.$'#=,.?V#>?, 6 T +%$' ?,'

&.,.?<tP \.L*'p+j TH ?,%#j%2?#,'0$1+-2 &%,'

w

, 6 HY7&& #?P

2 Motivating example

yk!##$J,.@,'!,6 B\S.m,'$bL1[,.-V+,,'-f'p,.'&.,.k++?& 6 a,6 !$.TH+#8: J4

;4b]>P?D

LM@,'>W,6 $J,. [LM?;UuY 6 .U;-%,'N\#I&.$P@b=T!+j;,%?, 8: J4ZLv,.-

,'h + TH $V,6 ,HY 6 a-%,' & #=$'"&$-,'&.,'$B%Y #T!,'$

LN 'p+%$$'?

LMKV,

6

W #T!,q& ?$J,.-&%,'?G.2?#,.%$G,'

^, 6 WTH+I,;4V%$'#, _

B #T!,GT$-,q$J,.##j\S

& $-,'&.,.

#\j ,*YW,6

W&,. ?,Q&- $+j>,.1,

6

,Q+;,.& #=QpS+- $-$'xP? $J,%&

]>PD

LLM? $'?T!\>[L,

6

2-=\#

$x

$y

,6 q'p+%$$

$x

c

4 #$TH+I,;4

- $#,

res1

#TH ?,QYW##$-,'##S\j1&$-,'&.,.

Y9, 6 N& ?,. ?,7& ?-%$'+S>,.

$x

c

^\I,

+S 6 +$1YW,6 $T!W&,. ?,1+I& 0\4H,6 $J,. BLv;UuY 6 .U;.,.-<pS+%$$

_ P

1p,*,.9,6 GI J4

]>SPID7 +&.,'$q #.2I V+j$-$'\#1&- $+j>bI J4b,' G+,-,. $PX&6

+,-,. N$ I@,'[,F,6

>

$-4T\j# @,'>9,6 X&T! ?,]@,@P@)*,,'-Z >? $*TH 4\S#=\j #

/

LvZ+ ?,Uc&6 #a-#=,'$6 +$

?HLM[& $J,.JUc $& ,-#=,'$6 +$P*)*,,'-d $

TH 4"\j!#=\S# aYW, 6 IH?T! $ZWYW,6

^?4hT! _ PSy 6 f<+,-,. hIB&-%$N

ID

$-4T\j# ,6 W+,,'-<$q$.!,.

contain the ID

@Lx,6 18N dOd $7&-%$'+S?>!,'[,6 +,-,. B?$'TH#=-#4 LF[+,,'-BIW$7#\S #

Cont

^%$'+S&.,.2I #4

V al

_ ,6 9+,,. !$

$'H,.

contain the contents

^- $+j &%,'2#4 , 6 92?#

_

@LF8N dO0I%$9& ?-%$'+S>!,'N,6

(4)

* ID

d ID e Cont

b ID

f ID

g Val=5 h Cont

V11

* ID

* ID

a V1

b ID V2 V3

c Cont d ID

V4

e Cont V5

h Cont V7

V8

d ID e Cont

for $x in doc("in.xml")//a/*, $y in doc("in.xml")//b return <res1> { $x//c,

for $z in $y//d return <res2> { $y//e,

return <res3>{ $t//h }

</res1>

}

</res2>

}

</res3>

for $t in $z//f where $t[g/text() = 5]

V10

a c Cont

V6

f ID g Val=5

V9

f ID g Val=5 h Cont

Fig. 1. Sample XQuery query and corresponding tree patterns/views.

+,-,. IP

LQV+@,-,. 0Ib$,.,. Y9, 6

V al = c

+-&,. Lv1$?THZ&$-,.?,

c

, 6 B#4H8N dO" $qY 6 $'92?#W$'@,'$-m $,6 ,7+ &,.

^

H,6 9$-,.-&%,''#S&$-,'','$

H,6 I

_

YW##x\S#>,.N, 6 +@,-,. xP

ykq$-,'##S V,'NpS+#=V,6 WT!>N@LF@$6 <+,,'-H >? $P 576 $9>?%$7-

optional

N,6 Lv##YW>[$' $'

N8N dO<I7TB,'&6 >W,6 q++j

^

+-, &%$-,'

_

7@LW$ 6

>?WTB%4#=&.[8N "O%$'& ?,$7TB,.&6 >, 6 7#Y7

^&6 #%$'& ,

_

I

4.,Q,6 ,q

TH 4$-,'##]\j #><,.!,6 +,,'-

^LQ,6 >?NY1$Z@,[+I,.#

,6 $WY1#h@,[\SN, 6 b&@$'

_P

LF,6 Z#Y77IZLQb@$6 >?WY1$9,.,. KY9, 6

ID

V al

Cont

, 6 +,,'-BYW##

& ?,.<$'?THW## ^

_ 2?#%$7,'&& ?,7Lv, 6 ZTH$$'>V&6 #-%$'& ?,$P W$b+.2$'#4 T!,.

+,,. $V+# 4k0#q#Hf++?& 6

2%Y .m,'$

I J4B$'\IU;pS+- $-$'$P 576 $

& 6 +,,'-

V 1 , . . . , V 11

$9$\jpS+- $-$'0@L],6 [;4

,q#%L`,

^

LMX'p+#=@,'

_

Y71#$'b@$-$'TH7,q$ 2?#=\#@$GZTB,. =# b2.YbPy 6

!+,,. 0$,. +-%,'"@$ZV2%Y

Y7N$' 40,W$J,.%$92??$

ID

Cont

V al

,,.-\I,.%$

Y 6 K,9$7,. +.,. K@$1bI J4<$\jpS+- $-$'

Y7W$. 4B,1 $1$& 6 ,,.-\I,.%$P

Ox.,W$Y & ?TH+, 6 \#,;40LXj-,[#>??-,6 TV$9,.! &>?[,6 N+@,-,. $K,6

;4

^, 6 $

\#Z,6 q$'>?WLM?2%Y7U;\@$' 0;4K-%Y9,'>

_ P

.2#[pS$J,.> 2.Y1U;\@$' 8N dO I J4 .YW-,.> LM?T!%Y7?$fAn

Cs@EV& & ?,'',.h

8N)], 6 2%Y1$

$J,.>i,%"LMB+,,'- I0?#4 ^

$& 8N)]@,6 I $ 6 2"0.U

,'"I

_

d#=&.I>+I,.?#*>?%$P

TH#=WpS%$N- $&-\Sa AD r

D tEcP

>P*D

,6

N#4K8N)]@,

6

2.Y9$Z

V 1

U

V 7

Y 6 &6

+%$' ?,9,

6

b#=->?%$-,98N)],

6

+@,-,. $1,

6

,b&

2IGLv-?T , 6

9;4! >PD,

6

%4V$J,.

Cont

LMq##SI%$qY 6 &6 T$J,\SW.,. ^$'&

6

@$1,6

c

e

h

I%$_

ID

LM?1##FI%$9Y 6 $'Z2?# $9?1&?,',ZZ@, KLM ,6 WI J4

\I,GY 6 &6 TV$J,G\j9,'' 2 -$' B\4H,6 WI J4 ^$& 6 @$q,6

a

b

d

I%$7%,'&?P _

!,6 $

&@$'

,6 Z#4!Y1 4!,.V$-Y7 q, 6 WI J4K$q,'+j JLM'Tgm2X3J$WKb&J,' $=<+&%,

^,6

#@,-,. ,'B,6 NLv&%,Z,6 ,

$x

$y

@,N& &%,'ha4"Y1 4

_

,'<& ? &.,N, 6 ,.

LM-T

V 1

U

V 7

P 516 $V++-&6f6 @$N$T!$.I2?,%@>? $P -$J,

,b $bh=TH+SJ,%,TH,

@LQ&?T!+I,%,.$

K$' & ?

,WTB 4<#<,'!->!LM?T $'TH-Z,.,6

^

LM

$-,%&

V 7

&,%$H##

h

#T!,'$ Y 6 #B,6 B;4i?#4i $,6 $'

h

#T!,'$

b

d

f

_P

576 !#>-,6 TV$b@L[A

D

EGp,.&%,N+,,. $[$-,'?->0ILM'TB,'dLv-?T $%2 '#XI%$

6 %2>"+I,.#>?%$P1Y7.2

,6 %$'V+,,'-$V@,V## Y1 a,.<$+f& $$N $J,. dLM?;U

Y 6 -%Uc.,.['p+%$$$P

]>P?D

, 6 $*++-?& 6 Y1#N'p,.'&.,F,6 +,,'-$

V 2 , V 10 , V 8

(5)

V 9

,6 3-$

TB 4H#B,.b-<,.bLM-T TH4H#TH ?,$G,1$'.LM#,.[, 6 I J4P

RG#>??-,6 T p,''&%,$Lv-?T ,6 WI J4B >PjD9?#4B,;Y7N+,,'-$

V 10

V 11

PG@$

d,6 $

Y7V.YW-,.b,6 H;4h\?4hB$'>?#Z3J? ^

THN'pS&.,.#4

<&J,.%$'h+-I&.,

_

@Lq,6

& - $+j>

V 10

V 11

2%Y1$

##4,'1\SqTV&6 #%$$]pS+S$2X,6 Z,6 X@,6 ++-?&6 %$P

$9LM'TH# T!I #F I-K,.!%$'& \Sb+,,'-"p,''&%,'

l

576 b$-Y7 W$94 $

\j &$

$W,'<TH# +-& $' #4 ^

i

_ I J40$'TB?,'&%$

,;4+&##4d$'>0a#>? \'dAo D

w Cr@EG

^

ii

_ 2%Y $TH?,.& $ hAtExY7Z+2K,6 WLM## #>?\&[$TH,.&Z@L*+@,-,. $7$'&6 @$7,6 $ ]>PxDP LM'TH#TH#x$9

,. $'-Z,6 Z+,,'-$ 6 2Z'pS&.,.#4<,6 $.THT!>

@$7I J4H$'\S'p+%$$$

?

Y 6 B,

6 $7$1@,G,

6

&$

,.b& ?TH+I,'W&?TH+S $.,.>H&.,.$9

,6

V2.Y9$P Z$-,.&

& $'

V 11

]>PXDP 1-

, 6

d

a,6

e

$-H+I,'#

%$'& ,'$V@Lq,

6

b

I%$ a$'<,6 .4a$6 #k\S && >0,.B,

6

!I J4P 1Y7.2

,',

6

H;4i $J,. i$J,.-&%,'

e

#TH ?,N$6 # ++Sh,6 !%$'#, L1,'$

b

& $J,.

$@,

6

2

d

$& ,'$P 516

$

d → e

+S &.4a$@,pS+- $-$' d\4

V 11

"$W@,

pS+- $-$'\#[\4<4!,' 9+,,'-

\S&$'W$'&6 +,-,. $G#4K& &,GLMG&%$-,'?;U;%$'& ?,

-#@,'$6 +$P 516 $

V 11

$F,6 \j%$-,*+S$-$'\#q,' X+,,. 2.YfLM?x,6 +;,*LI,6 I J4[-#=,'

,'Z2?-=\#

$y

4I.,q,G$7@,Gpj&.,.#4VY 6 ,qY79 xP? ^'p+j $'2I

_

$' #&.,.?B?

V 11

!,6

& ,.?

(d.ID 6= ⊥) ∨ (d.ID = ⊥ ∧ e.Cont = ⊥)

$9,.!\jN++# ",.!+I,Z, 6 2.Y ,.Z,6 I J4P

Q$'TH+#& ,;4

V,6 $$' &%,'

[ $J,.>b?X>?-?+> 6 $q\S H&$'-

,6 !,6

+,-,. $ ]>P]D

?W,6 bI J40-%Y9,'><$-,'',.%>?%$P 1Y7%2

>?2K, 6 ,W8: J4"I%$

& $-,'&.,N& ?TH+#pd>?+j a- $#,'$

^

P>P

##

c

$& ,'$NLQ,6 N$'?T!

$x

T$-,Z\SbI,.+I, ,'>.,6 9 ]>SPFD

_

+@,-,. "TH#$9&$'-"fAt D E

@$1Y7## @$7,''$'#=,'aTH.,6

N,.?%$-,'>B?,.V& &,@P

3 Data model, algebra, and query language

3.1 Data model

Ox.,

A

\jW!Im,'W#+ 6 \S%,1

L

I

\S7,;Y7[$v3J?,G$'\$%,$GL

A

P $+j &#

A

&$J,%?,

@,.%$G,6 9TH+I,;4V$-,'>Py q2.Y !8N dO0I& TH ?,7@$7H'K#\S #B?--V,.-P

4HI 6 @$G,.>

& ?-%$'+S>,.W,6 9 #TH ?,q,,'\I,'9TH

HTB%4 6 2W2#?P

G,,'\I,'WB #T!,qTH%$q'>?92

L

Y 6 #12?# $G>?9 2I

A

P 516

value

@L]I

n

\S #>?$b,'

A

i$\I,% k\4h& ?&,. ,.>0, 6 ,.p,& ?,',V@L9##& 6 # fL

n

&T!, , 6 [- $#,ZTB%4K\S

L], 6 [I[I%$, 6 2Z,.p,9& 6 #-xP 516

content

@L7<

n

$N

A

2?# \I,% h\?4"$' =#>,

6

#=\S#$d2?#%$b@L7##Q $ZLv-?T

,6

b,. @,. a

n

hH,.+IU; YW

#.L`,Uu,'@U;> 6

,Z,'' 2 -$'#MP 1I%$

6

2V

identities

P

Ox.,

n 1

n 2

\S1,JY7[8N "O"I%$Py 7@,'W,

6

1Lv&.,q,

6

,

n 1

$

n 2

$7+-,W@$

n 1 ≺ n 2

,6 Lv&.,9,6 ,

n 1

$& $J,.9@L

n 2

@$

n 1 ≺≺ n 2

PIyk'p,. , 6 $9@,.@,','V#TH ?,

$

i 1 ≺ i 2

^%$'+xP

i 1 ≺≺i 2

_

iff i 1

,.m $

n 1

i 2

?,.m $

n 2

n 1 ≺ n 2

^- $+xP

n 1 ≺≺n 2

_

P

yk@$-$'TH! 2#=\#<

$'& 6 TH

I

,6 @,N$ a@3J&.,.2ILM&%,'i$-$'>?>0,.<.2;4

972?#G

I

P >?7C1$6 Y1$q1$'=T!+#X8N dO<I& TH ?,

Y 6 q $q-q>?2 $-,.-&%,''#

R[/

)S 5 ?,.mJ$bAD@EcP

yk YW##? #4[b1%$-,'[ #=,.#T!I #jAD%E@$xLM?##Y9$P 516 Q2#LG,.+#q,-,.\I,.$] U

,6 x2?#]Lv-?T

A

xI## ^

_ Fq& ?##&.,.? ^$%, #$J,]?j\@>

_

@L 6 ?TH>? $ ,'+#%$P 1@,.&

,6 b#,'-@,'d\S%,;Y7 , 6 Z,'+#0, 6 N& ## &%,'d& ?$J,.-&%,'?J$Pyk[$b#Y7 &$b#.,,'J$

LM9-#=,'"TH%$

0++S-&@$'#%,-,. -$7LMW,,'\I,'bTH%$

@$W

r(A 1 , A 2 (A 21 , A 22 ))

P

(6)

e

"6"

1.5.3.5

1 1.7 1.7.1 1.7.1.1

<a><b>...</e></d></c></a>

<c><d><e>7</e></d></c>

<d><e>7</e></d>

<e>7</e>

C

a c

e d b

1.3.1

1

"3"

"2"

1.7 1.7.1 1.7.1.1

b

"1"

1.1

1.3.3.1

c

b d

1.5

"5"

b b

"4"

1.5.3.1 1.5.3.3

1.5.3 1.5.1 1.3.3 1.3

d e c

"7"

e d

c

ε

"7"

a

ε ε

V T ID

Fig. 2. Sample XML document and some tuples from its canonical relation.

# $b-V $>?@,'i\?4d#Y7 &@$'!#%,-,. -$P $J,%&

H,.+#H

r(A 1 , A 2 (A 21 , A 22 ))

TH 4 6 29, 6 92?#

t(x 1 , [(x 3 , ⊥) (x 4 , x 5 )])

P

576

B\@$'&<>? ?,!@LW#>? \'&<pS+- $-$'$!$' ki[,''$'#@,' T!%,

6

If$V

^2;,.#

_

#=,.?"&+I,'>B,

6

b,%<@$-$'I& =,. ",'B08N "Oi #TH ?,@PZ2dH&T!,

d

,6

canonical element relation e d (ID, T, V, C) ⊆ I × L × A × A

& ?,%$ LM?q.2;4

#TH ?,

n ∈ d

tUu,'+#9& $'$J,.>@L , 6 @$$>?H,'

n

\4

I

n

$*,%@>

n

$Q2?#

n

$

& ?,',@P &&#*,,'\I,'N #=,.?0&0\S[$'TH#=-#4.mxPy ,6

I,Z#$-$W@LQ>? #,;4

Y7YW###4V.LM ,.

e d

P?]pjTH+#

]>-1C9$ 6 Y9$*$'?THX,.+# $QLM-T , 6 G&&##TH ?,

-#@,'"& - $+j><,',6 [$'?T!+#Z8N "Of&T!,@P 7$'TH+#& ,;4

Lv-?T Y

Y7ZY9##

?T!,9, 6

d

'pfd$N$'=T!+#4

e

,.H.LM7,'!,6 b&&#X #=,.xP ;, 6 'T!?-

Y7[Y9##

$

e x

Y 6

x

$G$'?THW #TH ?,7TH @$1N$6 J, 6 <LM

σ T =x (e)

P

3.2 Logical algebra

5 i%2 J4 %$-,. #=,.

r

&- $+j$" & ?+S ',.

#$'k@,'

r

.,.-> ,6

^

+j$-$'\#40%$-,'

_

&-%$'+S?>H,.+# $PSRW,6 G$-,%+S@,'-$W-W,6 [&J,' $=K+I&.,

×

, 6

B,6 $%,7j &

\

^Y 6 &6 @,9 #=T!,.+#&,.%$_P

ykW& $' 9+ &,.%$W@L],6 LM'T

A i θ c

A i θ A j

Y 6 -

c

$9b&$-,.?,@P

θ

>%$

2I , 6 &?T!+,.-$

{=

<

>

≺≺ }

≺≺

#4K++#4<,.

I

2# $P

Ox.,

pred

\jB0+-&,.B2,'T!&H@,-,.-\I,.%$NLM?T

r

r

s

P # &%,'$

σ pred

6 %2I9,6 W$'#$'TB,.&%$P? 3J

r B C pred s

$7%mK@$

σ pred (r × s)

P q&2I & Y7

Y9###$'b$W?I,'3J?$

B C@ pred

!$'TH3J$

B < pred

^

#,6 ?> 6 $J,.&%,'#4!$'+SI>V,6 %4B

-,,.9,6 7#>?\

_

P@,6 X$'.,X@L ,

4%,X$'.LM#S+S,.-$

-

nested joins

@,.

B C n

pred

nested outerjoins

@,.

B C@ n

pred

YW,6 , 6 9LM##Y9>H$TH?,.& $

r B C@ n pred s={(t 1 , {t 2 ∈ s | pred(t 1 , t 2 )}) | t 1 ∈ r}

r B C n pred s={(t 1 , {t 2 ∈ s | pred(t 1 , t 2 )} ) | t 1 ∈ r, {t 2 ∈ s | pred(t 1 , t 2 )} 6= ∅ }

!,. %$-,.>&#$-$GLx#>?&#3J?B+j ','?J$

^

%$'+xP?%$-,'Z3-$

I,'3-$

%$-,'H?I,';U

3J$

$T!3J$

_ $*?\I,.bY 6 [, 6 q+ &,' $Q&?T!+,. $

≺≺

^[,6 G+S

,-,.\I,.%$9W,.m -$qLM?T

I

_ P &6 +j ','?J$9-W&##

structural joins

PRZ\$;2IW,6 ,

Y7!#4f.LM,.

logical structural joins

+j ?,.#4 @L1?4f+ 6 4$'&#q=TH+#T!,%,.

#>?, 6 T Ij-,W#>?,6 T!$7&K\S%2$' hAC

@EcP

Ox.,

A 1 , A 2 , . . . , A k

\S0$?TH,.?TH&

r

,,'\I,' $PX +@3J &%,'

π A1,A2,...,Ak (r)

\?4

.Lv#,b $[@,[#TH,.+#&,' $P

+#&,'%U; #=T!,.>0+-@3- &.,.$-b$'>?# hI,N\4

N$+j -$&-+I,

$7

π 0

P 576 >?-?+IUc\?4K+S,.

γ A

1

,A

2

,...,A

k

K%$-,

u B

Y 6 -

B

$9

& ## &%,',,.-\I,.

6 2W,

6

W$#x$TH?,.& $ZAD.EcP

ykG$'7,

6

map

T!%,.U;+j ',. ,.Z%m9#> \'&W+S,.-$XY 6 &6

++#4

inside

$J,.

,'+#%$POx%,

op

\jQGJ4W?+S ',.

r.A 1 .A 2 . . . . .A k−1

q& ?##&.,.?[,,'\I,'

r.A 1 .A 2 . . . . .A k

K,'T!&,,'\I,'?P

576

map(op, r, A 1 .A 2 . . . . .A k )

$1b;4K+S@,'

Références

Documents relatifs

Assuming that the code table is sorted by a total order, the algorithm traverses the code table and selects the first pattern that is contained in the specified transaction (line

where is the height of a lidar point of interest, is the height threshold for surrounding lidar points calculated by the accumulative histogram algorithm,

Le protocole spanning tree utilise les BPDU pour élire le commutateur root et le port root pour le réseau commuté, aussi bien que le port root et le port désigné pour chaque

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

Kando Text structure analysis based on human recognition: cases of newspaper articles and English newspaper articles. Bulletin of the National Center for Science Information Systems,

To assess the efficiency of the proposed approach, several tests were performed to help end-users to extract (interac- tively) a hierarchy of different complex urban patterns

• Join Hyperlinks are assoiations between two Nodes under Constraint pruning non relevant trees on onstraints (values or order operator). • Constraint Hyperlinks are assoiations

Data structures such as VP-Tree, R-Tree and KD-Tree builds an index of all the data available in the offline phase and uses that indexed tree to search for and answer nearest