Database Reference
In-Depth Information
1. We rename the variables as required by the algorithm and obtain
M AB = x 1 x 2 Takes (x 1 ,x 2 ) Takes1 (x 1 ,x 2 ) ,
M BD =
y 3 Takes1 (y 1 ,y 2 )
Student (y 1 ,y 3 )
Enrolment (y 3 ,y 2 ) .
y 1
y 2
Hence,
S AB = Takes (x 1 ,x 2 )
Takes1 (x 1 ,x 2 ) ,
S BD = Takes1 (y 1 ,y 2 )
Student (y 1 ,y 3 ) Enrolment (y 3 ,y 2 ) .
2. We obtain
S BD = Takes (x 1 ,x 2 )
(y 1 .
=
x 1 )
x 2 ) Student (y 1 ,y 3 ) Enrolment (y 3 ,y 2 ) .
(y 2 .
=
3. We obtain
S BD = Takes (x 1 ,x 2 )
Student (x 1 ,y 3 ) Enrolment (y 3 ,x 2 ) .
4. The left-hand side of the implication in S BD contains the atom Student (x 1 ,y 3 )
where Student is a relati o nal symbol in
B
, and hence we replace it by the
equation (h Student (x 1 ,y 3 ) .
=
1 ) . Thus we obtain
Takes (x 1 ,x 2 )
h Student (x 1 ,y 3 ) .
1
Enrolment (y 3 ,x 2 ) .
S BD =
=
5. Return
M AD =
h Student
y 3 Takes (x 1 ,x 2 )
h Student (x 1 ,y 3 ) .
1
x 1
x 2
=
Enrolment (y 3 ,x 2 ) .
Note that in the two cases, for
M AB =
x c Takes (x n ,x c )
Takes1 (x n ,x c )
f 1 (
x n
x c Takes (x n ,x c )
Student x n ,f 1 (x n )
∧∀
x n
and for
, we obtained dif-
ferent SOtgds of the resulting composition. In fact, in the second case, we did not
express the fact that the second argument in Student depends only on its first
argument, as in the first case. So, if we wanted to obtain equivalent functions for
both f 1 and h Student , in the second case we would need to introduce the key in-
tegrity constraint for the relation Student in the schema
M AB ={∀
x n
x c ( Takes (x n ,x c )
Takes1 (x n ,x c ))
}
B
given by the egd (from
Example 4 )
z 3 Student (z 1 ,z 2 )
Student (z 1 ,z 3 )
z 3 )
.
=
z 1
z 2
(z 2
Search WWH ::




Custom Search