80 likes | 260 Views
Assignment 6-1. Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: SurgeryNo is the surgery room number. Date and Time are two different attributes. No Appointment!
E N D
Assignment 6-1 Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: SurgeryNo is the surgery room number. Date and Time are two different attributes. No Appointment! A dentist is allocated to a specific surgery room for each day. But a surgery room can be used by multiple dentists same day. A surgery room can have one surgery at a time. One surgery needs only one dentist. A patient is allowed to have more than one surgery a day.
Assignment 6-1 dentistName ===> staffNo -0.5 staffNo ===> dentistName Yes patName ===> patNo -0.5 patNo ===> patName Yes
Assignment 6-1 surgeryNo, Date ===> staffNo What does it mean? A surgery room is reserved for one dentist a day. -0.5 staffNo, Date ===> surgeryNo What does it mean? A dentist is allocated to a specific surgery room for each day. Yes!
Assignment 6-1 patNo, Date ===> ALL What does it mean? A patient can have at most one surgery a day. Usually is true. Not a rule we want to make. -0.5
Assignment 6-1 patNo, staffNo, Date ===> Time What does it mean? A patient can see one dentist once a day. -0.5 Can a patient have multiple appointments a day? Yes But must see different dentists.
Assignment 6-1 patNo, staffNo ===> ALL What does it mean? A patient can see one dentist once. -0.5
Assignment 6-1 Candidate keys: staffNo, Date, Time surgeryNo, Date, Time patNo, Date, Time Must have FDs: staffNo, Date, Time ===> All surgeryNo, Date, Time ===> All patNo, Date, Time ===> All
Assignment 6-1 2. staffNo dentistName patNo patName staffNo, Date, Time All patNo, Date, Time All surgeryNo, Date, Time All staffNo, Date surgeryNo 3. staffNo, Date, Time (any one of the three ALL FDs) 4. patNo, Date, Time surgeryNo, Date, Time