Docsity

Exam 2 notes and study guides, Exercises of Advanced Data Analysis

Toggle sidebar
bg1
Exam 2 attributes and keys
Handling Multi-Valued Attributes
o Multi-valued attributes are not stored directly in a table.
Create a separate relation with a foreign key to the main entity
and a column for the multi-value.
The combination of (foreign key + value) becomes the primary
key.
• EX: EmployeePhone(EmployeeID, PhoneNumber).
Surrogate Keys
o Artificial or system-generated keys (e.g., auto-increment IDs).
Used when no natural unique identifier exists.
Should have no business meaning.
• EX: OrderID, CustomerID.
Helps simplify relationships and indexing.

Partial preview of the text

Download Exam 2 notes and study guides and more Exercises Advanced Data Analysis in PDF only on Docsity!

Exam 2 attributes and keys Handling Multi-Valued Attributes o Multi-valued attributes are not stored directly in a table.  Create a separate relation with a foreign key to the main entity and a column for the multi-value.  The combination of (foreign key + value) becomes the primary key.

  • EX: EmployeePhone(EmployeeID, PhoneNumber). Surrogate Keys o Artificial or system-generated keys (e.g., auto-increment IDs).  Used when no natural unique identifier exists.  Should have no business meaning.
  • EX: OrderID, CustomerID.  Helps simplify relationships and indexing.