Database Reference
In-Depth Information
We denote the obtained sketch category from this sketch-graph G(
A
) by
Sch
(G(
A
))
.
A
Each mapping-interpretation α for the schema-mapping graph G(
) is a functor
α
∗
:
=
α
∗
(
A
)
,
the unique instance of “FOL-identity” schema A
T
=
α
∗
(
A
)
{
α(r
),
⊥}
Sch
(G(
A
))
−→
DB
as well
,
such that it generates an instance database A
,
where α(r
)
=
R
=
,
and the following arrows in
DB
:
α
∗
(
M
AA
)
1.
{
α(
1
r
)
|
r
∈
S
A
}∪{
q
⊥
}
:
A
−→
A
,
and
α
∗
(
M
A
A
)
{
α(
1
r
),q
⊥
}
:
A
T
→
A
T
.
α
∗
(
T
AA
)
A
T
with empty flux f
Σ
A
=
0
.
α
∗
(
T
AA
)
2.
f
Σ
A
:
A
−→
=⊥
A
⊆
A
Proof
The sketch-graph
G(
))
is a particular case of a database-
mapping sketch-graph in Definition
14
with the mapping-operads edges defined
above. We have to show that each mapping-interpretation
α
(satisfying Defini-
tion
11
) is a functor
α
∗
:
)
Sch
(G(
Sch
(G(
A
))
−→
DB
:
Claim 1. The arrows
M
AA
:
A
→
A
are the identity
mapping-operads (obtained from identity schema mappings as shown in
the proof of Proposition
1
) in Sect.
2.4
. Hence, they are the identity ar-
rows in the sketch category
Sch
(G(
and
M
A
A
:
A
→
A
))
. Let us show that their functorial
translation in
DB
, that is, the morphisms in point 1 of this proposition, are
the identity arrows as well.
Indeed, the morphism
A
{
|
∈
S
A
}∪{
q
⊥
}
is the set of identity func-
tions
α(
1
r
)
:
α(r)
→
α(r)
and hence this morphism is equal to its in-
verse and, consequently, it is the identity morphism
id
A
:
A
→
A
(as it
has been shown in the proof of Theorem
1
). Analogously, the morphism
{
α(
1
r
)
r
.
Claim 2. The functorial property of
α
∗
for the composition of arrows is valid (see
the proof of Theorem
1
), i.e.,
α
∗
(
M
BC
◦
α(
1
r
),q
⊥
}
is the identity morphism
id
A
:
A
→
A
α
∗
(
M
BC
)
α
∗
(
M
AB
)
.
M
AB
)
=
◦
The property for the empty flux is satisfied,
f
Σ
A
=⊥
0
={⊥}
of the ar-
row
f
Σ
A
:
A
in the
DB
category, as it holds from Example
12
,
Definition
13
and Corollary
6
.
A
−→
in the
DB
category has
always
the empty information flux, i.e., also when
A
is a model of a database schema
From the fact that the morphism
f
Σ
A
:
A
−→
A
A
(when all integrity constraints of a database schema are satisfied), the sequential
composition of these integrity-constraint arrows with other arrows is meaningless
because such a composed arrow in the
DB
category has the empty information flux
as well, while in the operational semantics we are interested only in the arrows in
G
that have a nonempty information flux. Thus, we will use only non-integrity-
constraint arrows in a graph
G
for their meaningful mutual compositions.
Remark
From Definition
13
and Corollary
6
, the information flux of the integrity-
constraint mapping operad
T
AA
of a schema
A
=
(S
A
,Σ
A
)
is always empty (equal
α
∗
(
T
AA
)
has the
empty flux, and hence
f
Σ
A
is equivalent to the empty morphism
0
). Consequently, for every mapping interpretation
α
,
f
Σ
A
=
to
⊥
1
⊥
:
A
→
A
.
1
Obviously, we will not use the empty morphism
⊥
={
q
⊥
:⊥→⊥}
instead of the
α
∗
(
T
AA
)
α
∗
(
atomic morphism (in Definition
18
),
f
Σ
A
=
=
{
q
i
=
v
i
·
q
A,i
|
q
i
∈