Database Reference
In-Depth Information
3
Definition of DB Category
3.1
Why Do We Need a New Base Database Category?
For the composition of complex database mapping graphs, it is important to dis-
tinguish the following two basic compositions of database schemas
A
and
B
with
respect to DBMSs:
In the composed schema, in order to make it impossible to write a query over the
composition with relations of both databases, the two database schemas should
be mutually separated by two independent DBMSs: it is common case when two
databases are separated, and this binary separation-composition at the schema
level is denoted by
(disjoint union where all elements are indexed by
schema symbols (denoted by a label A
A
B
, for a schema
A =
(S A A ) ), equal to
{ A
{ B
the complex schema (S A B A B ) where S A B =
(
S A )
(
S B ) and
{ A
{ B
Σ A B =
(
Σ A )
(
Σ B ) , and
×
is the Cartesian product of sets (if
, then we set A =
1 and B =
B = A
2).
In the composed schema, when the two database schemas are connected into the
same DBMS (without any change of the two original database schemas): in this
case, we are able to use the queries over this composed schema with relations of
both databases for inter database mappings. This binary federation-composition,
denoted by
, is the (simple) union but with renaming (if we have the same
relational symbol r
A B
S B , then, before the union, we rename this symbol in
S B by a new fresh relational symbol of the same type), so that S
S A
S A rn S B ,
A B =
where rn denotes the union with renaming.
The equality '
=
' for database schemas is naturally defined as follows: for any two
schemas
A
,
B ∈S
,
A = B
if π i (
A
)
=
π i (
B
),i
=
1 , 2. Let us consider the mappings
M : A
B C
and
M : A B C
. In the first case, in any query mapping
q( x )
q C ( x ) in the SOtgd of
M
, all relational symbols in the query q( x ) must be
of the database
A
or (mutually exclusive) of the database
B
, that is,
M =
f
x 1 q A, 1 ( x 1 )
q C, 1 ( t 1 ) ∧···∧∀
x k q A,k ( x k )
q C,k ( t k ) ∧∀
y 1 q B, 1 ( y 1 )
 
 
Search WWH ::




Custom Search