An Example of Database Normalization (Cont.)


Functional Dependencies (FDs)
Functional dependency is a relationship that exists when one attribute uniquely determines another attribute. FD helps to maintain the quality of data in the database, and is a foundation of database normalization.
Give a table T containing two attributes A and B, A→B, or A functionally determines B if
  • The attribute(B) is functionally dependent on attribute (A) if each value in column (A) determines one and only one value in column (B); or

  • Given two rows r1 and r2 in a table T, if r1(A)=r2(A) then r1(B)=r2(B).
Graphical representation of functional dependencey is given on the right:

An Example
The previous single table designed is given on the right again:
emp_info
emp_id emp_name ... skill_id skill_name skill_date skill_lvl
09112 Jones ... 44 librarian 03-15-20 12
09112 Jones ... 26 typing 06-30-18 10
09112 Jones ... 89 word-proc 01-15-16 12
12231 Smith ... 26 typing 04-15-19 5
12231 Smith ... 39 filing 07-30-21 7
... ... ... ... ... ... ...

FDs are based on the intent of the database designers. From the table content, the table’s FDs are given on the right (note that this is unusual because it is reverse thinking), where ↛ means “does not functionally determine.”
  emp_id → emp_name
  emp_id → emp_phone
  emp_id → dept_name
  emp_phone ↛ emp_id