Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Surrogate Keys - Have I got the right idea
Message
De
14/01/2001 20:06:43
 
 
À
14/01/2001 18:41:29
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:
00463620
Vues:
15
>James;
>
>How do you generate the header to ensure uniquess? I am curious because I have an application that has users in the field (no possible way to access the network) for up to 2 weeks at a time and I may want to consider your idea for some of our tables.
>
>I forgot to respond this to your prvevious post: a surrogate integer keys is faster than a surrogate GUID but it is slower than a natural key when it requires an additional join... Don't get me wrong, I almsot always use surrogate keys for the main table but I will use a natural key for secondary tables when it makes sense.
>
>Daniel

I create a table called ID. For each table that requires a pk, an entry is created where the next value is stored. In the database I have a procedure that increments that value and returns it to the client.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform