• bill.sugden (3/2/2010)


    Give the guy a break - this is aimed at newbies.

    Right - it is a no-brainer for us grizzled database developers. I can add a little constructive criticism though Tim. Your link table has an IDENTITY column - why? If you create a composite key of your fk_user + fk_group columns (check out your naming as well) and set this as the PRIMARY KEY to this link table you are killing a couple of birds with one stone.

    (1) You have eliminated a redundant column

    (2) You have ensured that you are not duplicating USER-GROUP membership (PK uniqueness)

    (3) You can either eliminate your duplicate checking SQL and let the UI layer deal with an error, or simplify your checking to ignore the error completely

    Bill

    Bill,

    I will say that I feel that most of the comments are constructive criticisms. Particularly as this is aimed at the more novice practitioner, we need to ensure the accuracy of the article. Personally, I don't think that terms such as 'no brainer' and 'newbies' helps but some people find them helpful descriptives. Interestingly, there is a recent thread discussing how to inform authors or errors, mistakes and corrections ().

    Regards,

    Gary

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!