You are on page 1of 33

ER Model

Announcements
• Sign up for Moodle access to COL 362
• Piazza link has been shared
Any Issues??
Issues
• Should “President” be an attribute or entity?
• Should “Actor” be an entity? Or an entity “Person” with
“Actor” as the value of “Job” attribute?
• Is there a way to specify that a studio can have only one
president?
Relationship space
Are binary relationships enough?
Can we model multi-way relationships using
binary?
Replace an entity E with an attribute if…
• E is the “one” in the many-to-one relationship
• E is uniquely defined by its attributes
• No relationship involves E more than once
Design Principles
• Requirements for a good design of a data model
• Does not contain redundant information
• Occupies more space
• Harder to update
• Accurately describes the data
• Simple
• In a “is-a” relationship, keys
must come from root entity
• Any attribute that is part of the
key, cannot be “null”
• Single value constraints refers that each value of an entity set has a single value.
• If the value of an attribute is missing in a tuple, then we can fill it with a “null”
value. The null value for a attribute will specify that either the value is not known
or the value is not applicable.
• Two common sources
• Implicit hierarchy
• Entity sets introduced to remove multi-
way relationships
How can we try to generate keys for weak
entity sets?
• Zero or more of its own attributes
• Key attributes from many-to-one relationships
• Must satisfy
• All many-to-one relationships should satisfy referential integrity
• Borrowed attributes must be key attributes themselves.

You might also like