Database Reference
In-Depth Information
Table 3.9
CLASS Table
ClassID
TimeBlock
WeekDay
Semester
1000
9 am-12 pm
Monday
Fall
1001
1 pm-4 pm
Monday
Spring
1002
7 pm-10 pm
Tuesday
Fall
1003
9 am-12 pm
Tuesday
Spring
1004
1 pm-4 pm
Wednesday
Spring
1006
7 pm-10 pm
Wednesday
Fall
1005
9 am-12 pm
Thursday
Fall
Table 3.10
Table with Multivalue Dependency
StudentID
TimeBlock
Weekday
10
9 am-12 pm
Monday
10
1 pm-4 pm
Monday
10
1 pm-4 pm
Tuesday
10
9 am-12 pm
Tuesday
11
1 pm-4 pm
Monday
11
1 pm-4 pm
Tuesday
12
7 pm-10 pm
Wednesday
Table 3.10 is about the schedule for three students with the student IDs 10, 11, and 12.
he student ID 10 is related to two TimeBlock values, 9 am-12 pm and 1 pm-4 pm. It is also
related to two WeekDay values, Monday and Tuesday. Now, for the rows (10, 9 am-12 pm,
Monday) and (10, 1 pm-4 pm, Monday), switch the TimeBlock values, and we have two rows
(10, 1 pm-4 pm, Monday) and (10, 9 am-12 pm, Monday). Notice that, these two rows with
the TimeBlock values switched are not new rows. hey are the existing rows in the original
table. hat is, by switching the TimeBlock values, we do not generate extra rows in the table.
Similarly, for the two rows (10, 9 am-12 pm, Monday) and (10, 9 am-12 pm, Tuesday), switch
the WeekDay values and you have two rows, (10, 9 am-12 pm, Tuesday) and (10, 9 am-12 pm,
Monday). Again, no extra rows are generated in the table by switching the WeekDay values.
Keep doing this for every possible combination of TimeBlock and WeekDay values related to a
pair of duplicated Student ID. If no extra row is generated after the value switching, we have the
multivalue dependency between the columns StudentID and Timeblock as well as StudentID
and WeekDay in the table.
In Table 3.11, switching the TimeBlock values in the two rows (11, 1 pm-4 pm, Monday) and
(11, 9 am-12 pm, Tuesday), we have (11, 9 am-12 pm, Monday) and (11, 1 pm-4 pm, Tuesday).
Notice that those two new rows do not match any rows in the original table. herefore, there is
Search WWH ::




Custom Search