Information générale
Forum:
Microsoft SQL Server
>>>
>>>OTOH, we also use the 'practice' of using meaningless int fields as PKs and they indeed avoid a lot of problems. OTOH, it does not make any other 'practise' against the relational model or even bad practice.
>>>
>>>Walter,
>>
>>True, but as soon as you write a trigger and try to join
>>INSERTED and DELETED tables as you do it?
>
>I hate to jump in with a simple "good point", but that's a very good point. It's going to have at least some impact on the traditional patterns and processes for audit trail logging.
Nothing is perfect.
Use a fixed number that identifies the row has as a side effect the management of mutual exclusion.
Use an integer identity has the side effect that the values are consumes and you are likely to hit the upper value,
and then delete and insert technique is not recommended.
The best solution has to be chosen case by case basis.
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