First Normal Form (1NF) in DBMS
The First Normal Form (1NF) describes the tabular format in which:
• All of the key attributes are defined.
• There are no repeating groups in the table. In other words, each row/column intersection contains one and only one value, not a set of values.
All attributes are dependent on the primary key.
Consider the Following Table:
Problems with the above Figure are
1. The project number is intended to be a primary key, but it contains nulls.
2. The table displays data redundancies.
3. The table entries invite data inconsistencies.
4. The data redundancies yield the following anomalies:
1. Update anomalies: If Evergreen project name is changes that must be effect on five entries.
2. Addition anomalies: We can not store the Employee details until the Project is assigned.
3. Deletion anomalies: If we delete the employee 103 we will also lose the information about the Project.
You May Also Like:
Normalization and its Advantages
Conversion to First Normal Form:
Step 1: Eliminate the Repeating Groups
Start by presenting the data in a tabular format, where each cell has a single value and there are no repeating groups. To eliminate the repeating groups, eliminate the nulls by making sure that each repeating group attribute contains an appropriate data value. That change converts the above table as the following table.
Step 2: Identify the Primary Key
1. In the above relation PROJ_NUM is not an adequate primary key because the project number does not uniquely identify all of the remaining entity (row) attributes.
2. For example, the PROJ_NUM value 15 can identify any one of five employees.
3. To maintain a proper primary key that will uniquely identify any attribute value, the new key must be composed of a combination of PROJ_NUM and EMP_NUM.
4. For example, using the data shown in the above Figure, if you know that PROJ_NUM =15 and EMP_NUM = 103, the entries for the attributes PROJ_NAME, EMP_NAME, JOB_CLASS, CHG_HOUR, and HOURS must be Evergreen, June E. Arbough, Elect. Engineer, $84.50, and 23.8, respectively.
Step 3: Identify All Dependencies
The identification of the PK in Step 2 means that you have already identified the following dependency:
PROJ_NUM, EMP_NUM -------PROJ_NAME, EMP_NAME, JOB_CLASS, CHG_HOUR, HOURS
That is, the PROJ_NAME, EMP_NAME, JOB_CLASS, CHG_HOUR, and HOURS values are all dependent on—that is, they are determined by—the combination of PROJ_NUM and EMP_NUM.
The functional dependencies in the above relation are represented in the following figure.
You May Also Like: