First,Second and Third Normal Form

Last post 07-05-2009 2:56 AM by ambrose1. 9 replies.

Sort Posts:

  • First,Second and Third Normal Form

    07-03-2009, 11:26 PM
    • Member
      104 point Member
    • ambrose1
    • Member since 02-05-2008, 3:29 AM
    • Trichy,Tamil Nadu,India
    • Posts 330

    Hello Friends,

    Can u Explain First,Second and Third Normal form in a Easy way with simple Examples.

    Thanks in Advance

    Winners Never Quit
    Quitters Never Win
  • Re: First,Second and Third Normal Form

    07-04-2009, 2:41 AM
    Answer
    • Contributor
      2,367 point Contributor
    • akhhttar
    • Member since 02-14-2007, 8:17 AM
    • Pakistan - Lahore
    • Posts 352

    Hi,

    Please see following articles,

    For high level overview of notmalizations and theri forms: http://databases.about.com/od/specificproducts/a/normalization.htm

    For Detail look with examples: http://www.phlonx.com/resources/nf3/


    Hope these articles will help you to understand the concepts of database normalizations and their different forms.


    Thank You

    Muhammad Akhtar Shiekh

    Lets resolve the problem together.

    Please remember to mark the appropriate replies as answer after your question is solved, thanks

    My Blog
  • Re: First,Second and Third Normal Form

    07-04-2009, 2:42 AM
    • Member
      42 point Member
    • Anits
    • Member since 06-22-2009, 7:20 AM
    • Posts 16

    Plz go thr this link.

    http://www.bkent.net/Doc/simple5.htm

  • Re: First,Second and Third Normal Form

    07-04-2009, 2:43 AM
    Answer

    http://www.phlonx.com/resources/nf3/

    Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
  • Re: First,Second and Third Normal Form

    07-04-2009, 2:49 AM
    Answer

    http://www.databasejournal.com/sqletc/article.php/1428511/Database-Normalization.htm

    Avantha Siriwardana
    Beware of bugs in the above code; I have only proved it correct, not tried it.
    (Donald Knuth)
    http://www.linkedin.com/in/avanthasiriwardana
  • Re: First,Second and Third Normal Form

    07-04-2009, 10:03 AM
    • Member
      104 point Member
    • ambrose1
    • Member since 02-05-2008, 3:29 AM
    • Trichy,Tamil Nadu,India
    • Posts 330

    Thank u akhhttar,Anits,ramireddyindia,AvanthaSiriwardana

    I came to understand First and Second Normal form,But it would be helpful for me,if u explain the third normal form with some simple examples here....so that I can understand it very clearly................

     

    Winners Never Quit
    Quitters Never Win
  • Re: First,Second and Third Normal Form

    07-04-2009, 10:44 AM
    Answer


    In 3NF, Every Non_Key Field must depends on only keyfield. it should not depends on another Non_key Field.

    Eg:

       Orders Table:

     OrderId    CustomerName CustomerPhoneNo

        1                     x                     123

        2                     y                      345

        3                     x                      123


    In above table OrderId is the only KeyField of the table, Customer Name and CustomerPhoneNo are the non-key Fields. and customer phone number depends on Customer Name. It should depends on only keyfields. but its currently depends on non-key field "customername". so the above table is not in third normal form.

    so we will make it as 2 tables.

    Orders Table : ORderId,CustomerId

    Customers Table: CustomerId,CustomerName,CustomerPhoneNo


    Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
  • Re: First,Second and Third Normal Form

    07-04-2009, 11:50 AM
    • Member
      104 point Member
    • ambrose1
    • Member since 02-05-2008, 3:29 AM
    • Trichy,Tamil Nadu,India
    • Posts 330

    Thank u ramireddyindia,

    I understand the Third Formal Form,Your example is so good.Can u give some Example for second normal form,It will so helpful for me....I can use it in the future................

    Winners Never Quit
    Quitters Never Win
  • Re: First,Second and Third Normal Form

    07-04-2009, 12:47 PM
    Answer

    We can tell that a table is in second normal form if it saitisfies the following.

    i) It should be in first normal form.

    ii) When the Table has only single column primary key, then  it means automatically in second normal form. otherwise if the table has a composite primary key, then the other column should depends on all the columns of that composite key.

    Eg:

    OrderItems Table (ORderId,ItemId,ItemDescription,ItemQty,ItemPrice)

    Now this table represents the Items ordered in that order.

    that means the primary key is both OrderId and ItemId

    Now check the remaining columns,

    ItemDescription : Description of the Item, means it depends only on Items table. so this column depends only on ItemId column. so this column is not allowed.

    ItemQty : The Quantity of the Item ordered in That Order. this column depends on both the columns. so this column is ok.

    ItemPrice : the Price of the Item. again it depends only on ItemId column. so this column is not allowed.


    so ,we will split it into 2 parts

    OrderITems (OrderId,ITemId,ItemQuantity)

    Items(ItemId,ItemDescription,ItemPrice)


    Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
  • Re: First,Second and Third Normal Form

    07-05-2009, 2:56 AM
    • Member
      104 point Member
    • ambrose1
    • Member since 02-05-2008, 3:29 AM
    • Trichy,Tamil Nadu,India
    • Posts 330

     Thank u ramireddyindia,

                              I understand the concept...........Thanks a Lot for spending time with my questions.....................

    Winners Never Quit
    Quitters Never Win
Page 1 of 1 (10 items)