modifying primary key

[prev] [thread] [next] [Date index for 2004/04/28]

From: subscriptions_to_groups
Subject: modifying primary key
Date: 22:46 on 28 Apr 2004
I realize in the docs it explicitly warns against this, however I'd still like to be able to modify my primary key. The database I have should maintain all the referential integity constraints. 
I'm unsure as to haw to proceed. I want a generic solution though, so I was thinking of creating a new type of column set, TMP_PRIMARY, which would essentially be temporary copies of the "original" primary key. 
When first retrieved, they would, of course, be duplicates of the primary key.
On an update however, if the __IDENTIFIER__ tag would refer to these TMP_PRIMARY keys, then recopy the primary keys on successful update. This should allow me to effectively change my primary key.

If anyone sees a flaw in this, I'd love to have it pointed out. Also, I'd love a pointer ( or several )  in the right direction for how to implement this.

Thanks,
Hussein

modifying primary key
subscriptions_to_groups 22:46 on 28 Apr 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52