Programming Assignment Unit 4 - Solution
E-R Diagram in 3rd Normal Form
Normalization Rules
1st Normal Form
• There is no top-to-bottom ordering to the rows
• There is no left-to-right ordering to the columns
• There are no duplicate rows
• Every row-and-column intersection contains exactly one value from the applicable
domain (and nothing else)
• All columns are regular
When determining 1st Normal Form, you should ask yourself: Are there any repeating
groups or multivalued attributes? If there are, you should determine how they should be
broken into relations and related to the existing relations?
Now look at the Appointment and Patient relations. Medicines attribute of Appointment
and Allergies attribute of Patient are actually multivalued attributes. Each of these requires
a new relation and a linking relation as shown in E-R diagram below.
2nd Normal Form
• Relations are in 1NF
• There is no such non-key attributes that depends upon part of the candidate key but on
the entire candidate key
There are no changes required to 2nd Normal Form.
3rd Normal Form
• Relations are in 2NF
• There is no such non-key attribute that depends transitively on the candidate key
As you can see in Doctor relation; SpecialtyName which is a non-key attribute depends
transitively on SpecialtyNumber. Therefore, we need to create a new relation as shown in
E-R diagram below.
rd
Figure 1: E-R Diagram in 3 Normal Form