Segmenting databases in environments

We have two environments, sandbox and production, each with it's own
main database. However, production will have a separate database
called Users that has login/password information, which would be used
by the sandbox or production environments to login.

If we set it up in our User model to use the Users database (using
establish_connection) in the sandbox and production environments, is
it possible to still do joins and such <through ActiveRecord, not
custom sql> between the Users database and the main database that is
respective to sandbox or production?

Joins can only be used in one database AFAIK. I dont know how rails
will handle it, if the connection used doing the join doesn't have the
referenced tables you will probably get an error.


you could make use of mysql replication for the user-table