Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dr Derek Peacock14/08/20151 Database Design 1:1 Relationships Dr Derek Peacock.

Similar presentations


Presentation on theme: "Dr Derek Peacock14/08/20151 Database Design 1:1 Relationships Dr Derek Peacock."— Presentation transcript:

1 Dr Derek Peacock14/08/20151 Database Design 1:1 Relationships Dr Derek Peacock

2 14/08/20152 Entity: Tutor l Nat Ins No l Surname l First Name l Initials l Gender l Job Title l Department l Date of Birth l Office Phone No l Lab Phone No l Home Phone No l Email Address l Fax No l Date Appointed

3 Dr Derek Peacock14/08/20153 Relevance l Not all attributes are relevant to the application (e.g. Height) l Not all attributes are important for deciding the appropriate design l Not all relevant attributes might have been identified yet

4 Dr Derek Peacock14/08/20154 Skeleton Tables Tutor (Nat Ins No, Surname, Department…..)

5 Dr Derek Peacock14/08/20155 Entity: Student l Enrolment No l Surname l First Name l Initials l Gender l Qualification l Date of Birth l Home Address l Term Address

6 Dr Derek Peacock14/08/20156 Student Table Student (Enrolment No, Surname, Qualification…..)

7 Dr Derek Peacock14/08/20157 1:1 Relationships Student Tutee of Tutor Each student must have one personal tutor Each tutor must have one tutee

8 Dr Derek Peacock14/08/20158 Posted Key (Tutors) Tutor TableStudent Table

9 Dr Derek Peacock14/08/20159 Posted Key (Is Tutored By) Student TableTutor Table

10 Dr Derek Peacock14/08/201510 1:1 Relationships Student Tutee of Tutor Each student must have one personal tutor A tutor may have one tutee

11 Dr Derek Peacock14/08/201511 Tutor May Have (non obligatory) Tutor TableStudent Table

12 Dr Derek Peacock14/08/201512 Student Must Have..(obligatory) Student TableTutor Table

13 Dr Derek Peacock14/08/201513 1:1 Relationships Student Tutee of Tutor A student may have one personal tutor A tutor may have one tutee

14 Dr Derek Peacock14/08/201514 Is Tutored By

15 Dr Derek Peacock14/08/201515 1:1 Non Obligatory Relationship Student (Stud ID, Name, Address…) Tutor (Tutor ID, Name, Address…) Is Tutored by (Stud ID, Tutor ID)

16 Dr Derek Peacock14/08/201516 Recursive Relationships Person Married to A male person may be married to a female person A female person may be married to a male person

17 Dr Derek Peacock14/08/201517 Recursive Relationship (Tables) Person (Person ID, Gender, Name …) Married To (Male ID,Female ID)

18 Dr Derek Peacock14/08/201518 Sample Question A firm assigns a car to each member of staff who are currently part of the sales team. Other staff are not assigned a company car. All company cars will be assigned to a member of staff. Suggest a suitable database design to keep track of the assignment of cars to staff


Download ppt "Dr Derek Peacock14/08/20151 Database Design 1:1 Relationships Dr Derek Peacock."

Similar presentations


Ads by Google