Beruflich Dokumente
Kultur Dokumente
PET ID PET NAME PET TYPE PET AGE OWNER Total 2012
246 ROVER DOG 12 SAM COOK $500.00
298 SPOT DOG 2 TERRY KIM $423.00
341 MORRIS CAT 4 SAM COOK $397.60
519 TWEEDY BIRD 2 TERRY KIM $602.50
602 ROVER DOG 12 JASMIN LI $332.55
PET ID PET NAME PET TYPE PET AGE OWNER VISIT DATE PROCEDURE
246 ROVER DOG 12 SAM COOK JAN 13/2013 01 - RABIES VACCINATION
MAR 27/2013 10 - EXAMINE and TREAT WOUND
APR 21/2013 05 - HEART WORM TEST
Here we are concerned about relations that have two or more multi-valued dependencies. Each
dependency is separate. It is not the case that one of the multi-valued dependencies is inside the
other multi-valued dependency. The example we will use is a Route and Driver List for a
particular day.
A Route has many Drivers and many Stops, but the Drivers are not related to the
Stops. The Drivers are related to the Route.
The stops are also related to the Route.
Notice that the time between stops depends on the route. The 196A takes 12 minutes to get
from Sheppard to Keele, but the 196B takes 14 minutes. This is because more riders get on
to the Express bus and an extra 2 minutes is needed for the time it takes for these extra
riders to get on.
[ Route#, RouteName] I.
[ Route#,Driver#, DriverName] II.
[ Route#, Stop, MinsToNextStop] III.
(Route#, RouteName) I.
(Driver#, DriverName) II.A
(Route#,Driver#) II.B
(Route#, Stop, MinsToNextStop) III.
3NF: Eliminate Transitive Dependencies
Here we see one PetId can have Many VisitDates and each VisitDate can have Many
Procedures,
PET ID PET NAME PET TYPE PET AGE OWNER VISIT DATE PROCEDURE
246 ROVER DOG 12 SAM COOK JAN 13/2013 01 - RABIES VACCINATION
10 - EXAMINE and TREAT WOUND
APR 21/2013 05 - HEART WORM TEST
rewriting:
3 @ 1-part PK’s
[ PetId,
[ Visitdate,
[ ProcedureNo
3 @ 2-part PK’s
[ PetId, Visitdate
[ PetId, ProcedureNo
[ Visitdate, ProcedureNo
1 @ 3-part PK
3NF: Now we identify and eliminate transitive dependancies and mark Foreign Keys