Subject Re: [firebird-support] Re: Auto-increment and generators
Author Phil Shrimpton
On Tuesday 10 February 2004 18:36, h_urlaf wrote:

Hi,

> So would I, but here's the situation: we have a 'mailbox ID' that is
> generally random (doesn't matter, as long as it's unique). Some
> organizations, however, want to specifically set this ID at some point
> (to phone numbers, personnel ID, what-have-you), and this change may
> have to happen on a database that is already deployed.

Repeat after me, Primary Keys should not contain business data.... Primary
Keys should not contain business data....

Business data can, and will change, but 'meaningless' values won't. If a
'mailbox' record needs to contain a unique 'personnel ID' or 'phone number'
make it a separate field and slap a unique index on it.

Phil

--
Discover a lost art - play Marbles
April 2004
ICQ: 760757 | AIM: pjshrimpton | Y!: pjshrimpton | pjshrimpton@...