4. 1NF Example

Reminder: Rules for first normal form

  • There are no columns with repeated or similar data
  • Each data item cannot be broken down any further.
  • Each row is unique i.e. it has a primary key
  • Each field has a unique name

Which of these tables are NOT in first normal form?

1.

Title Firstname Surname Full name Address City Postcode
Mr Tom Smith Tom Smith 42 Mill Street London WE13GW

2.

ID IP Address username last accessed Activity Result active
1003 198.168.1.5 Smith 20081021:14.10 Save file success y

3.

ItemID Product Description Size Colour Colour Colour
234 Shoe High Heel 6 red blue brown

4.

StudentID Firstname Surname SchoolID* ClassID*
354 Tom Smith 6 5F

Comments:

Table 1. This is not in 1NF. There is no primary key defined and so this record cannot be guaranteed to be unique. Also Full name is redundant - data is not atomic - as it is simply a combination of Firstname and Surname.

Table 2. This is in at least 1NF. It has a primary key identified by the underline. The data is atomic. Each field has a unique name. There are no repeat data.

Table 3. This is not in 1NF. It has a primary key, so it passes that test, data is atomic - tick in the box, but the colour the shoe can come in is being repeated - and furthermore the fields have the same name - so not in 1NF

Table 4. This is in 1NF as it meets all the rules for the first normal form.

 

Question to ask yourself to spot 1NF

  • Does it have a primary key
  • Are each field name unique
  • Is the data atomic
  • Are there repeating / redundant fields.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: First Normal Form

 

 

 

Copyright © www.teach-ict.com