Relationships across databases

3 views
Skip to first unread message

Gaurav Gupta

unread,
Aug 31, 2011, 11:01:25 AM8/31/11
to sqle...@googlegroups.com
I have a situation where I have 2 databases say db1 and db2. In db2, I have tables that have relationships (ForeignKey, ManyToOne) with few tables in db1. How do I express this in Elixir/SQLAlchemy.

Thanks

Diez B. Roggisch

unread,
Aug 31, 2011, 5:24:37 PM8/31/11
to sqle...@googlegroups.com

On Aug 31, 2011, at 5:01 PM, Gaurav Gupta wrote:

> I have a situation where I have 2 databases say db1 and db2. In db2, I have tables that have relationships (ForeignKey, ManyToOne) with few tables in db1. How do I express this in Elixir/SQLAlchemy.

I doubt that. No database I'm aware of can have that. Of course you can refer to IDs of the other DB, but there is no real Foreign-key or many-to-one there.

What you can do is of course you can use a simple property that queries and delivers an object based on the stored ID in one DB from the other.

Diez

Reply all
Reply to author
Forward
0 new messages