Professor Week 5 Flashcards
Normalization
Decomposing relations to avoid anomalies when inserting, updating or deleting data.
Anomalies in Data
Redundancy, Update, Delete, Insert
What is functional dependency?
When one value determines another value and only determines one value.
EmployeeID -> name
EmployeeID -> dept. name
emp_ID -> salary
OR empID -> name, dept_name. salary
Determinant -> employeeID
What is a candidate key?
Determinant that determines the rest of the values.
Second Normal Form
In 1NF and…
all of its non-key attributes are dependent on all of the key
OR
the primary key consists of only of one attribute
OR
No non-key attributes exist in the relation (all of the attributes are part of the key)
Non-key attributes
all attributes that are not part of the primary key
Dependent
Attributes appear on the right side of a function dependency
Partial dependencies
A(1,2,3,4) 1 and 2 are primary key
fds:
1,2 -> 3,4 is a full dependency
1 ->3 is a partial dependency and breaks 2NF
Third Normal Form
If it is in 2NF and is free of transitive dependency
Transitive Dependency Format
Attribute A -> Attribute B -> Attribute C
A is typically primary key
B and C are non-key attributes
Violation: when a non key attr is determining another non-key attr