Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Surrogate Keys - Have I got the right idea
Message
De
11/01/2001 19:13:22
 
 
À
11/01/2001 19:09:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00434523
Message ID:
00462680
Vues:
17
>Hello Walter and all
>
>How does this sound as a solution to my updating problem using surrogate keys.
>
>To avoid getting an update problem I convert the PK in my target table to a minus amount. I then delete the record and cascade any deletes that are neccesary if more tables are involved.
>
>Because the deleted records in the target table now have a different PK I can append in my new records (which contain the original positive PK)
>
>I realise that this can be a bit inefficient in some circumstances but I can think of a lot of circumstances where it would be the simplest way.
>
>Assigning a minus PK to deleted records would also have the advantage of allowing me to start recycling deleted records again like I did in the old days.
>
>Am I about to make a big mistake .
>
>Please let me know
>
>Thanks:)


SET Devil's Advocate ON

So now what happens if someone deletes the new positive value DK record again?

SET Devil's Advocate OFF
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform