1 Normal Form

The First Normal Form (1NF) is one of the fundamental principles of database normalization. It specifies that a relational database table must meet certain criteria to be considered in 1NF. In 1NF:

  1. Atomic Values: Each column in a table must contain atomic (indivisible) values. This means that each value in a column should not be further divided into subvalues. Each column should contain only a single piece of data.

Here's an example to illustrate 1NF:

Consider a table called Students with the following attributes:

StudentID
StudentName
Subjects

1

Alice Johnson

Math, Physics

2

Bob Smith

Chemistry, Biology

3

Carol Williams

Computer Science

In this example, the StudentID and StudentName columns appear to be in atomic form, as they contain individual pieces of data for each student. However, the Subjects column violates the 1NF because it contains multiple subjects for some students, separated by commas. This violates the rule of atomic values.

To bring this table into 1NF, you should restructure it by creating a new table for subjects and use a linking table (junction table) to associate students with their subjects. Here's how it might look in 1NF:

Table: Students

StudentID
StudentName

1

Alice Johnson

2

Bob Smith

3

Carol Williams

Table: StudentSubjects

StudentID
Subject

1

Math

1

Physics

2

Chemistry

2

Biology

3

Computer Science

In this revised structure, each table adheres to 1NF. The Subjects column has been split into individual rows in the StudentSubjects table, ensuring that each column contains atomic values. This normalization helps avoid data redundancy and allows for efficient data querying and maintenance.

Last updated

Was this helpful?