• No offense Joe but I think you have lost your mind if you actually think that Amazon uses the customer email as part of the primary key. How many supporting tables would that value be needed as a foreign key? We all know that varchar is not a great candidate for performance when the length can be all over the place like an email. Given that the user is allowed to change their email at any time it goes against the notion that a primary key not change. Can you imagine how ridiculous it would be to change your email? There is not a chance on this earth that Amazon uses that as part of a primary key. They would be better off using the person's name instead of email, most people's names never change unlike their email address. If they used email as part of the key they would just about be forced to use an update trigger to update all the other tables in their system that need that value. We can also be pretty sure that they don't have an update trigger on the account table to propagate foreign key values all over the place.

    I agree that identity is probably overused but to say that it has no place in the real world is just flat out rubbish. To use your own arguments about turning Cindy Lou Who upside down to verify an identity, the same is true of SSN and email. They are no more a part of the physical entity than some arbitrary number.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/