1NF
[!example] A relation is in first normal form (1NF) if (and only if):
- Each attribute contains only one value.
- All attribute values are atomic, which means they can’t be broken down into anything smaller. ^[https://vertabelo.com/blog/normalization-1nf-2nf-3nf/]
1NF is a Data Normalisation form which requires that all attributes are separate. Not lists or composites. It also mean there are no duplicate columns, and there is the presence of a primary key.
To achieve 1NF you will need to;
- remove duplicate columns of composite attributes
- Create separate tables or entities for each piece of related data (primary key) ^[https://www.lifewire.com/database-normalization-basics-1019735]
For instance in the below table our employees have checked out some camera equipment. However it is stored as a composite of all the equipment they have checked out. This could get messy, and harms our capacity to run analysis on the information
| Employee | equipment |
|---|---|
| Sam | Sony A73, Zeiss 1.8 Lens, 64gb Memory card |
| Brooke | Canon GX9, iPhone Life proof case |
| Hugo | Sony FS5, V-mount battery system |
To improve the database we can split the primary key into unique identifiers and then list each piece of equipment next to that primary key. This is see below.
| employee | equipment |
|---|---|
| Sam | Sony A73 |
| Sam | Zeiss 1.8 Lens |
| Sam | 64gb Memory card |
| Brooke | Canon GX9 |
| Brooke | Iphone life proof case |
| Hugo | Sony FS5 |
| Hugo | V-mount battery system |
This table now satisfies 1NF and we could begin to run some business intelligence on it.