Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GUID as Primary Key
Message
From
18/02/2003 15:34:30
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
18/02/2003 12:25:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00754530
Message ID:
00754624
Views:
20
Hi Ken,
As Vin mentions, GUIDs are a lot larger than interger fields. If you have fairly narrow tables, the size jumps when you switch to GUIDs. It's not just the primary keys, it's all the foreign keys in each record. Small CDXs leads to fast queries--large CDXs, not so fast. Another version of the compound keys mentioned is to use a site interger multipler. If you envision 400 sites, each site can generate 10 million records per table. Don't start with 0, but -2147483647. Site #2 seeds the Keys table with -2147483647 + (2*10,000,000) and so on.
If you have only 40 sites, you can do 100 million records per table per site. That should be enough.

>We have a new client who has remote locations. The situation does not call for a wide area network with "on-line" capability. The client would rather give the branch locations the ability to operate on their own and pass data back and forth periodically.
>
>This raises the issue of merging data and the worry about unique primary keys. I have heard about GUID keys as an alternative but, at the time, did not pay enough attention. Anyone have experience with this?
>
>Thanks,
>
>Ken
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform