Database Reference
In-Depth Information
Thus, the data federation of two simple databases is isomorphic to the
merging
of these two databases. The merging of databases is formally defined in Sect.
8.1.2
.
3.3.2 Data Separation Operator in
DB
A
B
=
We have defined the separation-composition of schemas
(S
A
†
B
,Σ
A
†
B
)
in
Sect.
3.1
as a
disjunctive union
with elements indexed by schema labels (
A
†
and
B
(
A
(
B
, respectively), i.e., with
S
A
†
B
={
,r
i
)
|
r
i
∈
S
A
}∪{
,r
j
)
|
r
j
∈
S
B
}
,
Σ
A
†
B
=
(
A
(
B
then
A
=
1 and
B
=
{
2).
In what follows, we will express a finite separation-composition by using the
binary operator † and the parenthesis (for example,
(
,φ
i
)
|
φ
i
∈
Σ
A
}∪{
,ψ
j
)
|
ψ
j
∈
Σ
B
}
(if
B
=
A
), so that in
DB
we will use such a binary version ‡ of this operator at instance-database level:
A
†
(
B
†
C
))
†
D
Definition 27
The separation-composition of any two instance-databases
A
=
α
∗
(
A
)
and
B
=
α
∗
(
B
)
, obtained from the schemas
, is denoted by
A
‡
B
:
A
‡
B
α
∗
(S
A
†
B
)
=
A
,α(r
i
)
|
r
i
∈
S
A
∪
B
,α(r
j
)
|
r
j
∈
S
B
=
(
A
A
and
B
A
∪
(
B
B
.
,R
i
)
|
R
i
∈
,R
j
)
|
R
j
∈
It corresponds to the instance-database of two separated schemas, i.e., to two
mutually isolated instance-databases with separated database management systems,
so that it is impossible to compute the queries with the relations from both schemas.
For any two morphisms
f
:
A
→
C
and
g
:
B
→
D
, we define the morphism
(f
C
‡
D
as for coproducts.
The separation property for morphisms in
DB
is represented by the facts that
g)
:
A
‡
B
→
∂
0
(f
g)
∂
0
(f )
∂
0
(g),
∂
1
(f
g)
∂
1
(f )
∂
1
(g).
Remark
For any database
A
,the
replication
of this database (over different DB
servers) can be denoted by the separation-composed object
A
‡
A
in this category
DB
. From definition above, for any two databases
A
and
B
,
A
‡
B
=
B
‡
A
, that
is, as we intended, the
separation-composition
for the databases
is a commutative
operation. We are able, analogously to Definition
15
, to define any finite separation-
composition
A
1
‡
A
2
‡
(
‡
A
n
)...
‡
n
(A
1
,...,A
n
)
α
∗
(
=
···
A
1
†
···
†
A
n
).
From this definition, we have for any two instance databases
A
and
B
,
A
‡
B
=
A
) because the disjoint union introduced above is strictly noncommu-
tative, and in the
Set
category the objects
A
B
(if
A
=
B
A
are not equal but only
isomorphic. However, it can be shown that they are isomorphic objects in
DB
so
that the definition of
DB
category in Theorem
1
is still valid after this introduction
of the separation-composition:
B
and
B