On Jul 29, 2009, at 7:02 AM, Jasen Betts wrote:
> On 2009-07-27, Bob Gobeille <bob.gobeille@hp.com> wrote:
>> I would like to combine multiple databases (same schema) into one
>> master db. Does anyone know how I can reconcile all my primary and
>> foreign keys to maintain referential integrity.
>
> prefix them all with something that's unique to their source database.
>
> easy to say, hard to do.
I can't believe this didn't occur to me. All my primary keys are
bigint's, but I could add a second field, a unique server number or
name, and change my primary (and foreign) keys to the two column
combination. This would make it easy for new db's but I need to give
some thought to see if there will be any hiccups migrating all the db's.
Many thanks Jasen.
Bob