Re: combining db's- importing primary keys

From: nha <lyondif02(at)free(dot)fr>
To: Bob Gobeille <bob(dot)gobeille(at)hp(dot)com>
Cc: PgSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: combining db's- importing primary keys
Date: 2009-07-29 16:04:09
Message-ID: 4A7072F9.6000506@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Le 29/07/09 16:44, Bob Gobeille a écrit :
>
> On Jul 29, 2009, at 8:26 AM, nha wrote:
>
>> Hello,
>>
>> Le 29/07/09 15:02, Jasen Betts a écrit :
>>> On 2009-07-27, Bob Gobeille <bob(dot)gobeille(at)hp(dot)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.
>>>
>>
>> A process (and solution) may be different whether: [...cases...]
>
> In my immediate case, I'm simply combining 7 global databases into a
> single master.
>
> Eventually, I would like to allow our (fossology.org) users to subscribe
> to data in other databases. That is, allow
> users to do periodic one-way batch updates from other servers.
>
> Bob

In such a purpose (where asynchronous updates seem reasonable),
prefixing (as suggested by Jasen Bett) or adding server-based column to
current keys (as you mention thereafter) look like handy solutions.

Good plan.

Regards.

--
nha / Lyon / France.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2009-07-29 16:04:53 Re: Clients disconnect but query still runs
Previous Message Jeff Davis 2009-07-29 15:55:40 Re: Relational Algebra and Aggregate Functions