Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique ID Violated With Add/Delete
Message
De
15/06/1998 14:34:40
 
 
À
15/06/1998 14:23:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00108257
Message ID:
00108310
Vues:
42
>>>>Bear in mind that the DELETED() status has nothing to do with the uniqueness of a candidate or primary index. In any incremental key situation, you have to search all your table whether or not the records have been deleted.
>>>
>>>
>>>PMFJI but in addition, even if you should check the deleted records, a simulataneous add by two users will also give the same behavior.
>>
>>I agree. Tying this into an earlier thread about unique keys, I don't even try to use sequential numbers unless forced to. I like to use GUIDs as primary (unique) keys.
>
>You bring up a question in my mind that I've had for awhile. Are there any *real* benefits to using unique or candidate keys. I've yet to come up with anything that outweighs the annoyances.< s >

Absolutely there are. To name two (and there are others) that apply to VFP:

1) Normalization. You need a unique key that will never change.
2) Scalability. SQL Server and Oracle DEMAND unique, primary keys.
3) Conflict. A unique violation may alert you to other errors in data mgmt.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform