Separate DB with rails 3 and mysql

Hi guys,

We have two RoR projects with some similar data in DB let's say DB "A" and DB "B". My task is to store all similar tables with data in one DB - the "C" DB, plus remove unnecessary tables from "A", "B".

I want to find the best way how to do it. The goal is to get the same or better performance of work with DB and don't make a lot of updates in the source code. I have 4 solutions for that: a) to create one main DB "C" with similar tables and views for that tables in "A" and "B" databases and use them through models; b) to create one main DB, add new data for DB connection in database.yml and for "C" DB use transitive class like class SharedModelBase < ActiveRecord::Base   self.abstract_class = true   establish_connection(ActiveRecord::Base.configurations["shared_db_connection_#{RAILS_ENV}"]) end c) to create one main DB "C" and use db-charmer gem for changing db; d) to use mysql replication with two main DB "A", "B";

Thanks.

Hi guys,

We have two RoR projects with some similar data in DB let's say DB "A" and DB "B". My task is to store all similar tables with data in one DB - the "C" DB, plus remove unnecessary tables from "A", "B".

Would not a simpler solution be to completely combine the databases into one new db for both apps.

Colin