Database Reference
In-Depth Information
(a)
I
T
(φ
Ai
(
x
)/g)
1, that is, when
I
T
(e
=
[
(
_
)
n
/r
n
]
1
≤
n
≤
k
/g)
=
1 (see the comments
after Definition
11
).
From (a), the statement
{
π
j
h
(
d
j
)
=
π
n
h
(
d
n
)
|{
(j
h
,j),(n
h
,n)
}∈
S
}
is true
and, by Definition
11
,
g
∗
(
t
)
=
α(q
i
)(
d
1
,...,
d
k
)
∈
I
T
(r
B
)
(from assumption
of this proposition), that is, equivalently;
(b)
I
T
(r
B
(g
∗
(
t
)))
I
T
(r
B
(
t
)/g)
1.
Thus, from (a) and (b), we obtain
I
T
((φ
Ai
(
x
)
=
=
⇒
r
B
(
t
))/g)
=
1, and hence
from the fact that it holds for every
d
1
,...,
d
k
∈
R
1
×···×
R
k
, we obtain by
generalization that
I
T
(
∀
x
(φ
Ai
(
x
)
⇒
r
B
(
t
)))
=
1.
Vice versa, if
I
T
(
∀
x
(φ
Ai
(
x
)
⇒
r
B
(
t
)))
=
1, then for each
d
1
,...,
d
k
∈
R
1
×
R
k
such that
{
···×
π
j
h
(
d
j
)
=
π
n
h
(
d
n
)
|{
(j
h
,j),(n
h
,n)
}∈
S
}
is true, with
d
=
Cmp(S,
d
1
,...,
d
k
)
and the assignment
g
derived from the substitution
,
I
T
((φ
Ai
(
x
)
1. Hence, if
I
T
(φ
Ai
(
x
)/g)
[
x
/
d
]
⇒
r
B
(
t
))/g)
=
=
1, that is, if
I
T
(e
1, then
I
T
(r
B
(
t
)/g)
I
T
(r
B
(g
∗
(
t
)))
1, i.e.,
g
∗
(
t
)
[
(
_
)
n
/r
n
]
1
≤
n
≤
k
/g)
=
=
=
∈
I
T
(r
B
)
. Moreover, from Definition
11
,
g
∗
(
t
)
=
α(q
i
)(
d
1
,...,
d
k
)
and hence
α(q
i
)(
d
1
,...,
d
k
)
∈
I
T
(r
B
)
.
Let us explain the mapping-interpretations by the following example:
Example 11
Let us consider Example 5.2 in [
5
] for the composition of SOtgds
M
AD
=
M
BD
◦
M
AB
, where
A
=
(S
A
,
∅
)
and
S
A
={
Emp
(x
e
)
}
with a single unary
relational symbol of employees,
}
with
Emp1
intended as a copy of
Emp
and
Mgr
a binary relational symbol that asso-
ciates each employee with a manager, and
B
=
(S
B
,
∅
)
and
S
B
={
Emp1
(x
e
),
Mgr
(x
e
,x
m
)
}
with a single unary relational symbol that is intended to store employees who are
their own manager, and with mappings
M
AB
=
∀
x
e
Emp
(x
e
)
⇒
Emp1
(x
e
)
,
∀
x
e
Emp
(x
e
)
⇒∃
x
m
Mgr
(x
e
,x
m
)
,
D
=
(S
D
,
∅
)
and
S
D
={
SelfMgr
(x
e
)
or equivalently, by the following SOtgd:
M
AB
=
∃
f
1
∀
x
e
Emp
(x
e
)
⇒
Emp1
(x
e
)
∧∀
x
e
Emp
(x
e
)
⇒
Mgr
x
e
,f
1
(x
e
)
,
M
BD
=
∀
x
e
Mgr
(x
e
,x
e
)
⇒
SelfMgr
(x
e
)
.
Consequently, from the new algorithm for composition we obtain
M
AD
=
∃
f
1
∀
x
e
Emp
(x
e
)
∧
x
e
f
1
(x
e
)
⇒
SelfMgr
(x
e
)
.
.
=
Therefore,
M
AB
=
MakeOperads(
M
AB
)
={
q
1
,
1
r
∅
}
where
q
1
∈
O(
Emp
,
SelfMgr
)
is an abstract operation represented by the expres-
sion
((
_
)
1
(x
e
)
.
=
∧
(x
e
f
1
(x
e
)))
⇒
(
_
)(x
e
)
and by a composition
q
1
=
v
1
·
q
A,
1
where
q
A,
1
∈
O(r
q
,
SelfMgr
)
, with a new relational symbol
r
q
for the relation obtained by the query
Emp
(x
e
)
O(
Emp
,r
q
),v
1
∈
.
=
∧
(x
e
f
1
(x
e
))
.