Databases Reference
In-Depth Information
This schema mapping combines information in Student and Enrolled into
the Takes 0 relation. Observe that Takes 0 contains information about student ids,
name, and courses (as opposed to name, major, and course in Takes ). Suppose I
consists of the following facts:
Student .111; John ;CS/; Enrolled .111;CS101/,
Student .111; John ; Math /; Enrolled .111; MATH101 /.
The chase of I with
M 2 will produce the following target instance:
Takes 0 .111; John ; CS101 /,
Takes 0 .111; John ; MATH101 /.
The source facts Student .111; John ;CS/and Enrolled .111; CS 101/ together
trigger the s-t tgd in
M 2 to produce Takes 0 .111; John ; CS101 /. In addition, the
source facts Student .111; John ; Math / and Enrolled .111; MATH101 / trigger
the s-t tgd in
M 2 to produce Takes 0 .111; John ; MATH101 / in the target. After
this, even though the source facts Student .111; John ; CS / and Enrolled .111,
MATH101 / also trigger the s-t tgd in
M 2 , this chase step is not taken since the target
fact Takes .111, John , MATH101 / already exists in the target instance. It is easy
to observe that no other source facts would trigger the s-t tgd in
M 2 , and hence J
is the result of the chase. Also note that, as opposed to the previous example, there
is no need to generate nulls in the target, since
M 2
has no existentially quantified
variables (i.e., it is a GAV mapping).
3
An Ideal Scenario of Evolution
We start our exposition of the application of composition and inversion to schema
evolution, by considering first a relatively “simple” example of schema evolution.
For this section, we will refer to the schema evolution scenario that is graphically
illustrated in Fig. 7.2 .
We first assume the existence of a schema mapping
from a source schema S ,
consisting of one relation Takes ,toatargetschema T , consisting of two relations
Student and Enrolled .The Takes relation contains tuples relating student ids
M
Schema S
Schema T
Schema S
Schema T
Student
Takes
Takes
sid
Takes
sid
major
major
sid
sid
cid
major
major
M
M ¢
M ¢¢
course
course
grade
Enrolled
sid
Course
cid
course
course
Fig. 7.2
Our first scenario of schema evolution
Search WWH ::




Custom Search