Database Reference
In-Depth Information
diagram (I1) commutative): for each unary (or binary) operator o i
Σ P and the
relations f # (t),f # (t 1 ),f # (t 2 )
Z (obtained from terms t,t 1 ,t 2 T P X )
1. h(f # (t),i)
=
o i (t)
# , where o i (t)
T P X is a term, and
_
# : T P R→
Υ in
Definition 31 is the evaluation of terms (R-algebra f is a restriction of
_
to
⊆R
).
2. h((f # (t 1 ),f # (t 2 )),
X
1 )
=
t 1
TIMES
t 2 # ,h A ((f # (t 1 ),f # (t 2 )), 0 )
=
t 1 UNION t 2 # and h A ((f # (t 1 ),f # (t 2 )), 1 )
=
t 1 MINUS t 2 # if f # (t 1 ) and
f # (t 2 ) are union compatible;
otherwise.
Let Σ P =
(S Z Z ) be a schema of the instance
database Z , with the set of relational symbols in S Z . Let us show that Z has to be a
closed object in DB . We have two possible cases:
1. When S Z
Σ R be SPRJU signature and
Z =
X , the assignment f
:
X
Z must satisfy the condition for each
r X ⊆R
, f(r) =⊥
if r S Z . (In each object (instance database) in DB the
empty relation
is an element of it.)
In this case, from the fact that the elements (i.e., relations) in Z areinthe
image of the mapping f # (which is an evaluation of terms in
T P X ), this database
instance has to be a closed object, that is, Z = TD of an database instance
D
Z .
2. When S Z
. So, the
image of f # is the set of all views that can be obtained with SPRJU algebra from
this instance database C and, consequently, TC Z . However, Z is the image
of the h
X , let us define the database instance C
={
f(r)
|
r
X
}
Z which computes all views over Z as well, so that, again Z
has to be a closed object in DB , Z
:
Σ R Z
=
TD , with TC
TD . The maximal case
for Z is when Z
T Υ .
In what follows, we will consider a particular case when X
=
Υ
=
S Z ,asinthe
case which defines the power-view operator T for the instance databases, based
on the initial X
=
Σ R -algebra semantics.
Consequently, we obtain the syntax monad (
T P ,η,μ) with η X =
inl X , while
μ X =
(id
T P X ) # is the unique inductive extension of inr X :
Σ P (
T P X)
−→ T P X
along the identity on
T P X , as represented in the following commutative diagram:
This syntax monad framework permits us to form the terms from any operator deriv-
able from the signature Σ P :
Search WWH ::




Custom Search