Database Reference
In-Depth Information
schema
(S A A ) in the operad's setting is provided by its set of its relational
symbols in S A and the representation of its integrity-constraints Σ A is provided by
an inter-schema mapping from
A =
A .
In what follows, we will explain how the logical model theory for database
schemas and their mappings based on views [ 13 ], which corresponds to particu-
lar mapping-interpretations α (R-algebras presented in Sect. 2.4.1 by Definition 11
and specified by Corollary 4 , in order to satisfy the schema mappings as in Exam-
ple 12 ), can be translated into the category theory by using the DB category defined
in the previous chapter. However, the approach used here is slightly different from
the method used in [ 13 ].
Based on this semantics for the logical formulae without free variables (i.e.,
the integrity constraints expressed by egds and tgds, and the query inter-schema
mappings expressed by tgds), we are able to define the categorial interpretations
for database schema mappings, based on functors from the sketch category of a
given database mapping system (i.e., a sketch-graph introduced by Definition 14 in
Sect. 2.6 ) into the instance-level DB category.
A
into
4.1.1 Categorial Semantics of Database Schemas
As we explained in Sect. 3.1 , in order to define the database mapping systems, we
use two fundamental operators for the database schemas: the data federation
and
data separation †, with two corresponding monoids, ((
S
,
=
), ,
A ) and ((
S
,
=
),
) is the empty schema such that for any α ,fromDef-
inition 10 , α ( A ) ={⊥}=⊥
,
A ) , where
A =
(
{
r }
,
0
and the distribution law
A ( B
C ) = ( A B )
( A C ) holds.
In fact, from Sect. 3.3.1 ,
A A = A rn A = A
(because r
is a propositional constant, so that it does not change a database schema). Analo-
gously, for the separation composition
for any schema
A
. Consequently, each vertex in a
graph G of a database mapping system is a term of the combined algebra of these
two monoids,
A
A = A
S Alg = (( S , = ), , , A ) , i.e., any well formed term (i.e., an alge-
braic expression) of this algebra for schemas
S Alg is a database schema. Hence, a
database schema
A ∈ S Alg is an atomic schema or composed schema by a finite
number of atomic schemas and two symmetric algebraic operators
and † of the
algebra
S Alg .
For each atomic schema database and interpretation α , A
α (
) is an instance-
database of this schema and hence an object in DB category. The interpretation
of the (composite) schemas (i.e., the terms of the algebra
=
A
S Alg )in DB category is
provided by the following proposition:
Proposition 14 Let α be a given interpretation . Then there exists the following
homomorphism from the schema-database level into the instance-database level :
(Ob DB ,
0 .
(
), rn , ,
α :
S
,
=
),
, ,
A
Search WWH ::




Custom Search