Normalized
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Normalized

  1. #1
    Join Date
    Aug 2001
    Posts
    27

    Normalized

    I have an item, any item has type, any type has several attibutes, any attribute not common with other type of item,,,
    How can I normalize this item?
    Example:
    Item(Item#, Item_Type, Item_Type1_Attribute1, Item_Type1_Attribute2, Item_Type1_Attribute3, Item_Type2_Attribute1, Item_Type2_Attribute2,
    Item_Type3_Attribute1)

    Item(1,A,A1,A2,A3,null,null,null)
    Item(1,B,null,null,null,B1,B2,null)
    Item(1,C,null,null,null,null,null,C1)

  2. #2
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185

    3NF

    If the type attributes are dependent on the item type and not the item, then there should be an ITEM_TYPE entity. The relationship would be an ITEM has zero or many ITEM_TYPEs.

    3NF ~ the key, the whole key, and nothing but the key, so help me Codd.
    David Knight
    OCP DBA 8i, 9i, 10g

  3. #3
    Join Date
    Aug 2001
    Posts
    27
    Thank you dknight,,,
    But, what are the attributes of ITEM_TYPE entity?
    Last edited by abcd; 12-19-2002 at 11:35 PM.

  4. #4
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    In general, the attributes that are dependent upon the ITEM key belong in the ITEM entity.

    The attribute that are dependent on the ITEM_TYPE key should go in the ITEM_TYPE entity.
    David Knight
    OCP DBA 8i, 9i, 10g

  5. #5
    Join Date
    Aug 2001
    Posts
    27
    You're mean:

    Item(Item#, Item_Type, Item_Type1_Attribute1, Item_Type1_Attribute2, Item_Type1_Attribute3, Item_Type2_Attribute1, Item_Type2_Attribute2,
    Item_Type3_Attribute1)

    Item(1,A,A1,A2,A3,null,null,null)
    Item(1,B,null,null,null,B1,B2,null)
    Item(1,C,null,null,null,null,null,C1)


    ITEM_TYPE_A(Item_Type,Item_Type_A_Attribute1, Item_Type_A_Attribute2, Item_Type_A_Attribute3)

    ITEM_TYPE_B(Item_Type,Item_Type_B_Attribute1, Item_Type_B_Attribute2)

    ITEM_TYPE_C(Item_Type,Item_Type_C_Attribute1)

    Beacase every attribute has a different data type,,,

    Is it right or No ?

  6. #6
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    Are the item_type attributes based on the item or on the item_type?
    David Knight
    OCP DBA 8i, 9i, 10g

  7. #7
    Join Date
    Aug 2001
    Posts
    27
    Oops, Sorry,,,
    The item_type attributes based on the item,,,

    Item(Item#, Item_Type, Item_Type1_Attribute1, Item_Type1_Attribute2, Item_Type1_Attribute3, Item_Type2_Attribute1, Item_Type2_Attribute2,
    Item_Type3_Attribute1)

    Item(1,A,A1,A2,A3,null,null,null)
    Item(1,B,null,null,null,B1,B2,null)
    Item(1,C,null,null,null,null,null,C1)


    ITEM_TYPE_A(Item#,Item_Type_A_Attribute1, Item_Type_A_Attribute2, Item_Type_A_Attribute3)

    ITEM_TYPE_B(Item#,Item_Type_B_Attribute1, Item_Type_B_Attribute2)

    ITEM_TYPE_C(Item#,Item_Type_C_Attribute1)

  8. #8
    Join Date
    Aug 2001
    Posts
    27
    And every attribute reference to another table.
    By other words, every attribute is the foriegn key reference to the primary key on other table.

Posting Permissions

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



Click Here to Expand Forum to Full Width