Database Reference
In-Depth Information
Let us consider now the unfolding of the 'update' operations _
a,name,e
(i.e.,
Σ
RA
,as
'EXTEND...') along the paths composed of unary operations in
Σ
RA
\
follows:
Definition 34
The unfolding of an operation _
a,name,e
along a path composed
Σ
RA
, for a given term
t
RA
and corresponding relational
of unary operations in
Σ
RA
\
symbol
r
, such that
r
=
t
RA
,
name /
∈
nr(r)
, is defined by the following cases:
1.
(t
RA
RENAME
name
2
AS
name
1
)
a,name,e
→
(t
RA
)
a,name,e
nr
, where
e
nr
is obtained from
e
by substitution of
name
1
with
name
2
.
2.
(t
RA
[
]
→
[
]
S
)
a,name,e
((t
RA
)
a,name,e
)
S
&
name
.
3.
(t
RA
WHERE
C)
a,name,e
→
((t
RA
)
a,name,e
)
WHERE
C
.
4. Let
S
1
=
nr
r
(i),... , nr
r
(i
+
k)
and
S
2
=
nr
r
(j),...,nr
r
(j
+
k)
for
i
≥
1,
k
≥
0,
j>i
+
k
and
j
+
k<ar(r)
, then
4.1.
(t
RA
REDUCE
S
2
TO
S
1
)
a,name,e
→
((t
RA
a,name,e
)
a(
1
),
name
1
,e
rn
)
REDUCE
[
S
2
+
]
TO
[
S
1
+
]
, where
S
2
+
=
nr
r
(i),... , nr
r
(i
+
k),name
1
,
S
1
+
=
nr
r
(j),...,nr
r
(j
+
k),name
and
e
nr
is obtained from
e
by replacing for every 1
≤
m
≤
k
,
nr
r
(i
+
m)
∈
S
1
with
nr
r
(j
+
m)
∈
S
2
a
, and
name
1
a fresh new name not in
nr(r)
.
4.2.
(t
RA
DISJOINT
S
2
FROM
S
1
)
and
a(
1
)
=
a,name,e
→
(t
RA
a,name,e
)
DISJOINT
[
S
2
]
FROM
[
S
1
]
.
Let us show how the unfolding of the operations _
a,name,e
(i.e., 'EX-
Σ
RA
, given by
TEND...') along a path composed of unary operations in
Σ
RA
\
Definition
34
, and of the binary operation _ TIMES _ (or _
_), can be used in
order to transform any tree-term
t
RA
∈
T
RA
X
into an equivalent single path-term
with the unique leaf
t
RA
∈
T
RA
X
(a Cartesian product of (eventually updated) rela-
tional tables), by the following tree-term transformations, presented in the following
example with a number of diagrams:
⊗