Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Surrogate Key
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00230735
Message ID:
00230744
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform