Reviewer IM
Reviewer IM
Key Idea:
Every information in a table must depend
on the entire unique identifier (UID), not If the bank location is changed, every account
just part of it. at the bank would need to be updated.
If the UID is made up of multiple
columns, all other columns must depend Another ex:
on the entire combination, not just one The attributes duration
part. and event date are
misplaced. Duration
Why important? depends solely on song,
You have a table that stores info about and event date depends
products and suppliers. If the supplier’s solely on event. Violation
name is stored multiple times, and the of Second Normal Form
supplier’s name changes, you’d have to
update it in many places. This is
THIRD NORMAL FORM
Goal: Eliminate transitive dependencies Ex: A billboard is an advertising space that can
Rule of Third Normal Form (3NF) states feature a movie, a product, or a public
that no non-UID attribute can be announcement. May contain advertising
dependent on another non-UID attribute. about only one of these at a time.
3NF prohibits transitive dependencies. A
transitive dependency exists when any
attribute in an entity is dependent on any
other non-UID attribute in that entity
Ex:
Does information about the
store where you bought the
CD belong in the same
entity? Each feature has its own characteristics or
attributes. Exclusive OR – returns true value if
If the store address changed, one, but not both, of its operands is true.
you would have to change the information on
all the CDs that were bought at that store. Representing Exclusive OR Relationships in
the ERD
Store address is dependent on CD number, Arcs – way to represent mutually
which is the UID of CD entity. So this entity is exclusive relationships (Exclusive OR)
in 1NF and 2NF. - Belongs to one entity
- Not all relationships of an entity need
But store address is also dependent on store to be included in an arc
name, which is a non-UID attribute. - Entity may have several arcs
- Should always consist of relationships
of the same optionality
- All relationships in an arc must me
mandatory or all must be optional
Ex: Each event must be held at one Private
Home or one Public Space, but not BOTH
ARCS
In data modeling, help designers clarify
an exclusive OR across relationships. The
more explicitly you can define the client’s
requirements, the more accurate is the
implementation.
Constraint
- restriction on which attribute value
and which relationships are allowed.
May refer to a single attribute of an
entity, or to relationships between
entities.
Exclusive OR Relationship
Mutually exclusive relationships Arcs, Supertypes, and Subtypes
(Exclusive OR relations) often exist
Arcs can sometimes be drawn as M:M Recursive relationship
supertypes or subtypes Each Component may be a part of one or
more Components.
Each Component may be made up of one
or more Components.
Clarity is Key
High volume entities are not always the most
important.
Clarity and Readability are the main criteria.
Space is Needed
Readability takes space and is subject to taste.
Use of white space helps clarify an ERD
Use Sub-Diagrams
When you have
very large diagram,
it may also help to
break it up into
smaller diagrams of
functionally related
entities.
GENERIC MODELING
Purpose
Generic models – reduce the number of
entities in a diagram and provide a lot of
flexibility in unstable situations where
business requirements change often.