Databases Reference
In-Depth Information
with their majors and the courses they take. According to the mapping
, each tuple
of Takes is split into two tuples, one in Student and the other in Enrolled ,that
share the same sid value. Formally, the schema mapping is given by the following
two assertions:
M
M W Takes .s;m; co / ! Student .s;m/
Takes .s;m; co / ! Enrolled .s; co /
Note that
is an example of both a GAV mapping and an (strict) LAV mapping.
Also note that in this example we have a variation of the earlier
M
M 1 (in Sect. 2 ); in
this variation, the sid value in the target is not existentially quantified, but instead
it is copied directly from the source relation Takes .
We next address the issues of schema evolution, starting with the target schema
first.
3.1
Target Evolution: GAV-GLAV Composition
Let us assume that the target schema evolves to a new schema T 0 consisting of one
relation Takes 0 that combines all the attributes in T (i.e., sid , major , course )
and further includes an extra grade attribute. Moreover, assume that the evolution
mapping from T to T 0 is:
M 0 W Student .s;m/ ^ Enrolled .s; co / !9G Takes 0 .s;m; co ;G/
M 0 is an example of a more
general GLAV mapping: it is neither LAV (since there is more than one atom on the
left-hand side) nor GAV (since there is an existential quantifier on the right-hand
side).
Before we can show how to adapt the mapping
In contrast to the original mapping
M
, the above
M
to the new target schema, we
formally state what composition means.
Definition 1. (Composition of Schema Mappings [ Fagin et al. 2005b ]) Let
M 12 D
M 23 D . S 2 ; S 3 23 / be schema mappings such that
the schemas S 1 , S 2 ,and S 3
( S 1 , S 2 , ˙ 12 )and
have no relation symbol in common pairwise. A
schema mapping
M 23 (written
M 13 D M 12 ı M 23 )ifM 13 Df.I 1 ;I 3 / j there exists I 2 such that .I 1 ;I 2 / 2 M 12
and .I 2 ;I 3 / 2 M 23 g.
M 13 D . S 1 ; S 3 13 / is a composition of
M 12 and
The important computational problem associated with mapping composition is
the following: Given two schema mappings
M 12
and
M 23
how do we compute,
and in what language can we express, a set ˙ 13
of constraints that specifies the
M 23 ? The answer to the above question very much
depends on the language in which the input schema mappings are specified.
For our running example, to adapt the above mapping
M 13 of
M 12 and
composition
M
to the new target
schema, we must compose
M
with the evolution mapping
M 0 . As it turns out,
Search WWH ::




Custom Search