Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment 6-1 Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: surgeryNo is the surgery room number. staffNo, patNo,

Similar presentations


Presentation on theme: "Assignment 6-1 Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: surgeryNo is the surgery room number. staffNo, patNo,"— Presentation transcript:

1 Assignment 6-1 Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: surgeryNo is the surgery room number. staffNo, patNo, and surgeryNo are unique. A patient is allowed to have more than one surgery a day. Only one surgery can take place in a room at any given time. A dentist can perform only one surgery at any given time. A dentist is allocated in one surgery room each day. But a surgery room can be used by multiple dentists on the same day. Date and Time as two separate attributes. Do NOT use Appointment! 1

2 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! staffNosurgeryNoDateTime… S1011S1512-Sep-0410:00 S1011S1512-Sep-0412:00 S1024S1512-Sep-0414:00 S1011S1413-Sep-0410:00 2

3 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 3

4 Assignment 6-1 patNo, staffNo ===> ALL What does it mean? A patient can see one dentist once, and hence must see a different dentist each time visiting the clinic. -0.5 4

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 5

6 Assignment 6-1 1. staffNo  dentistName patNo  patName staffNo, Date, Time  All patNo, Date, Time  All surgeryNo, Date, Time  All staffNo, Date  surgeryNo 2. staffNo, Date, Time (any one of the three ALL FDs) 3. patNo, Date, Time surgeryNo, Date, Time 6

7 Quiz2 Change UserName to your UWP UserName first! 7


Download ppt "Assignment 6-1 Schedule(staffNo, dentistName, patNo, patName, surgeryNo, Date, Time) Make assumptions: surgeryNo is the surgery room number. staffNo, patNo,"

Similar presentations


Ads by Google