Uploaded by Loverne Phillip

ER Modelling Worksheet (1)

advertisement
ERD Modelling
ERD Modelling is an iterative process. It typically includes the following steps:
1.
2.
3.
4.
5.
6.
Create detailed narrative of organization’s description of operations
Identify business rules based on description of operations
Identify main entities and relationships from business rules
Develop initial ERD
Identify attributes and primary keys that adequately describe entities
Revise and review ERD
Example 1
Given the following Business Rules, create an appropriate Crow’s Foot ERD




A company operates many departments
Each department employs one or more employees
Each of the employees may or may not have one or more dependents
Each employee may or may not have an employee history
Example 2
Read the narrative below carefully and answer the questions below.
Fixin TnT Cars (FTC) is an automobile repair firm based in Trinidad.
They have hired you to design a database for them to maintain records
of their business operations.
Vehicles are brought in to FTC by clients. One client may have several
vehicles at the firm at once, but a car is associated with one client.
When a client arrives at FTC some personal information including their
Name, Address and contact numbers are recorded by a Customer
Service Representative (CSR). The CSR also records the vehicle Make,
Model, Year of Manufacture and Colour. The CSR then initiates one or
more repair jobs for the vehicle. A CSR can initiate many repair jobs
and each repair job is initiated by a single CSR, who maintains
responsibility until the job is completed.
As stated, a Vehicle may require several repair jobs e.g. Adjust brakes,
Oil change, Engine belt replacement. Each job is carried out by a single
mechanic and a mechanic can perform many jobs. The start date and
time as well as the end date and time for the job is also recorded.
Repair Jobs will sometimes require parts e.g. oil filters, windshield wiper
blades or air filters. A job may require many parts and a part will be
used in many repair jobs. The part number and description of each part
in stock is to be recorded in the database. The price of each part used
in a particular job is also recorded.
Parts are supplied by vendors with one vendor supplying many parts.
FTC has made the decision to obtain a particular part e.g. an oil filter
from a specific vendor.
Based on the narrative above:
a. Draw an Entity Relationship Diagram in Crow’s Foot Notation showing
the identified entities and attributes as needed
MARKS]
[20
b. Write the CREATE TABLE statements needed to implement the
ERD identified in Part a. above
MARKS]
[20
Download