Lab1 ERD Design
Lab1 ERD Design
ERD EXERCISES
1. Company Employees
A company has a number of employees, identified by Employee Numbers. The
company wants to keep track of the employees’ name, address and age. The
company also has several projects. Projects are assigned a unique project
identifier, and also have the attributes project name and start date. Each employee
may be assigned to one or more projects or may not be assigned to any projects. A
project must have at least one employee assigned to it and may have any number of
employees assigned. An employee’s billing rate depends on the project to which
he or she is assigned. The company wishes to keep track of the employees’ billing
rate on every project, and when the employees started to work on their projects.
2. Courses
A university has a large number of courses in its catalog. Attributes of Course
include Course_Number (identifier), Course_Name, and Credits. Each course may
have one or more different courses as prerequisites or may have no prerequisites.
Similarly, a particular course may be a prerequisite for any number of courses.
3. Laboratory
A laboratory has several chemists who work on one or more projects. Chemists
also may use certain types of equipment on each project. Attributes of chemists
include employee id, name and phone number. The lab also wants to keep track of
project id and start date, and equipment serial number and cost. The organization
wishes to keep track of the date a specific piece of equipment was assigned to a
specific chemist to work on a specific project.
4. Hospital
A hospital has a large number of registered physicians, each with a unique
physician number. Physicians all have at least one specialty. Patients are admitted
to the hospital by physicians. The hospital keeps track of the patients’ name and
address and assigns each patient a unique patient identifier. Any patient who is
admitted must have one and only one admitting physician. Once admitted, a
patient must be treated by at least one physician. A particular physician may treat
any number of patients or may not treat any patients. Whenever a patient is treated
by a physician, the hospital wishes to record the date and time of the treatment.
5. Non-Profit organization
A non-profit organization depends on a number of different types of persons for its
successful operation. The organization is interested in the following attributes for
all of these persons: Social Security Number, Name, Address, City, State and
Telephone. Three types of persons are of interest: employees, volunteers and
donors. Employees have only a Date_Hired attribute, and volunteers have only a
Skill attribute. Donors have a relationship (named Donates) with an Item. A
donor must have donated one or more Items, and an Item can only be donated by
one donor. Attributes of item includes an identity and a description. There are
persons other than employees, volunteers and donors who are of interest to the
organization, so a person does not have to belong to one of these groups. A person
may also belong to one or more of these groups, at any one time.
6. Attic Antiques
Attic Antiques buys and sells one-of-a-kind antiques of all kinds (e.g. furniture,
china, clothing, etc.). Each item is uniquely identified by a serial number and is
also characterized by asking price and condition. Attic works with several
individuals who sell and buy items from the store. Some clients only sell items to
Attic, others only buy items, and some both buy and sell. Attic keeps track of its
clients through the assigning of client numbers. They also keep track of clients’
names and addresses. When Attic sells an item to a client, they need to keep track
of the actual selling price, the date of the sale, and the sales tax. When Attic buys
an item, they wish to track the purchase cost, condition at the time of purchase, and
the date.