Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary keys useless?
Message
De
03/09/1997 07:08:51
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
 
 
À
03/09/1997 00:17:32
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00047863
Message ID:
00048225
Vues:
24
>>Federico,
>>note that in VFP a deleted record is not removed from the tabel (until you
>>pack or do some similar action)
>>thus the deleted keys still exists and can potentially be restored
>>
>>you can either use surrogate keys , which is a name to keys that bare no
>>relation to the data ( most recomended IMHO)
>>another option is to recycle used keys - i.e. recall the deleted record and
>>overwrite the data
>>yet another option is to add a filter on the primary key - but IMHO this is
>>not a very good idea (kinda beats the whole idea primary keys if you ask me)
>>
>>Arnon
>
>Sorry, what is IMHO? And why is adding a filter not a good idea? Anyway, most people don't regard deleted records as 'existing' records. Would there be any problem for the VFP standard referential integrity functions to work with the filter? Would it be necessary to create surrogated key for all tables?
>
>
>Tai SC

Let me re-phrase my questions. Firstly, I am wondering whether I should keep surrogated keys for all tables or not. What is the recommendation?

Secondly, I am also wondering whether there is any problem keeping a 'Not Deleted()' filter in my index or not. In my current applicationt, I keep my original primary/candidate key (such as invoice no.) as candidate key (instead of regular key) but set a filter for deleted records. In this way, VFP will check for any uniqueness violation.Would there be any potential problem I will face later? What is the advantage of keeping the candidate key as regular key (as I read in one of the articles 2 days ago)


Tai SC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform