80 likes | 342 Views
Database Design & Implementation Workshop 4 – Drawing ER Diagrams. Draw Degree, Type & Participation diagrams that depict each of the following relatively simple ‘real-world’ situations: A member of staff must work in a department, and there are many members of staff in each department.
E N D
Database Design & ImplementationWorkshop 4 – Drawing ER Diagrams • Draw Degree, Type & Participation diagrams that depict each of the following relatively simple ‘real-world’ situations: • A member of staff must work in a department, and there are many members of staff in each department. • Several buses can park in the garage, and each bus may cover any number of routes. • Each producer is in charge of several plays and there are several actors appearing in each play. At any one time an actor may be involved in more than one play. • An operator can work on many machines and each machine has many operators. Each machine belongs to one department, but a department can have many machines.
M <=Works 1 Department Staff Member Provides Work Spaces => A. A member of staff must work in a department, and there are many members of staff in each department. M Department Staff Works in Staff 1
Garage 1 Can accommodate => Is parked in=> M covers => Bus/Rou Bus Team 1 M <= Driven By M Is part of => Covered by => 1 Route Driver 1 B. Several buses can park in the garage, and each bus may cover any number of routes.
B/R M M 1 1 Route Bus M M M 1 1 Garage B. Several buses can park in the garage, and each bus may cover any number of routes.
C. Each producer is in charge of several plays and there are several actors appearing in each play. At any one time an actor may be involved in more than one play. Acts in => 1 M M 1 Actor Act/Play Play <= Has M Produces => <= Has 1 Producer 1 M 1 M M 1 In charge=> Has => Producer Play Pl/ Ac Actor <= run by <= Stars in
C. Each producer is in charge of several plays and there are several actors appearing in each play. At any one time an actor may be involved in more than one play. Acts in => 1 M M 1 Actor Act/Play Play <= Has M Produces => <= Has 1 Producer 1 M 1 M M 1 In charge=> Has => Producer Play Pl/ Ac Actor <= run by <= Stars in
D. An operator can work on many machines and each machine has many operators. Each machine belongs to one department, but a department can have many machines. Department Operator 1 1 Belongs to => has => <= works on M M <= used by Op/Ma Machine M 1
D. An operator can work on many machines and each machine has many operators. Each machine belongs to one department, but a department can have many machines. M M Ope+Mac 1 1 M Ope Mac M M 1 Dep