Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>I suggested we have a PK of it's own because it doens't have one, but my Analyst said we don't need one because it doesn't have any child tables.
PKs are used for alot more than that. Say you want to remember the record number the user was last browsing. If the table is packed between his sessions, storing the record number won't work because may have changed, you need another way to find out what record he was on. Or how about identifying between classes what record to process. If both of your code snippets are using cursors, you can safely pass the PK from object to object and the correct record will be used on both sides. Lots of stuff like that...
Like Erik said, it doesn't matter how its derived, jst as long as you got one and its unique.
Précédent
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