Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Surrogate Keys - Have I got the right idea
Message
From
14/01/2001 20:06:43
 
 
To
14/01/2001 18:41:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00434523
Message ID:
00463620
Views:
20
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform