1NF

Published 1 Year ago. data

1NF

[!example] A relation is in first normal form (1NF) if (and only if):

  1. Each attribute contains only one value.
  2. 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

Employeeequipment
SamSony A73, Zeiss 1.8 Lens, 64gb Memory card
BrookeCanon GX9, iPhone Life proof case
HugoSony 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.

employeeequipment
SamSony A73
SamZeiss 1.8 Lens
Sam64gb Memory card
BrookeCanon GX9
BrookeIphone life proof case
HugoSony FS5
HugoV-mount battery system

This table now satisfies 1NF and we could begin to run some business intelligence on it.

links to this note