Exercises For ERD: Material Type
Exercises For ERD: Material Type
2) A system managing resources for a large bank. A branch has many staff members and a branch
is allocated many laptops. It should be possible to assign one or more laptops to members of
staff. Draw an ERD for this scenario.
3) Consider this scenario: A building company carries out jobs for customers. A customer might
want more than one job done. Material Types (such as bricks, plasterboard etc.) might be used
on a job. A particular Material Type could be used on more than one job. A record of the
quantity of each material type used on a job should be kept.
MaterialTypeCode (PK)
MaterialName
JobMaterial
JobID (PK)(FK)
MaterialTypeCode(PK)(FK)
Quantity
Customer
CutomerID(PK)
CutomerName
Job
JobID(PK)
CustomerID(FK)
4) Consider this scenario: A vehicle hires company rents different types of vehicles (cars, vans
and motorcycles) to customers for a set period.
a) Draw an ER (entity relationship) diagram for this scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys with
appropriate attributes.
5) Consider this scenario: A building company carries out jobs for customers. A customer might
want more than one job done. Material Types (such as bricks, plasterboard etc.) might be used
on a job. A particular Material Type could be used on more than one job. A record of the
quantity of each material type used on a job should be kept.
a) Draw an ER (entity relationship) diagram for this scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys with
appropriate attributes.
6) Consider this scenario: A vehicle-hire company specialises in hiring cars for offroad rallies.
Vehicles are allocated different items of equipment dependent on the surface. A particular
piece of equipment might be allocated to various vehicles over time.
a) Draw an ER diagram for this scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys with
appropriate attributes.
7) Consider this scenario: A machine repair company uses engineers to carry out tasks. An
engineer may be allocated one or more tasks at a time. Some tasks will require more than one
engineer allocated to them.
a) Draw an Entity Relationship Diagram for this scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys with
appropriate attributes.
8) Consider this scenario: A sales company allocates its representatives (known as ‘Reps’) to
particular regions. A region might have more than one Rep. A Rep might be allocated more
than one region.
a) Draw an ER (entity relationship) diagram for this scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys with
appropriate attributes.
9) An online restaurant booking system allows customers to make a reservation for a table. A
table might be reserved by many customers over a period of time.
a) Draw an entity-relationship (ER) diagram for this scenario.
b) Identify attributes, including primary and foreign keys, for this ER model.
10) Scenario: A gardening company allocates equipment to its staff. A member of staff can be
allocated up to seven different types of equipment at a time. Equipment types can be allocated
to every member of staff.
a) Draw the ER model from the scenario.
b) Produce the data dictionary for this ER model using primary and foreign keys, with
appropriate attributes.