Database Reference
In-Depth Information
3. The integrity-constraints mapping operad,
MakeOperads
EgdsToSOtgd
Σ
egd
G
T
GA
=
TgdsToCanSOtgd
Σ
tgd
G
:
G
→
A
.
∧
The sketch category derived by this data integration system is denoted by
Sch
(
I
)
and represented in the left side of the following diagram:
Example 27
, both of arity 2 and
having as key the first attribute, with the following foreign key constraints in
Suppose that we have two relations
r
and
s
in
G
G
:
1.
π
2
(r)
⊆
π
1
(s)
,ofthetgd
∀
x
∀
y(r(x,y)
⇒∃
zs(y,z))
, with
K
={
1
}
key indexes
of
s
, and
K
={
.
2.
π
1
(s)
⊆
π
1
(r)
,ofthetgd
2
}
∀
x
∀
z(s(x,z)
⇒∃
yr(x,y))
, with
K
={
1
}
key indexes
of
r
, and
K
={
1
}
.
That is,
G
=
(S
G
,Σ
G
)
with
S
G
={
r, s
}
, ar(r)
=
ar(s)
=
2 and
G
=
∀
y
r(x,y)
zs(y,z)
,
z
s(x,z)
yr(x,y)
.
Σ
tgd
x
∀
⇒∃
∀
x
∀
⇒∃
Each
certain answer
of the original user query
q(
x
)
,
x
=
(x
1
,...,x
k
)
over a global
schema is equal to the answer
q
L
(
x
)
can(
I
,
D
)
of the
lifted
query
q
L
(
x
)
, equivalent
to the formula
q(
x
)
∧
Va l(x
k
)
, over this canonical model (the unary
predicate
Va l(
_
)
was introduced in Sect.
3.4.2
for the weak equivalence of databases
with Skolem marked null values in
SK
).
Thus, if it is possible to materialize such a canonical model, the certain answers
could be obtained over such a database without query rewriting. Often it is not pos-
sible (as in this example) if this canonical model is
infinite
. In such a case, we can
Va l(x
1
)
∧···∧