On 25 October 2011 17:21, Ivan Zagorodniy
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> 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
>
> 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.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
gplus.to/clanlaw
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.