Keep you pk like it is...auto incrementing...and add another field with uuid
and then you can reference them

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 23, 2008 7:38 PM
To: CF-Talk
Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?


Thanks for the feedback, Dominic.

I'll have to do some more research on this approach.

I was thinking that the UUID would take the place of using
the PK my databases, as in:

a href="community.cfm?community_uuid="#url.community_uuid"

and I would begin to code all my links using the uuid as
the "relational" key instead of the PK.

I need to become more familiar with using unique constraints, etc.

Rick

> -----Original Message-----
> From: Dominic Watson [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 23, 2008 7:10 PM
> To: CF-Talk
> Subject: Re: Any "Gotcha's" in using CF UUID for db record primary key?
>
> Hi Rick,
>
> Personally, I would still use an auto-incrementing integer for the PK but
> have the UUID as a separate field with a unique constraint. Primary keys
are
> not for making a single row unique but for facilitating the relational bit
> of relational databases (i.e. defining Foreign Key relationships). Having
> PKs as narrow as possible is better for performance when querying a
database
> across relationships (i.e. using Joins, etc).
>
> Of course, as well as having the unique constraint on the GUID, your table
> should also define a constraint/index that logically defines what makes a
> row unique (i.e. a combination of account number and sort-code is a
logical
> unique identifier for a bank account and should have a unique index or
> constraint - but not be a PK).
>
> HTH
>
> Dominic
>





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301871
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to