Downloads

Things to download free, from posters and shortcut guides to white-papers and checklists

Free Applications

Explore our recommended free applications from around the Internet

How To & Tutorials

These handy problem solving tips and advice should save you some time

Industry News

News and commentary from news in the technology industry

Technical Terms

We regularly take a technical term and try to make sense of it in the real world

Home » Blogs

Database Normalisation (Making Sense of Data) - 1NF First Normal Form

Submitted by jasonslater on Monday, 23 April 2007No Comment

I need to catch up on the three Normal Forms.

For a given data table (somewhere we are planning to store information) it can be classified into one of the following Normal Forms, and then refined towards the 3NF. The idea is to make the most sensible use of data by arranging it appropriately.

1NF or First Normal Form

1NF ensures there will be no repetition of similar information within a record (one set of data). It also states there must be a valid Primary Key (a unique Index - or a non-repeating field or group of fields that has a one to one relationship with the rest of the information).

So a proposed data table for users with up to 3 home computers might look like:

Username,Fullname,Computer1,Computer2,Computer3

This could contain 1 record that looks something like:

jbloggs,Joe Bloggs,laptop,pc,mac

It’s quite apparent that the three field Computer1,Computer2, and Computer 3 all describe similar information and 1NF tells us it can’t. So we change the table to look like this

Username,Fullname,Computer

And to show the three computers now we would have 3 records

jbloggs,Joe Bloggs,laptop
jbloggs,Joe Bloggs,pc
jbloggs,Joe Bloggs,mac

To be fully 1NF we must also make sure we have a valid Primary Key. We can’t use the Username or Fullname field on its own because a Primary Key can only appear once (ie a Unique Index). This means the primary key could now be:

(Username,Computer)

I suppose it could also be (Fullname,Computer) or (Username,Fullname,Computer) for that matter but we need to pick one so we’ll use the (Username,Computer) form.

The data table is now First Normal Form.

But, you ask, isn’t that wasteful? Now you have much more data than you started with as both Username and Fullname are repeated over and over. Yes, you would be right about that and that’s where 2NF or Second Normal Form comes in.

Subscribe now and never miss a post
RSS Subscribe

Share and Enjoy:
  • E-mail this story to a friend!
  • Print this article!
  • Digg
  • Google
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • LinkedIn
  • Live

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.