On Thu, Sep 20, 2012 at 11:18:41AM +0100, Sungsam Gong wrote:
> Hi,
> 
> I have been creating a manual relationship between tables (mysql
> MyISAM) within the same database, which worked very well for my
> purpose.
> Just wondering whether it's possible to make a relationship between
> two tables each of which residues in different database.

What do you mean when you say `database`? The mysql notion of `database` 
which resides on the same physical server, or `database` as in separate 
mysql instances? If the later - no this is not possible.

If the former - you can only have relationships within one *logical* 
$schema. Individual sources however can refer to fully qualified tables, 
e.g.:

in Foo::Table1
__PACKAGE__->table('db1.table1');

in Bar::Table1
__PACKAGE__->table('db2.table1');

In other words you need to teach a Nectar::Schema::Complete about both
Nectar::Schema::UNIPROT::* and Nectar::Schema::CARDIODB::*


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to