Re: Use of UNIQUEIDENTIFIER vs IDENTITY for PK with VB.NET/SQL2000
From: Greg Linwood (g_linwoodQhotmail.com)
Date: 04/21/04
- Next message: oj: "Re: any new paginations idea?"
- Previous message: oj: "Re: Active directory update"
- In reply to: ES: "Use of UNIQUEIDENTIFIER vs IDENTITY for PK with VB.NET/SQL2000"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 10:30:33 +1000
This topic has been done over many times in this newsgroup, so I suggest you
perform a Google search on this newsgroup & you'll get lots of opinions,
information etc.
One big problem with identities is that they limit your performance tuning
options later as you cannot partition a table that has an identity without
breaking applications that use the database. This is often over-looked
during design phase.
Using a GUID causes a larger storage foot-print which has performance
implications, but I've personally observed this to be of minimal impact,
although others have regularly claimed otherwise. Another advantage of GUIDs
not mentioned in this thread is that they can be safely generated at the
application level, allowing full row generation of related rows (eg order /
orderdetail) at the application layer without round-trips to the database.
This is a commonly used data tier technique. Round trips can really hurt a
db's performance so this argument has substantial merit on it's own.
Readability is often quoted as a reason not to use GUIDs and this may be
important to you, but there are many reasons for / against both GUIDs and
identities, so I suggest you do a search of the newsgroup as there will be
much information for you there..
HTH
Regards,
Greg Linwood
SQL Server MVP
"ES" <enoch.seward@bigfoot.com.REMOVEExtentionToReply> wrote in message
news:uoOtIfxJEHA.2692@tk2msftngp13.phx.gbl...
> My team is about to start a new VB.Net project using SQL2000. During the
> database design phase, I am faced with determining whether to use
> UNIQUEIDENTIFIER or IDENTIDY (int) for Primary Keys on tables. What are
the
> recommendations for DotNet database development? I'm leaning toward the
use
> of IDENTITY with a UNIQUE constraint but my team is used to working with
> GUIDs. I understand the importance of a GUIDs guaranteed uniqueness, but
> can't I achive the same results with the use of a UNIQUE IDENTITY? The
> readability would be greatly increased.
>
> Pros? Cons?
>
> Thanks,
> Enoch
>
>
- Next message: oj: "Re: any new paginations idea?"
- Previous message: oj: "Re: Active directory update"
- In reply to: ES: "Use of UNIQUEIDENTIFIER vs IDENTITY for PK with VB.NET/SQL2000"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|