Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identity Fields vs. Guids
Message
 
To
04/12/2000 13:56:19
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00448993
Message ID:
00448996
Views:
6
>What are the differences between using Idnetity Fields vs. Globally unique Identifiers?
>
>All the examples I see in books and questions, people seem to be using Identity Fields, but the last place I worked, their rule was to use GUIDS.
>
>Thanks,
>Dustin

Identity fields are smaller (4 bytes vs. 16 bytes), and I believe faster. But Identity values can cause problems in two areas I know of:

1. Replication (GUIDs are great for this)
2. If you insert a record into a table, and a trigger on the insert causes a record to be inserted in a different table, the @Identity value you get back from SQL Server will be invalid. It will be the ID for the other table, not the one where you did the Insert. And this is not a bug, just expected behavior.

I spoke with Gary DeWitt about this very same issue at the Great Laked Great Database workshop, and he indicated his preference for GUIDs.
Chris McCandless
Red Sky Software
Previous
Reply
Map
View

Click here to load this message in the networking platform