Administration
  Home arrow Administration arrow Page 2 - Database Normalization
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Database Normalization
By: David Fells
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 94
    2004-06-16

    Table of Contents:
  • Database Normalization
  • First Normal Form (1NF)
  • Second Normal Form (2NF)
  • Third Normal Form (3NF) and BCNF
  • Fourth Normal Form (4NF) and Fifth Normal Form (5NF)
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    Database Normalization - First Normal Form (1NF)
    (Page 2 of 6 )

    First Normal Form (1NF)

    First Normal Form states that each attribute in a relation has to be atomic and scalar. It also states that a table must have a primary key to identify any particular row. You cannot store a list of values in a single column and you cannot store a list of columns that emulate a fixed size list - also known as a repeating group. For example, suppose you were to create a table to hold contact information for business contacts:

    CREATE TABLE Contacts (

          first_name*,
          last_name,
          company,
          phone1,
          phone2,
          phone3,
          fax,|
          email
    );

    * Data types ellided

    This table contains a repeating group - phone1-3. More often than not, several of those columns will be empty, which is a waste. It is also nearly impossible to enforce any uniqueness for this group because a constraint cannot be declared such that any phone1 is unique across phone1, phone2 and phone3.

    Consider another set of problems - what if you want to add a company, not a person, to your Contacts table? Or just a phone number and a first name? You would have to leave one or more of the candidate key columns (first_name, last_name, company), which would most certainly violate the only possible primary key constraint. What if you want to delete a fax number from your table? If you simply DELETE WHERE fax=X, you may be deleting people as well.

    More Administration Articles
    More By David Fells


     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway