Section 6 Notes Database Design
Section 6 Notes Database Design
2. Artificial UIDs
- = don’t occur in the natural world but are created for purposes of identification in
a system; ex : id, student numbers, customer IDs, credit card numbers, social
security numbers, passport numbers, shoe ID ,etc.
- Often it is simpler and more straightforward to create an artificial attribute and
make it the UID
- A UID can be both artificial and composite
- Classroom is multi- valued and violates 1NF because many classrooms exist in a
school building
- If an attribute is multi-valued: -> create and additional entity an relate it to the
original entity with 1:M relationship
- 1NF eliminates repeating groups (multiple values) within an attribute by
transferring the attribute to a new entity and then connecting the entities with a 1:M
relationship
2. 1FN Violations
3. 1FN Solutions
- If one suppliers supplies ‘n’ different products, then ‘n’ different instances are
created
- If the supplier name will be changed, then would need to be changed in ‘n’
different instances
- The supplier name is dependent only on part of the UID- the supplier number,
and not with the product number
- This slide example is in 2NF. Both non UID attributes are dependent on both
Account number and Bank number.
- Remember that the Barred Relationship is part of the UID. The UID for
ACCOUNT is the combination of ACCOUNT number and BANK number (from
the Barred relationship).
4. Second Normal Form Violation
- This is a violation of 2NF, as the bank location attribute is not dependent on the
entire UID for ACCOUNT.
- This attribute should therefore be removed from ACCOUNT and placed in the
BANK entity.
5. Order ERD
6-4 Third Normal Form
- Find transitive dependencies in a data model
- Examine a non-normalized entity