Database Reference
In-Depth Information
Finally, the update of the relation r
A
, which changes its extension from
t RA )
α(r)
=
r
# into α 1 (r)
=
o U (r
# , is represented in the DB category
α (
α 1 (
as the composed morphism f U =
Eval(o U )
h r :
A
)
A
) .
By generalization, the updates of k
1 different relations r 1 ,...,r k of
a given schema
A
such that for each of them we have the morphisms
h r i , Eval(o U i ) , i
=
1 ,...,k can be represented in DB by a composed morphism
Eval(o U i )
h r i
α (
α 1 (
f U =
:
A
)
A
),
(5.1)
1
i k
1
i k
t RA i )
=
r i # , α 1 (r i )
=
# ,for i
=
where α(r i )
o U i (r
1 ,...,k , with the
t RA i # ,for i
r 1 ,...r k }
) and α(r i )
B =
{
=
r i
=
intermediate schema
(
,
1 ,...,k , and for each r A A
∈{
r 1 ,...r k }
=
with r A /
, α 1 (r A )
α(r A ) .
(ii) The operation of inserting the set
{
d 11 ,...,d 1 n
,...,
d m 1 ,...,d mn }
of m
1
tuples of a relation r I into a given relation r
(used in the operation of
update above) corresponds to the following term in Σ RE
A
INSERT INTO r
[
S
]
...,
in a nonempty relation) to the path-term, (r r I ) RE-
DUCE S 1 TO S ,ofthe Σ RA algebra, with the leaf r equal to Cartesian
product (r r I ) , where S 1 =
equivalent (if
r
nr r (n +
1 ),...,nr r ( 2 n)
and S =
nr(r) =
nr r ( 1 ),...,n r r ( n)
(if
r
={}
is an empty relation, than this path-term
=
is r I WHERE 1
1).
Hence, it corresponds to the arrow o I =
r I )
:
_ REDUCE S 1 TO S
(r
r I ) in RA . That is, from Proposition 24 , for a schema
r }
o I (r
B =
(
{
,
) with
r I # , we obtain the DB -morphism Eval(o I )
α(r )
α (
α 1 (
=
r
:
B
)
A
) ,
where α 1 is the R-algebra obtained from α after this insertion (with α 1 (r)
=
r I )
o I (r
# and for each r A A
such that r A =
r , α 1 (r A )
=
α(r A ) ).
α (
α (
) such that α(r ) is
Let us show that there is a morphism h r :
A
)
B
the result of an inter-schema mapping
M AB : A B
. It is easy to show that
M AB ={
Φ
}
, where Φ is equal to SOtgd:
x r( x )
r x
d 11 ,...,d 1 n ∧···∧∀
x r( x )
;
r x
d m 1 ,...,d mn ,
;
α ( M AB )
α (
α (
so that we have the morphism h r =
:
A
B
)
) , where
M AB =
{
}
={
v 1 ·
q A, 1 ,...,v m ·
q A,m , 1 r }
MakeOperads(
Φ
)
for which the
R-algebra α is a mapping-interpretation, q A,i
O(r,r q,i ) is an operation
O(r q,i ,r ) with
of expression ( _ ) 1 ( x )
( _ )( x
;
d i 1 ,...,d in
) and v i
α(r ) is an injective function for each i
α(v i )
:
α(r q,i )
=
1 ,...,m , so that
1 i m Im(α(v i ))
= 1 i m α(r q,i )
r I # .
Consequently, this insertion is represented in the DB category by the com-
posed morphism f I =
α(r )
=
=
r
α (
α 1 (
Eval(o I )
h r :
A
)
A
) .
Search WWH ::




Custom Search