Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GUID for a primary key?
Message
From
26/07/2021 16:23:00
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
24/07/2021 09:37:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01681922
Message ID:
01681936
Views:
87
>>To me it looks like a no brainer. When creating a primary key for a table I use a guid.

We used SQL Server autoinc/identity fields starting in 1996. Problem is that unless you knew back then to seed the Identity at -2 billion, INT tops out at 2 billion which sounds like a lot unless you're deleting and re-inserting rows frequently which can chew through the increment very quickly. Path forward possibly involving bigint though that will involve some FK issues and VFP doesn't have that field type. GUID obviously avoids all this, at the cost of bulk and possibly less efficient indexing if you can get away with INT identity.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform