Database Reference
In-Depth Information
we do not consider a categorical semantic for the free syntax algebra of a given
query language, but only the resulting observations and the query-answering system
of this database (an Abstract Object Type (AOT), that is, the coalgebra presented in
Sect. 2.4.2 ). Consequently, all algebraic aspects of the query language are encapsu-
lated in the single power-view operator T , such that for a given database instance A
(first object in our base database category) the object TA is the set of all possible
views of this database A that can be obtained from a given query language
.
A functorial translation of database schema inter-mappings (a small graph cat-
egory) into the database category DB , defined in Sect. 3.2 , is fundamentally based
on a functor that represents a given model of this database schema inter-mappings
theory. This functor maps a data schema of a given database into a single object of
the DB category, that is, a database instance A of this database schema
L A /
(a model
of this database schema, composed of a set of relations that satisfy the schema's
integrity constraints).
The morphisms in the DB category are not simple functions as in the Set cat-
egory. Thus, the category DB is not necessarily an elementary (standard) topos
and, consequently, we investigate its structural properties. In fact, it was shown
in [ 15 ] that if we want to progress to more expressive sketches w.r.t. the original
Ehresmann's sketches for diagrams with limits and coproducts, by eliminating non-
database objects as, for example, Cartesian products of attributes or powerset ob-
jects, we need more expressive arrows for sketch categories (diagram predicates
in [ 15 ] that are analog to the approach of Makkai in [ 60 ]). As we progress to a
more abstract vision in which objects are the whole databases, following the ap-
proach of Makkai, we obtain more complex arrows in this new basic DB category
for databases in which objects are just the database instances (each object is a set
of relations that compose this database instance). Such arrows are not just simple
functions as in the case of the Set category but complex trees (i.e., operads) of view-
based mappings: each arrow is equivalent to the sets of functions . In this way, while
Ehresmann's approach prefers to deal with a few fixed diagram properties (commu-
tativity, (co)limitness), we enjoy the possibility of setting a full relational-algebra
signature of diagram properties.
This work is an attempt to provide a proper algebraic solution for these problems
while preserving the traditional common practice logical language for the schema
database mapping definitions: thus we develop a number of algorithms to translate
the logical into algebraic mappings.
The instance level base database category DB has been introduced for the first
time in [ 45 ] and it was also used in [ 46 ]. Historically, in the first draft of this cat-
egory, we tried to consider its limits and colimits as candidates for the matching
and merging type operations on database instances, but after some problems with
this interpretation for the coproducts, kindly indicated to me by Giuseppe Rosolini,
after my presentation of this initial draft at DISI Computer Science, University of
Genova, Italy, December 2003, I realized that it needs additional investigation in
order to understand which kind of categorical operators has to be used for matching
and merging database objects in the DB category. However, I could not finish this
work immediately after the visiting seminar at DISI because I received an important
A
Search WWH ::




Custom Search