Database Reference
In-Depth Information
with “parameters” in
. The operators used for this term are those of the
SPRJ algebra (for conjunctive queries). But we need the union operation as well,
in the case when we have more than one q i
{
r i 1 ,...,r i k }
M AB with the same relational
symbol on the right-hand side of their operad's expression, that is, when q i ,q j are
e
S
r B and e
r B , respectively.
So, generally, α(r q i )
= q i S Im(α(q A,i )) (an a union of the images of the func-
tions α(q A,i ) ) and hence provided by the algebraic equation
UNION E e ( _ )m/r im 1 m k |
S .
r q i
q i =
(e
r B )
(8.4)
Consequently, we need the '_ UNION _' relational algebra operation as well. More-
over, if we have a function f with arity m =
ar(f ) in the operad's expressions (i.e.,
in the SOtgd of considered schema mapping), then we need the unary relational al-
gebra operators 'EXTEND _ ADD a,name AS name
f(name 1 ,...,name m ) 'as
well. The complex equation ( 8.4 ) may be flattened, by adding to X M AB ={
=
r q i |
q i
M AB }⊆
X a set of new fresh variables (relational symbols). This process has to be
done for all operad's expressions in a schema mapping M AB , with all parameters
that are the relations in a source schema
.
Notice that, from the fact that for any mapping M AB , ( 1
A
:
r
r )
M AB ,
r
X .
Thus, the computation of the extension α(r q i ) of the variables r q i
X is obtained
as a solution of this system of equations, by considering the relations α(r i 1 )
=
A
α (
A
) (used on the left side of operad's expressions) as the parameters . Thus, for
a given instance database A
α (
=
A
) considered as a set of parameters, with such
a flattened guarded system of equations, we compute the extensions of the relations
in the target database schema
B
: the satisfaction of the mapping M AB means that
α(r B i ) where r B i B
each condition α(r q i )
has to be satisfied.
For any inter-schema mapping M AB , we obtain a non-recursive flattened guarded
system of equations. But in the case of the integrity schema constraints based on
tgds, when
B = A (in this case, from Corollary 6 in Sect. 2.4.3 , the informa-
tion flux into the target database
B = A is always empty), generally we obtain a
recursive system of equations (see Example 41 bellow), with (see Example 29 in
Sect. 5.1.1 )
}
i
X
X 2
}
Σ R (X)
X ar(o k )
=
={⊥}
×{
i
×{
i
o k Σ R
o i Σ R ,ar(o i ) =
=−
1 , 0
1 ,i
1
so that Σ R (
0
and Σ R (
0 )
)
={⊥}=⊥
S
={⊥}∪{
o i (
)
|
o i is an unary
operator of type 'EXTEND...'
}
, i.e., the set of all unary relations with only one
tuple.
Hence, we obtained a recursive system of equations, which can be represented by
using a syntax monad (a polynomial endofunctor of Set ),
T P :
Set
Set , derived
from the signature Σ R
(which is the SPRJU algebra Σ R extended by an additional
nullary operator '
' (empty-relation constant) and the set of unary operator 'EX-
TEND _ ADD a,name AS e') introduced by Definition 31 in Sect. 5.1 .
Search WWH ::




Custom Search