Entity+relationship+occurrence+modelling

Introduction
At this stage in the design process we are interested in the relationship between our entities. Entity relationship occurrence modelling is one way of doing this.

Example 1
Pupils and staff at Duncastle High School have a unique ID to identify them.

Pupil 10112 John Smith is taught English by teacher 011 Mr Ryan Pupil 20754 Elaine Jones is taught Maths by teacher 025 Mrs McNeil Pupil 11923 Andy Green is taught Maths by teacher 013 Miss Howie Pupil 10112 John Smith is taught Geography by teacher 033 Mr Ballater Pupil 10112 John Smith is taught Maths by teacher 025 Mrs McNeil Pupil 21645 Richard Arnott is taught Maths by teacher 013 Miss Howie Pupil 46904 Alan McGraw is taught Geography by teacher 033 Mr Ballater Pupil 21645 Richard Arnott is taught Chemistry by teacher 086 Mrs Clark Pupil 46904 Alan McGraw is taught Maths by teacher 012 Mr Yates

Your teacher will use the data below to show how the entity relationship occurence model will work



Solution


From this, we can tell that the relationship between pupil and teacher is many to many i.e. A pupil is taught by many teachers and A teacher teaches many pupils

Task
1. At the Olympic games, the men's 100m heats are due to take place. Each athlete is given a unique identifying code, and each heat has a unique identifier.

Athlete 001 Usain Bolt runs in heat A2 Athlete 109 Churandy Martina runs in heat A3 Athlete 278 Richard Thompson runs in heat B1 Athlete 005 Asafa Powell runs in heat A2 Athlete 194 Darvis Patton runs in heat A2 Athlete 226 Marc Burns runs in heat A2 Athlete 254 Kim Collins runs in heat B1 Athlete 330 Walter Dix runs in heat A1 Athlete 615 Michael Frater in heat A1 Athlete 602 Tyson Gay in heat A3

(a) Using the data above draw an entity relationship occurrence model (b) Decide whether the relationship between athlete and heat is one-to-one, one-to-many or many-to-many

2. A school issues a laptop to each of it's teachers. Each laptop is identifiable by a unique code, and each teacher who is given a laptop has a unique payroll number.

Laptop X1497 is given to teacher Mr Smith who has the payroll number 858175 Laptop X1094 is given to teacher Mrs Jones who has the payroll number 891345 Laptop X2234 is given to teacher Mr Hammond who has the payroll number 809485 Laptop X1884 is given to teacher Mr Burnett who has the payroll number 830454 Laptop X5109 is given to teacher Ms Pallister who has the payroll number 845190 Laptop X2349 is given to teacher Mr McLean has the payroll number 875430

(a) Using the data above draw an entity relationship occurrence model (b) Decide whether the relationship between athlete and heat is one-to-one, one-to-many or many-to-many