0% found this document useful (0 votes)
146 views3 pages

Tutorial 5: Revision Exercise Exercise 1

The document contains 6 exercises that provide scenarios and ask the reader to: 1) Draw entity relationship diagrams (ERDs) modeling the scenarios 2) Identify functional dependencies and decompose the ERDs into third normal form (3NF) 3) Suggest integrity constraints for one of the scenarios The exercises involve modeling relationships between entities like companies and consultants, persons and organizations, chemists and projects, and property rentals.

Uploaded by

Ngọc Trâm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views3 pages

Tutorial 5: Revision Exercise Exercise 1

The document contains 6 exercises that provide scenarios and ask the reader to: 1) Draw entity relationship diagrams (ERDs) modeling the scenarios 2) Identify functional dependencies and decompose the ERDs into third normal form (3NF) 3) Suggest integrity constraints for one of the scenarios The exercises involve modeling relationships between entities like companies and consultants, persons and organizations, chemists and projects, and property rentals.

Uploaded by

Ngọc Trâm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Tutorial 5: Revision Exercise

Exercise 1.
Companies, identified by Company ID and described by Company Name and Industry Type, hire
consultants, identified by Consultant ID and described by Consultant Name, Consultant
Specialty, which is multi-valued. Assume that a consultant can work for only one company at a
time, and we need to track only current consulting engagements. a. Draw an ERD for this
situation.
Now, consider a new attribute, Hourly Rate, which is the rate a consultant charges a company for
each hour of his or her services. Now, consider that each time a consultant works for a company,
a contract is written describing the terms for this consulting engagement. Contract is identified
by a composite identifier of Company ID, Consultant ID, and Contract Date.
b. Assuming that a consultant can still work for only one company at a time, redraw the ERR
for this new situation.
c. Show the dependency between attributes. Indicate the type of dependencies.
d. Break the EER into 3NF relation.
Exercise 2.
A person may be employed by one or more organizations, and each organization may be the
employer of one or more persons. An organization can be an internal organizational unit or an
external organization. For persons and organizations, we want to know their ID, name, address,
and phone number. For persons, we want to know their birth date, and for organizations, we want
to know their budget number. For each employment, we want to know the employment date,
termination date, and bonus.
Employment of a person by an organization may result in the person holding many positions over
time. For each position, we want to know its title, and each time someone holds that position, we
need to know the start date and termination date and salary. An organization is responsible for
each position.
a.Draw an EER
b.Break into 3NF

Exercise 3.
Draw an ERD for the following Scenario:
A Laboratory has several chemists who work on one or more projects. Chemists also may use
certain kinds of equipment on each project. Attributes of CHEMIST includes EMPLOYEE_ID
(identifier), Name, Phone_No. Attribute of PROJECT include Project_ID (identifier), and
Start_Date.
Attributes of EQUIPMENT include Serial_No and Cost. The organization wishes to record
Assign_Date, which is the date when a given equipment was assigned to a particular chemist
working on a specific project. A chemist must be assigned at least to one project and one
equipment item. Any given equipment item need not be assigned, and a given project need not be
assigned either a chemist or an equipment item.
Exercise 4.
At a weekend retreat, the entity type PERSON has three subtypes: CAMPER, BIKER, and
RUNNER.
PERSON: SSN, Name.
CAMPER: Registration Plate.
BIKER: Serial_No, Type.
RUNNER: Campaign Name
* Draw a separate EER diagram segment for each of the following situations:
a. At a given time, a person must be exactly one of these subtypes.
b. A person may or may not be one of these subtypes. However, a person who is one of
these subtypes cannot at the same time be one of the other subtypes.
c. A person may or may not be one of these subtypes. On the other hand, a person may be
any two (or even three) of these subtypes at the same time.
d. At a given time, a person must be at least one of these subtypes.
Exercise 5.
The materials manager at Pine Valley Furniture Company maintains a list of suppliers for each of
the material items purchased by the company from outside vendors. Table 4-7 shows the
essential data required for this application.
a. Draw a dependency diagram for this data. You may assume the following:
• Each material item has one or more suppliers. Each supplier may supply one or more
items or may not supply any items.
• The unit price for a material item may vary from one vendor to another.
• The terms code uniquely identifies the terms of the sale (e.g., code 2 means 10 percent
net 30 days, etc. At a given time, a supplier applies a term code. The terms for a
supplier are the same for all material items ordered from that supplier.
b. Draw an E-R diagram for this situation.
c. Decompose this diagram into a set of diagrams in 3NF.
Exercise 6.

Figure below shows an EER diagram for Vacation Property Rentals. This organization rents
preferred properties in several states. As shown in the figure, there are two basic types of
properties: beach properties and mountain properties.
a. Diagram the functional dependencies and convert all relations to third normal form
b. Suggest an integrity constraint that would ensure that no property is rented twice during the
same time interval.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy