| Teacher | Subject | Student |
|---|---|---|
| Mr. Abbot | Math | John Smith |
| Mr. Abbot | Math | Jane Doe |
| Mr. Abbot | Math | Jake Brown |
| Mr. Costello | Math | Peter Pan |
| Mr. Costello | Math | Capt. Hook |
| Mr. Johnson | Chem | Peter Pan |
| Mr. Johnson | Chem | John Smith |
Data description:
|
TJS(Teacher, Subject, Student)
Functional Dependencies:
Teacher → Subject (each teacher teaches 1 subject)
Student, Subject → Teacher ( (student,subject) identifies teacher)
|
The keys of this relation are:
Keys:
(Student, Subject)
(Student, Teacher) // because Teacher → Subject
|
|
Answer:
|
Conclusion:
|
| Teacher | Subject | Student |
|---|---|---|
| Mr. Abbot | Math | John Smith |
| Mr. Abbot | Math | Jane Doe |
| Mr. Abbot | Math | Jake Brown |
| Mr. Costello | Math | Peter Pan |
| Mr. Costello | Math | Capt. Hook |
| Mr. Johnson | Chem | Peter Pan |
| Mr. Johnson | Chem | John Smith |
Observation:
|
|
|
TJS(Teacher, Subject, Student)
Keys:
(Student, Subject)
(Student, Teacher)
|
|
Answer:
|
Conclusion:
|
Violating FD:
Teacher → Subject
|
| Teacher | Subject | Student |
|---|---|---|
| Mr. Abbot | Math | John Smith |
| Mr. Abbot | Math | Jane Doe |
| Mr. Abbot | Math | Jake Brown |
| Mr. Costello | Math | Peter Pan |
| Mr. Costello | Math | Capt. Hook |
| Mr. Johnson | Chem | Peter Pan |
| Mr. Johnson | Chem | John Smith |
Decomposed relations:
|
|
No duplication of information !!!