does the table follow normalization

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    #1

    does the table follow normalization

    id userid categoryid reporting to
    1 user1 cat1 null
    2 user2 cat2 null
    3 user3 cat3 user2
    4 user4 cat3 user2
    5 user5 cat3 user2
    6 user6 cat4 user3
    7 user7 cat4 user3


    In the above said table User id will be unique.

    If we want to know what is their designation then it is in the field Category Id
    Here Cat1 stands for admin
    Cat2 stands for manager
    Cat3 stands for QC
    Cat4 stands for operator
    Now each and every user will report to his corresponding superior which is stored in a file called as "Reporting to"

    If i want to trace out the no. of details of each operator following under a particular admin

    in such a case, i have to trace out the person he is "reporting to", thereafter find out under whom the "reporting to" person is under.
    Find out whether his category is CAT2. yes then ok else find out his reporting person and therafter his category till u reach out the CAT2.



    All i want to know is whether this is a good database design.
    and does it follow the normalization.

    Regards
    cmrhema
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Originally posted by cmrhema
    id userid categoryid reporting to
    1 user1 cat1 null
    2 user2 cat2 null
    3 user3 cat3 user2
    4 user4 cat3 user2
    5 user5 cat3 user2
    6 user6 cat4 user3
    7 user7 cat4 user3


    In the above said table User id will be unique.

    If we want to know what is their designation then it is in the field Category Id
    Here Cat1 stands for admin
    Cat2 stands for manager
    Cat3 stands for QC
    Cat4 stands for operator
    Now each and every user will report to his corresponding superior which is stored in a file called as "Reporting to"

    If i want to trace out the no. of details of each operator following under a particular admin

    in such a case, i have to trace out the person he is "reporting to", thereafter find out under whom the "reporting to" person is under.
    Find out whether his category is CAT2. yes then ok else find out his reporting person and therafter his category till u reach out the CAT2.



    All i want to know is whether this is a good database design.
    and does it follow the normalization.

    Regards
    cmrhema
    I think you're in the right direction.

    -- CK

    Comment

    Working...