Database Reference
In-Depth Information
Byasketchmemeana4-tuple (G,u,D,C) where G is a graph, u
:
V G
E G is
a function which takes each vertex (node)
, D is a
class of diagrams in G , and C is a class of (co)cones in G . Each (c)cone in G goes
(to)from some vertex (from)to some diagram; that diagram need not be in D and, in
fact, it is necessary to allow diagrams which are not in D as bases of (co)cones.
Notice that, differently from the work dedicated to categorical semantics of
Entity-Relationship internal relational database models where nodes of sketches are
single relations, here, at a higher level of abstraction, the nodes are whole databases.
Consequently, in such a framework, we do not use commutative database mapping
systems and hence D is an empty set. In fact, in a database mapping system, the
(co)cone diagrams above will never be used in practical representations of database
mapping systems. Instead of that, they will be alternatively used only for their
self-consistent parts, as a first diagram above, or, equivalently, as a single arrow
M : A
A
in V G to an arrow from
A
to
A
B C
.
However, for the introduced schema composition operator †, the above cone and
cocone diagrams have to be presented in C for our sketches.
Consequently, we obtain the following fundamental lemma for the categorial
modeling of database mappings:
Lemma 6 The Set cannot be used as the base category for the models of database-
mapping sketches .
Proof Let E
(G,u,D,C) be a database sketch where C is a set of (co)cones of
the two diagrams introduced for the database schema composition operator †, and
a model of this sketch be a functor F :
=
is a base category. Then all
cones in C have to be functorially translated into limit commutative diagrams in
E
→B
where
B
B
and all cocones in C have to be functorially translated into colimit commutative
diagrams in
, i.e., the cocone in the figure in Sect. 3.1 has to be translated into a
coproduct diagram and the cone has to be translated into a product diagram in
B
B
.
Consequently, the object F(
A
B
) has to be both the product A
×
B and coproduct
A
+
B , where A
=
F(
A
) and B
=
F(
B
) are two objects in
B
;
×
and
+
are the
product and coproduct operators in
. However, this cannot be done in Set . In fact,
the product A × B in Set is the Cartesian product of these two sets A and B , while
the coproduct A
B
+
×
+
B is not an isomor-
phism in Set . Another reason is that any morphism in Set is a single function, while
in our case it is a set of functions (or a binary relation of tuples obtained by union
of graphs of this set of functions).
B is the disjoint union. Hence, A
B
A
Remark The fundamental consequence of this lemma is that we need to define a
new base category for the categorial semantics of database mappings.
In fact, this is the first task that has to be done and we will define this new base
category
, denoted by DB (DataBase) category, and will show that it satisfies the
duality property where the product and coproduct diagrams are dual diagrams and
B
Search WWH ::




Custom Search