RelationalDatabase1

Saturday, June 24, 2006

Functional Dependence (Fd)


Student_Activity
SID Activity Fee
100 Skiing 200
150 Swimming 50
175 Squash 50
200 Swimming 50

Overview

The secret of normal forms is to realize that some attribute values determine other attribute values. In the case above, the activity fee was dependent on the activity, not the student. If a determinant (activity in the above case) cannot be a key in the relation, those attributes that depend on the determinant will repeat each time the value for the determinant repeats (see swimming in the original relation above). To prevent determinant values from repeating it is best to create a separate relation where the determinant is a key (remember keys can't repeat). This is what we did when we split the original relation into two relations.

--oldweb normalization article

Student
SID Activity
100 Skiing
150 Swimming
175 Squash
200 Swimming

ActivityFees
Activity Fee
Skiing 200
Swimming 50
Squash 50

0 Comments:

Post a Comment

<< Home