A relation is said to be in 1NF (first normal form), if it doesn’t contain any multi-valued attribute. In other words you can say that a relation is in 1NF if each attribute contains only atomic(single) value only. We have already covered brief of each of the normal forms in our Normalization in DBMS tutorial, here we will discuss the 1NF in detail with the help of few examples.
Example: Multi-valued attribute to 1NF
In the following example, we have a relation with multi-valued attribute. Since this relation is not in 1NF, let’s convert this relation to First Normal Form 1NF.
NOT in 1NF: This relation is not in 1NF because it contains a multi-valued attribute EMPLOYEE_MOBILE, in this example Employee “Hari” has more than one mobile numbers.
EMPLOYEE_ID | EMPLOYEE_NAME | EMPLOYEE_MOBILE | EMPLOYEE_COUNTRY |
168284 | Ajeet | 9521750388 | INDIA |
168285 | Hari | 9787777009, 9787778881 | INDIA |
168286 | Chaitanya | 9976543298 | INDIA |
Converting the above relation in 1NF: Let’s convert the above relation into First normal form (1NF). To do this, we simply have to have a separate row for each multi-valued attribute as shown below.
EMPLOYEE_ID | EMPLOYEE_NAME | EMPLOYEE_MOBILE | EMPLOYEE_COUNTRY |
168284 | Ajeet | 9521750388 | INDIA |
168285 | Hari | 9787777009 | INDIA |
168285 | Hari | 9787778881 | INDIA |
168286 | Chaitanya | 9976543298 | INDIA |
Leave a Reply