Walter Meester
HoogkarspelPays-Bas
Craig,
>Yes, some do...but they shouldn't. The PK should be totally meaningless to the data. It should not be something the user has to enter, nor should it be madeup of a combination of fields. I have a KB artilce on my website that discusses this.
Well, I've had some heavy discussion with JIMB about this subject. And I respectfully disagree with this statment. Though I know CODD or DATA do discourage intelligent key's, they're part of the relational model.
Personally I've got a few reasons to use intelligent key,s:
- It makes raw tables much easier to read, especially when testing or debugging applications.
- It generally requires less joins (as the intelligent key is only in one table) in your apps, therefore improving performance. The same reasoning goes for denormalization.
Using generated PK does remind me of the hierachical databases with pointers to child records. I'd really don't want to go that way.
In many cases I might use a generated key, but not in all. For Example if I got a article table, i would choose articlno (character) as the PK.
Walter,
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement