I saw where you started with, "Many database professionals..." and that almost caused me not to reply, but when I read, "it is generally preferable..." I thought you were arguing for using natural keys. It's not the right forum to have a drawn out debate about this but Bayle is a new user and looking for guidance here and I wanted Bayle to know that others disagree on that particular issue of using natural keys. Thanks for clarifying that. :-)
I'm in the always use surrogates camp. I can think of two cases from my own history where I thought it would be safe to use a natural primary key: SS# and Universal Product Code (UPC). We had to stop using SS# because of privacy concerns. Can you remember a time when everyone used SS# for things like student numbers? I can. Now, it's sacrilegios. But UPC should have been OK... there are no privacy concerns there and those never change, right??? It turns out that they do, sorta. UPC usage is at the descretion of the manufacturer. If he changes internal supplier for a sub-part, he may choose to assign a different UPC. Also, a vendor may use the same UPC for all items even if they vary in color. The vast majority do not and we originally designed our system thinking that 1 UPC = 1 Color. When that was proven wrong, we had to re-design. Since UPC was a primary key and not a field, the changes to the system were much more pervasive than they would have been if we'd just needed to push UPC down into a 1:N table. I wonder about the guy who thinks sequential keys are almost sacrilegious. What does he do in situations where no natural key exists?... like a person object? Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss -~----------~----~----~----~------~----~------~--~---