Database Reference
In-Depth Information
A
→
A
where the
r
q
=
rsym(q
i
(
x
i
))
∈
S
A
is a new introduced relational sym-
bol for this query with
ar(r
q
)
=|
(the number of variables in the tuple
x
i
). For a given mapping interpretation
α
with
A
x
i
|
α
∗
(
=
A
)
,
Flux(α,
M
A
A
)
=
T(
A
)
.
The union of conjunctive queries
q
1
(
x
i
),...,q
k
(
x
i
)
with the same head
q
i
(
x
i
)
is
represented
by
an
atomic
mapping
M
A
A
={
q
1
,...,q
k
,
1
r
∅
}:
A
→
A
, where each
q
i
,1
≤
i
≤
k
, is defined above and
Flux(α,
M
A
A
)
=
T(
1
≤
i
≤
k
q
i
(
x
i
)
A
)
.
•
For more complex atomic mappings that use a set of tgds
S
from
B
(each one is an implication with left-hand side equal to a conjunctive query
q
m
(
x
m
)
over a schema
A
into
A
), the atomic mapping is equal to the set of operad's
operations in
MakeOperads
TgdsToSOtgd(S)
:
A
→
B
.
M
AB
=
2. I
NTEGRITY
-
CONSTRAINTS MAPPING
—used for specification of schema in-
tegrity constraints (in Definition
2
, Lemma
2
and Lemma
3
):
2.1. By SOtgd
Ψ
=
Tg
dsToConSOtgd(Σ
tgd
A
)
for tgds, with implications
(φ
A
(
x
)
∧
¬
⇒
r
(
0
,
1
)
.
2.2. By SOtgd
Φ
r(
t
))
Eg
dsToSOtgd(Σ
egd
A
=
)
for egds, with implications
(φ
A
(
x
)
∧
(
0
,
1
)
.
Consequently, we obtain an atomic integrity-constraint schema mapping
T
AA
=
{
(
y
=
z
))
⇒
r
}
={
Φ
∧
Ψ
q
1
,...,q
k
,
1
r
∅
}:
A
→
A
,
with operad's operations
q
i
=
v
i
·
q
A,i
, such that
q
A,i
∈
O(r
1
,...,r
n
,r
q
)
,
v
i
∈
O(r
q
,r
)
, and
{
r
1
,...,r
n
}⊆
S
A
,for1
≤
i
≤
k
.
The semantics of the integrity-constraint mappings and the conditions for a
mapping-interpretation
α
(i.e., R-algebra that satisfies the conditions in Defini-
tion
11
) such that it corresponds to a given
model
(an instance that satisfies all
integrity constraints) of a database schema
A
will be defined in Sect.
4.1
.This
integrity-constraints mapping over a given database schema is used only in order to
specify the subset of interpretations
α
that are the models of this schema database.
Consequently, the integrity-constraints mappings do not have any rule in the sequen-
tial compositions of database mappings (differently from the view-mappings). We
recall that the integrity-constraints arrows (for any mapping-interpretation
α
)inthe
DB
category have an empty information flux as it was demonstrated in Sect.
2.4.3
.
Corollary 8
Each simple atomic sketch's arrow
M
AB
:
A
→
B
is obtained from an
atomic schema mapping
-atomic sketch's arrow is
obtained by structural operators in Definition
15
and a set of simple sketch's atomic
arrows
.
M
AB
:
A
→
B
.
Each complex
Proof
The single query sketch's mapping
MakeOperads
∀
x
q(
x
)
r
q
(
x
)
M
A
A
={
q,
1
r
∅
}=
⇒