# Re: 1 application, 2 databases: 1 legacy db informix 1 Mysql db?

**URL:** <https://www.ruby-forum.com/t/re-1-application-2-databases-1-legacy-db-informix-1-mysql-db/119319>\
**Category:** Deployment\
**Created:** [November 6, 2007, 12:05am UTC](https://www.ruby-forum.com/t/re-1-application-2-databases-1-legacy-db-informix-1-mysql-db/119319 "2007-11-06T00:05:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [November 6, 2007, 12:05am UTC](https://www.ruby-forum.com/t/re-1-application-2-databases-1-legacy-db-informix-1-mysql-db/119319/1 "2007-11-06T00:05:22Z")

</div>

Mary,

I would recommend the type of approach advocated here:

[http://pragdave.pragprog.com/pragdave/2006/01/sharing\_externa.html](http://pragdave.pragprog.com/pragdave/2006/01/sharing_externa.html)

Basically you would create one AR model that establishes a connection to  
your legacy DB and one that connects to the other one, both of which are  
abstract and then you just subclass models from the appropriate DB -  
specific base class.

Other options may be found here:  
[http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases](http://wiki.rubyonrails.org/rails/pages/HowtoUseMultipleDatabases)

Good luck!  
Wes

-------------- Original message ----------------------  
From: Mary Nu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
