Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Surrogate Key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00230735
Message ID:
00230744
Vues:
21
>I am not quite sure why this usage of surrogate key is better than a key entered by the users and if so how one should generate it. Should one use random number generator or some such thing.

The user's may have difficulty coming up with a unique key (id) each time. They may also attach meaning to the key which could cause confusion in the future. If they have the power to see and change the key they also might change it in one table which then would break the relation to the matching records in other tables.

Random number is no good since it can repeat and won't be unique. A sequence is much better. See the link below for an example.

>If anyone who is familiar with the use and creation of surrogate
>key, please help. If you kindly use some example to explain
>why it might be better to use a surrogate key, I am obliged.

Check out Craig's webpage, he has an MS Knowledgebase article at
http://members.home.net/foxpro/kb/kb0006.html
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform