Page 1 of 3 123 LastLast
Results 1 to 15 of 35

Thread: Normalization

  1. #1
    Join Date
    May 2008
    Posts
    9

    Normalization

    Hi
    Can anyone let me know in detail the Following with Specific Example
    1- First Normal Form
    2- Second Normal Form
    3-Third Normal Form
    4- Fourth Normal Form
    5- Fifth Normal Form
    6- BCNF


    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Why would we go to the trouble of writing detailed descriptions and examples for all these in a reply when they are readily available in books and on the web? For example:

    http://www.utexas.edu/its/archive/wi...ng/rm/rm7.html

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002

  4. #4
    Join Date
    May 2008
    Posts
    25
    Quote Originally Posted by dbconcept
    Hi
    Can anyone let me know in detail the Following with Specific Example
    1- First Normal Form
    2- Second Normal Form
    3-Third Normal Form
    4- Fourth Normal Form
    5- Fifth Normal Form
    6- BCNF


    Thanks
    Ok take this example with explanation;

    Let us take below table which is not normalized

    Invoice (Invoive#,Cust#,Name,Address,Quant1,Part1,Amt1,Qua nt2,Part2,Amt2,Quant3Part3,Amt3)

    INF: (One to many relationship and remove duplication of groups )

    remove duplication of groups: (remove repeating group by making a new entity

    Invoice (Invoive#,Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt)

    One to many relationship: Put PK of one table to other table

    Invoice (Invoive#,Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt,Invoice#)
    Here it is 1 NF

    2NF: (many to one relationship,Each column must depend on the entire primary key)

    Invoice (Invoive#,Cust#)

    Customer (Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt,Invoice#)

    decompose table invoice into customer and Invoice. Here is many to one relationship. Copy PK from other table to main table.

    Here it is 2 NF

    3NF: (many to many relationship,Each column must depend on directly on the primary key)

    So here only customer table and item table has many to many relationship

    Invoice (Invoive#,Cust#)

    Customer (Cust#,Name,Address)

    Cust_Item (Cust#,Item#)

    Items (Item#,Quant,Part,Amt,Invoice#)


    this is 3NF


    If I am Wrong plz seniors are welcome to correct me.

  5. #5
    Join Date
    May 2008
    Posts
    25
    Ok take this example with explanation;

    Let us take below table which is not normalized

    Invoice (Invoive#,Cust#,Name,Address,Quant1,Part1,Amt1,Qua nt2,Part2,Amt2,Quant3Part3,Amt3)

    INF: (One to many relationship and remove duplication of groups )

    remove duplication of groups: (remove repeating group by making a new entity

    Invoice (Invoive#,Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt)

    One to many relationship: Put PK of one table to other table

    Invoice (Invoive#,Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt,Invoice#)
    Here it is 1 NF

    2NF: (many to one relationship,Each column must depend on the entire primary key)

    Invoice (Invoive#,Cust#)

    Customer (Cust#,Name,Address)

    Items (Item#,Quant,Part,Amt,Invoice#)

    decompose table invoice into customer and Invoice. Here is many to one relationship. Copy PK from other table to main table.

    Here it is 2 NF

    3NF: (many to many relationship,Each column must depend on directly on the primary key)

    So here only customer table and item table has many to many relationship

    Invoice (Invoive#,Cust#)

    Customer (Cust#,Name,Address)

    Cust_Item (Cust#,Item#)

    Items (Item#,Quant,Part,Amt,Invoice#)


    this is 3NF


    If I am Wrong plz seniors are welcome to correct me.

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I hope you get some credit from dbconcept's course galaxy.

    It is good to see you in this forum and keen to get involved though

  7. #7
    Join Date
    May 2008
    Posts
    25
    Quote Originally Posted by pootle flump
    I hope you get some credit from dbconcept's course galaxy.

    It is good to see you in this forum and keen to get involved though
    thank u Sir;

    Can u plzz verify that above detail is correct or has come errors.

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by galaxy_thestars
    Can u plzz verify that above detail is correct or has come errors.
    dear galaxy

    would you please stop typing "plzz"

    once is fine, it's funny and whimsical, and reminds me of lolcats

    repeatedly doing it is very annoying

    and yes, you do have errors in your example -- for instance, it is unusual that an item would be related to only one invoice
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    May 2008
    Posts
    25
    Quote Originally Posted by r937
    dear galaxy

    would you please stop typing "plzz"

    once is fine, it's funny and whimsical, and reminds me of lolcats

    repeatedly doing it is very annoying

    and yes, you do have errors in your example -- for instance, it is unusual that an item would be related to only one invoice
    i did not mentioned as One to one relationship

    I made it as one to many; i have included invoice#(PK) of invoice table in Item table as foreign key

    Can u correct me if I m wrong.
    please tell me the correct one here

  10. #10
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you are saying that an item can belong to at most one invoice

    if so, why does it have a Quant column?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  11. #11
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Quote Originally Posted by r937
    you are saying that an item can belong to at most one invoice

    if so, why does it have a Quant column?
    I think by "Item" Galaxy means an "Invoice Line" (or Invoice Item).

  12. #12
    Join Date
    May 2008
    Posts
    25
    Quote Originally Posted by andrewst
    I think by "Item" Galaxy means an "Invoice Line" (or Invoice Item).
    If anyone thinks there is problem in normalizing then he should put correct form.
    Please try to correct anything wrong. Do not just point out that "some is wrong"

    Kindly share the right solution with us.

  13. #13
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    thanks tony

    so what would the mysterious "Part" column be? a foreign key to some Part table?

    if so, then what kinds of values are in Item#?

    and why is Item in a many-to-many relationship with Customer?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  14. #14
    Join Date
    May 2008
    Posts
    25
    Quote Originally Posted by r937
    thanks tony

    so what would the mysterious "Part" column be? a foreign key to some Part table?

    if so, then what kinds of values are in Item#?

    and why is Item in a many-to-many relationship with Customer?
    let me clear

    Quant is quantity
    Part is parts (may be vehicle)
    Amt is say price

    now is it correct or any confusion?

  15. #15
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    I'm still confused.
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •