Database Reference
In-Depth Information
DB
Sch
(G)
, that is, we can have the
functors from
Sch
(G)
into
DB
such that they are not the mapping-interpretations
(as provided by Definition
11
), for example:
But we have the graphs
G
such that
Int(G)
⊂
Example 25
Let us consider the graph
G
composed of two schemas
A
=
(
{
r
1
,r
2
}
,
∅
)
and
B
=
(
{
r
3
}
,
∅
)
, where
ar(r
i
)
=
2,
i
=
1
,
2
,
3, with unique mapping
M
={
Φ
}:
A
→
B
where
Φ
is the SOtgd
∀
x,y,z((r
1
(x,y)
∧
(y,z))
⇒
r
3
(a,z))
.
We can define another graph
G
1
with the same schemas
A
and
B
but with the map-
ping
M
1
={
Ψ
}:
A
→
B
where
Ψ
is the SOtgd
∀
x,y,z,w((r
1
(x,y)
∧
(w,z))
⇒
α
∗
(
r
3
(a,z))
. Let us consider an R-algebra
α
such that
A
=
A
)
={
R
1
,R
2
,
⊥}
and
α
∗
(
B
=
B
)
={
R
3
,
⊥}
with
=
(a
1
,b
1
),(a
1
,b
2
)
,
R
1
=
α(r
1
)
=
(b
1
,c
1
),(b
3
,c
2
)
,
R
2
=
α(r
2
)
=
(a,c
1
),(a,c
2
)
,
R
3
=
α(r
3
)
α
∗
(
and
g
=
M
)
={
α(q
1
)
·
α(v
1
),q
⊥
}:
A
→
B
where
α(v
1
)
:
α(r
q
)
→
R
3
is an injection and
f
=
α(q
1
)
:
R
1
×
R
2
→
α(r
q
)
is the function with the
graph
{
((a
1
,b
1
),(a,c
1
)),((a
1
,b
1
),(a,c
2
)),((a
1
,b
2
),(a,c
1
)),((a
1
,b
2
),(a,c
2
))
}
,
and where
α(r
q
)
R
3
(i.e., image of
f
).
It is easy to verify that
α is not
a mapping-interpretation of
=
G
. In fact,
in order for it to be a mapping-interpretation, the graph of
f
has to be equal to
{
M
∈
((a
1
,b
1
),(a,c
1
))
}
.But
α
is a well defined functor from the fact that
f
∈
Mor
DB
,
and other arrows in
Sch
(G)
are only the identity arrows of
.Infact,we
have that
α
is a mapping-interpretation of the graph
G
1
, so that from Theorem
1
,
f
A
and
B
α
∗
(MakeOperads(
=
M
2
))
:
A
→
B
, so that
f
is a well defined morphism in
DB
.
It is easy to verify that there is at most
one
arrow between any given two nodes in
the obtained sketch
Sch
(G)
. For any object
in
Sch
(G)
, we have its identity arrow
and possibly an integrity-constraint arrow
T
AA
.
A
4.1.3 Models of a Database Mapping System
There is a fundamental functorial-
interpretation
relationship between the schema
mappings and their models in the instance-level category
DB
. It is based on the
Lawvere categorial theories [
1
,
9
], where he introduced a way of describing alge-
braic structures using categories for theories, functors into base category
Set
(which
we substitute by a more adequate category
DB
) and natural transformations for mor-
phisms between models. For example, Lawvere's seminal observation is that the
theory of groups is a category with a group object, that a group in
Set
is a prod-
uct preserving functor, and that a morphism of groups is a natural transformation of
functors. This observation was successively extended to define the categorial seman-
tics for different algebraic and logic theories. This work is based on the theory of