Database Reference
In-Depth Information
Let for a schema
r
(
0
,
1
)
be an implication
χ
in the SOtgd obtained from the algorithm
EgdsToConSOtgd
of a given normalized
implication
(φ
Ai
(
x
)
A
=
(S
A
,Σ
A
)
,
(φ
Ai
(
x
)
∧¬
r(
t
))
⇒
⇒
r(
t
))
of a given tgd in
Σ
A
, with
{
r
1
,...,r
k
}⊆
S
A
the set of
all relational symbols of
that appear in the conjunctive formula
φ
Ai
(
x
)
.
Then, based on the algorithm
MakeOperads
, from this implication
χ
we obtain
the operad's operations
q
A,i
∈
A
)
suc
h
t
ha
t
q
A,i
is the expression obtained from the implica
ti
o
n
(φ
Ai
(
x
)
∧¬
r(
t
))
⇒
r
q
i
(
0
,
1
)
,
that is, the expression
(e
∧¬
(
_
)
k
+
1
(
t
))
⇒
(
_
)(
0
,
1
)
(the expression
e
on the left-
hand side of the implication is obtained from the formula
φ
Ai
(
x
)
where each rela-
tional symbol
r
m
is replaced by a place symbol
(
_
)
m
,for1
O(r
1
,...,r
k
,r,r
q
i
)
and
v
i
∈
O(r
q
i
,r
≤
m
≤
k
). Thus:
1. If the integrity condition given by the tgd
∀
x
(φ
Ai
(
x
)
⇒
r(
t
))
is satisfied then
φ
Ai
(
x
)
r(
t
)
is false for each assignment
g
to variables in
x
and hence, from
Definition
11
for the mapping-interpretation
α
, for each
∧¬
d
1
,...,
d
k
+
1
∈
α(r
1
)
×
ar(r)
···×
×
U
\
d
1
,...,
d
k
+
1
=
α(r
k
)
(
α(r))
,
α(q
A,i
)(
)
, so that
α(q
A,i
)
is a
constant functions and
α(r
q
)
={}
and hence
α(v
i
)(
)
=∈
α(r
)
=
R
=
.
Consequently, the function
α(v
i
)
is an injection.
2. If this integrity constraint
is not
satisfied then there exists a tuple
d
which defines
an assignment
g
for the variables in
x
such that
φ
Ai
(
x
)/g
∧¬
r(
t
)
is true and, for
the o
p
e
ra
d's operation
q
i
=
v
i
·
q
A,i
(i.e., the expression
(e
∧¬
(
_
)
k
+
1
(
t
))
⇒
(
_
)(
0
,
1
)
), from Definition
11
,for
d
1
,...,
d
k
+
1
∈
α(r
1
)
×···×
α(r
k
)
×
d
1
,...,
d
k
+
1
)
and
{
π
j
h
(
d
j
)
=
π
n
h
(
d
n
)
|
ar(r)
(
U
\
α(r))
such that
d
=
Cmp(S,
{
(j
h
,j),(n
h
,n)
}∈
S
}
is true,
α(q
A,i
)
d
1
,...,
d
k
+
1
=
g
∗
=
g(
0
),g(
1
)
0
,
1
∈
0
,
1
=
α(r
q
),
so that
α(v
i
)(
0
,
1
)
=
(because
0
,
1
∈
/
α(r
)
=
R
). Consequently, the
=
function
α(v
i
) is not
an injection.
Consequently, Corollary
4
can be applied to a schema mapping that represents the
integrity constraints
Σ
A
=
Σ
egd
Σ
tgd
A
A
∪
over a given schema
A
, that is, to the map-
EgdsToSOtgd(Σ
egd
A
TgdsToConSOtgd(Σ
tgd
A
ping
AA
={
)
∧
)
}:
A
→
A
,froma
schema
A
into the auxiliary schema
A
=
(
{
r
}
,
∅
)
.
Let us now consider the examples of Corollary
4
for the schema mappings, based
on the SOtgds obtained from the set of tgds. The first one is a continuation of Ex-
ample
8
.
Example 13
For the operads defined in Example
8
, let a mapping-interpretation
(an R-algebra)
α
be an extension of Tarski's interpretation
I
T
of the source schema
A
=
(S
A
,Σ
A
)
that satisfies all constraints in
Σ
A
and defines its database instance
α
∗
(S
A
)
=
={
|
r
i
∈
S
A
}
C
A
α(r
i
)
and, analogously, an interpretation of
.
Let
α
satisfy the SOtgd of the mapping
M
AC
by the Tarski's interpretation for
the functional symbols
f
i
,for1
2, in this SOtgd (denoted by
I
T
(f
i
)
).
Then we obtain the relations
α(
EmpAcme
)
,
α(
EmpAjax
)
,
α(
Local
)
,
α(
Office
)
, and
α(
CanRetire
)
. The interpretation of
f
Over
65
is the characteris-
tic function of the relat
io
n
α(
Over65
)
in the instance
B
≤
i
≤
α
∗
(S
B
)
of the database
=
B
=
(S
B
,Σ
B
)
, so that
f
Over
65
(a)
=
1if
a
∈
α(
Over65
)
.