Link to home
Start Free TrialLog in
Avatar of Jim Horn
Jim HornFlag for United States of America

asked on

Uniqueidentifier vs. int identity(1,1): Discuss.

So I'm being thrown at a Microsoft Dynamics CRM application, and I see that all the PK / FK's are uniqueidentifier, and not the int identity(1,1) I've seen on almost every other application I've worked with.

Question:  What is the advantage of uniqueidentifier, as opposed to int identity(1,1) ?

Thanks in advance.
Jim
Avatar of Ashok
Ashok
Flag of United States of America image

One advantage a GUID has is that it tends to be unique even across databases, but it's a performance and space hit in most applications.

int identity(1,1) uses less space and sequential so it is faster.
SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Identity does an auto update whereas uniqueidentifier is data specific.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Horn

ASKER

Thanks all.  Points awarded based on perspective that I counldn't find with a standard Google search.  -Jim