Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What should the primary key be?
Message
De
03/02/1999 08:48:36
 
 
À
03/02/1999 01:45:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00182646
Message ID:
00183359
Vues:
25
>Sure. VFP has no means of internally managing incremental keys, so it rests on the developer to provide them.

I am painfully aware of this, this is one of the things I could not believe when I first started using VFP- where is the autokey field type?

>I have seen time and time again that this can be a problem ----

I haven't seen it yet. I have an app in production that during certain times of the year has about 20 data-entry people pounding on the same screen in intensive DE. This screen automatically adds records to a table at a rate of about 1/ second. And it occasionally runs along side routines that batch add thousands of records in a relatively tight loop. I have yet to have a problem with the de facto scheme used to generate keys (integer stored in an external table). Since VFP locks the table header during an insert, and the developer can explicitly lock the pk table while incrementing the key, and can have the routine ait while another person is using it, this all works out very well for me.

I won't conject on how much trouble other people have had with internal buffering or anything else that might this a bad plan, only testify tht it works beautifully for me.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform