Re: looks like one database from the outside, but it's two inside
- From: Tim.Bunce@xxxxxxxxx (Tim Bunce)
- Date: Thu, 19 Jul 2007 11:13:37 +0100
On Wed, Jul 18, 2007 at 10:23:52PM -0700, Theron Stanford wrote:
Overview: I'm trying to create the situation in the subject line:
from the outside, the database handle thinks it's just one database,
but inside it's really two databases containing tables with the same
schema but not necessarily the same data.
It's not really clear what you're trying to do. From what you say below
it seems that you just want to "just change the env var to switch
between servers". That's relatively simple but doesn't seem to match
what you said above.
My thoughts have turned to something like DBD::Proxy, because then I
could just change the environment variable DBI_PROXY when needed to
switch between servers.
Perhaps you could just use the DBI_AUTOPROXY env var to force a
different DSN without using DBD::Proxy.
I have also thought about writing a driver from scratch, using
SQL::Statement to help out, but that breaks the first rule of driver
writing ("Don't!"), and since this is for my job, the second rule
("Don't -- get someone else to do it for you!") isn't really an
option.
I'm not afraid of putting in the time to do this right, and I'm not
trying to get something for free. But I'd like some opinions about
what might be the correct approaches to this problem, especially if
there's something obvious that I've overlooked. (So OK, I'm trying to
get some advice for free :)
DBD::Multiplex may be worth exploring. (I have a modified and more
flexible version I worked on a couple of years ago that never quite got
polished up and released. It should probably be renamed as it's
slightly incompatible with the old one. Volunteers welcome.)
Tim.
.
- Follow-Ups:
- Re: looks like one database from the outside, but it's two inside
- From: Theron Stanford
- Re: looks like one database from the outside, but it's two inside
- References:
- looks like one database from the outside, but it's two inside
- From: Theron Stanford
- looks like one database from the outside, but it's two inside
- Prev by Date: Re: float bug? perl 5.8, DBI and oracle 10.2.0
- Next by Date: Re: float bug? perl 5.8, DBI and oracle 10.2.0
- Previous by thread: looks like one database from the outside, but it's two inside
- Next by thread: Re: looks like one database from the outside, but it's two inside
- Index(es):
Relevant Pages
|
|