Databases Reference
In-Depth Information
unique project number, plus a name, budgeted cost,
and due date. Construct a relational database for
ABC Consulting. Hint: You may want to develop
an attribute called ''responsible party'' that can
be either a team or an individual consultant. Each
project has one responsible party that is responsible
for its completion. Or you may want to think of an
individual consultant as a potential ''team of one''
and have the responsibility for each project assigned
to a ''team''
b. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is cascade
and an attempt is made to delete the record for
customer 2198 in the CUSTOMER relation?
c. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is set-to-
null and an attempt is made to delete the record
for customer 2198 in the CUSTOMER relation?
d. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is restrict
and an attempt is made to delete the record
for employee 33779 of customer 2198 in the
CUSTOMER EMPLOYEE relation?
e. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is cascade
and an attempt is made to delete the record
for employee 33779 of customer 2198 in the
CUSTOMER EMPLOYEE relation?
f. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is set-to-
null and an attempt is made to delete the record
for employee 33779 of customer 2198 in the
CUSTOMER EMPLOYEE relation?
that
could then
be an individual
consultant or a genuine team.
4. Consider the General Hardware Corp. database
of Figure 6.1. Describe the problem of referen-
tial integrity in terms of the CUSTOMER and
CUSTOMER EMPLOYEE relations if the record
for customer 2198 in the CUSTOMER relation is
deleted. (Assume that no delete rules exist.)
5. In
the
General
Hardware
Corp.
database
of
Figure 6.1, what would happen if:
a. The delete rule between the CUSTOMER and
CUSTOMER EMPLOYEE relations is restrict
and an attempt is made to delete the record for
customer 2198 in the CUSTOMER relation?
MINICASES
1. Happy Cruise Lines
a. Look at the Happy Cruise Lines database of Chapter
5, Minicase 1 but, for this question, consider only
the SHIP, PORT, and PASSENGER relations. The
company wants to keep track of which passengers
visited which ports on which ships on which dates.
Reconstruct these three relations as necessary and/or
add additional relation(s) as necessary to store this
information.
b. Consider the following data from the SHIP and
CRUISE relations of the Happy Cruise Lines database
of Chapter 5, Minicase 1:
CRUISE Relation
Cruise
Start
End
Cruise
Ship
Number
Date
Date
Director
Number
21644
7/5/2002
7/12/2002
Smith
009
23007
8/14/2002
8/24/2002
Chen
020
24288
3/28/2003
4/4/2003
Smith
009
26964
7/1/2003
7/11/2003
Gomez
020
27045
7/15/2003
7/22/2003
Adams
012
28532
8/17/2003
8/24/2003
Adams
012
29191
12/20/2003
12/27/2003
Jones
009
29890
1/15/2004
1/22/2004
Levin
020
SHIP Relation
Ship
Ship
Ship
Launch
Gross
What would happen if:
i. The delete rule between the SHIP and CRUISE
relations is restrict and an attempt is made to
delete the record for ship number 012 in the
SHIP relation?
ii. The delete rule between the SHIP and CRUISE
relations is restrict and an attempt is made to
Number
Name
Builder
Date
Weight
005
Sea Joy
Jones
1999
80,000
009
Ocean IV
Ajax
2003
75,000
012
Prince Al
Ajax
2004
90,000
020
Queen Shirley
Master
1999
80,000
Search WWH ::




Custom Search