[Catalyst] connecting to more than one database
jagdish.eashwar at gmail.com
Thu Jul 3 17:00:22 BST 2008
Putting all the tables in one database is a solution. I am afraid, however,
that when I create a model using script/MyApp_create.pl for a specific
Catalyst application, I'll get all the tables in the database into my
DBIC schema. Is there a way of making MyApp_create.pl pick up only a subset
of the tables?
On Thu, Jul 3, 2008 at 8:52 PM, Jonathan Rockway <jon at jrock.us> wrote:
> * On Thu, Jul 03 2008, jagdish eashwar wrote:
> > So when I was able to do what I had in mind at the database level, I
> thought it
> > would be possible to do the same with Catalyst and DBIx::Class also. I
> > haven't lost hope. It would be painful and inelegant to have to
> replicate the
> > employee details for each of the web applications in the respective
> Logically, your two databases are one database. You should consider a
> database to be a universe in isolation, with no access to anything else.
> If you have dependencies between two databases, they are not two
> databases, they are one database.
> >From an implementation standpoint, how do you expect the database engine
> to implement things like locks across two databases? (Berkeley can do
> it, but I don't know about RDBMSs though.)
> Basically, what you want to do with DBIC is not possible. I don't think
> DBMS (should) allow this either. So you really need to combine your two
> As a last resort, I seem to remember SQL Server being able to alias
> tables between databases. If your DBMS allows something like that, then
> you can do that. You might also be able to add stored procedures to the
> first database that returns the tables in the second database. DBIC
> will probably deal with those, at least for reads. But that's not
> really optimal; just make everything one database.
> Jonathan Rockway
> print just =3D> another =3D> perl =3D> hacker =3D> if $,=3D$"
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst