Steve,
 
Let me see if I understand your idea:
 
- The tables would have two id fields, ond which is an UUID, the other an auto number int (intID).
- Whenever a record is inserted, a new UUID and intID are created.
- When updating records, user could choose either the UUID or the intID.
- When exporting, importing, off-line batch updating etc, the UUID would be used, and the intID is ignored.
- For collection gets, query sums and other db statements, and and in system database joins, ths intID would be used.
 
Am I getting this right ?
 
I'm considering to give it a try for the new version of our CMS, the idea of having two IDs seems an overrun at first,
but I guess the extra coding worth for flexibility and performance.
 
One question, how would you index the database columns ? Would you use the intID, UUID or both as indexes ?
 
Regards.

Marcantonio Silva
Diretor de Desenvolvimento de Produtos - Navita
[EMAIL PROTECTED]
www.navita.com.br
Tel: +55 11 3055.2004
Cel: +55 11 7732.4907 (novo)

 

----- Original Message -----
Sent: Tuesday, January 04, 2005 6:18 PM
Subject: Re: [CFCDev] GUIDs as Primary/Foreign Keys

The performance issues mentioned give me another opportunity to defend
my idea of an INT primary key and a GUID candidate key.  :-)  <cfbeat
obj="deadhorse">If your db has to support sometimes-connected apps
(for which GUIDs are best suited) you'll have the GUID field to use,
but for operations within the db and in always-connected apps you'll
want to use the INT.  The latter will not only save weight in the
generated HTML (my original point), it'll be more efficient on the db
side.</cfbeat>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to