









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Winter 2002
Arthur Keller – CS 180
2–
-^
Weak Entity Sets, Entity-Relationship Design. ◆
Read Sections 2.3-2.4.
-^
Relational Model, Functional Dependencies. ◆
Read Sections 3.1-3.5.
-^
Normal Forms, Multivalued Dependencies. ◆
Read Sections 3.6-3.7. Assignment 1 due.
-^
Relational Algebra. ◆
Read Chapter 5. Project Part 1 due.
Winter 2002
Arthur Keller – CS 180
2–
Sometimes an E.S.
’s key comes not (completely) from its own
attributes, but from the keys of one or more E.S.’s to which
is
linked by a
supporting
many-one relationship.
Called a
weak
Represented by putting double rectangle around
and a double
diamond around each supporting relationship.
-^
Many-one-ness of supporting relationship (includes 1-1)essential.^ ◆
With many-many, we wouldn't know which entity provided the key value.
-^
“Exactly one” also essential, or else we might not be able toextract key attributes by following the supporting relationship.
Winter 2002
Arthur Keller – CS 180
2–
-^
-^
-^
2ndaryDomains
PrimaryDomains
@In
name
name
Hosts
@In
name
Winter 2002
Arthur Keller – CS 180
2–
All “Connecting”
Entity SetsAre Weak
a price, we can omit
price
from the key, and
remove the double diamond from
ThePrice
.
price
is attribute of
BBP
.
Bars
Beers
The-Bar
Beers
The-Beer
The-Price
The-Bar
The-Beer
The-Price
name
manf
name
addr
price
Winter 2002
Arthur Keller – CS 180
2–
-^
-^
Buyer
Product
Qty
Buyer
Product
Shipment
Name
Name
Ordered
OBOB
OPOP
Qty Ordered
Ordered
OBOB
OPOP
Part of
Qty Shipped
Part-of ismany-many andnot a weakrelationship!
Winter 2002
Arthur Keller – CS 180
2–
Beers
Manfs
ManfBy
name
addr
name
Winter 2002
Arthur Keller – CS 180
2–
Winter 2002
Arthur Keller – CS 180
2–
-^
Beers
Manfs
ManfBy
name
name
Beers name
manf
Winter 2002
Arthur Keller – CS 180
2–
The following design illustrates both points:•^
Manfs
deserves to be an E.S. because we record
addr
, a
nonkey attribute.
-^
Beers
deserves to be an E.S. because it is at the “many” end.
◆^
If not, we would have to make “set of beers” an attribute of
Manfs
something we avoid doing, although some may tell you it is OK inE/R model.
Beers
Manfs
ManfBy
name
addr
name
Winter 2002
Arthur Keller – CS 180
2–
There is a tendency to feel that no E.S. has its entitiesuniquely determined without following somerelationships.
-^
However, in practice, we almost always create uniqueID's to compensate: social-security numbers, VIN's, etc.
-^
The only times weak E.S.'s seem necessary are when:a)^
We can't easily create such ID's; e.g., no one is going to accept a“species ID” as part of the standard nomenclature (species is aweak E.S. supported by membership in a genus). b)
There is no global authority to create them,
e.g
., crews and
studios.
Winter 2002
Arthur Keller – CS 180
2–