Database Reference
In-Depth Information
It is easy to verify the first two facts, from the equivalent query-rewriting,
T
r
q
(
x
)
,
⊥
⊆
f
in
=
h
q
=
h
q
E
=
h
q
U
=
I
T can(
,D),
that is,
h
q
≈
(
1
)
in diagram (1) above) and
h
q
E
(corresponding to the equivalence
h
q
E
≈
(
2
)
in diagram (2) above).
Consequently, from the commutative diagrams above,
h
q
E
=
Tf
OP
h
q
U
(corresponding to the equivalence
in
◦
h
q
◦
f
in
,
corresponding to point 1 of this proposition, and
h
q
U
=
Tf
O
M
◦
h
q
E
◦
f
M
, corre-
sponding to point 2 of this proposition.
r
ret(
I
,D)
⊆
r
can(
I
,D)
. However, the only new
information transmitted by the monomorphism
f
in
is that obtained by Skolem's
functions, which is not considered by certain-answers to queries, and this fact ex-
plains why for each query
q(
x
)
over
can(
Note that for every
r
∈
G
,
I
,D)
we have the equivalent to it query
exp
.
From the definition of the weak observational equivalence and its weak power-
view endofunctor
T
w
in Definition
29
and Proposition
12
, we obtain
T ret(
(q(
x
))
with the
same
certain answer
r
q
G
I
,D)
=
T
w
(can(
I
,D))
can(
I
,D)
so that
T
r
q
(
x
)
can(
I
,D)
,
⊥
⊆
T
w
can(
,D)
=
h
q
=
I
T ret(
I
,D)
(from the fact that a query
q(
x
)
is lifted and hence
r
q
(
x
)
can(
I
,D)
has no Skolem
constants) and
h
q
E
⊆
,D)
: it explains why it is possible to have
h
q
E
=
h
q
.
Let us show that the relationships between an original and its rewritten queries
over retrieved and source databases can be represented by the morphisms in
DB
category:
T ret(
I
:
Example 26
Let us consider the two ordinary morphisms (1-cells) in
DB
,
f
−→
:
−→
A
D
in Example
24
, in the case of the commutative diagram (1)
provided in the proof of Theorem
8
, that is, when
A
B
,
g
C
=
can(
I
,D)
,
B
=
T can(
I
,D)
,
f
h
q
E
with
C
replaced by
D
and
D
replaced by
TD
.
From the fact that
h
q
≈
h
q
E
in the proof of Theorem
8
, it is equivalently repre-
sented by
h
q
h
q
E
and
h
q
E
h
q
(from Theorem
6
). However, we have shown in
Theorem
6
that
h
q
h
q
E
(and similarly for other case) in
DB
can be represented
by an ordinary 1-cell (morphisms)
β
1
:
h
q
→
h
q
E
=
h
q
and
g
=
and hence (from Example
24
)the
following diagrams commute: