Hey people, I have the following question to present to you all. I need some basic information about how to use rails to migrate the dataset of my project between two types of database systems. First, the live data now exists in MSSQL and also uses a very poorly designed database scheme. Next, the data needs to be migrated to MySQL, also using a completely re-designed schema, where tables have transformed and sometimes even dropped. How (in very general lines) woudl I accomplish this using ruby on rails? I''m not really looking for any detailed examples or anything, just a place to start. Thanks in advance, danny -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Assuming your application is running in rails already, you can run ''rake db_schema_dump''. This will create db/schema.rb, which you can then modify before importing into your MySQL database by running ''rake db:migrate''. If you''re not already running Ruby on Rails, you could always set up a new rails application and point it to your current MSSQL database (instructions here: http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServer). Good luck. On Feb 19, 7:15 am, Daniel Owen van Dommelen <rails-mailing- l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hey people, > > I have the following question to present to you all. I need some basic > information about how to use rails to migrate the dataset of my project > between two types of database systems. > > First, the live data now exists in MSSQL and also uses a very poorly > designed database scheme. > > Next, the data needs to be migrated to MySQL, also using a completely > re-designed schema, where tables have transformed and sometimes even > dropped. > > How (in very general lines) woudl I accomplish this using ruby on rails? > I''m not really looking for any detailed examples or anything, just a > place to start. > > Thanks in advance, > > danny > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Owen van Dommelen
2007-Feb-19 12:32 UTC
Re: using rails to migrate between databases
Theron Parlin wrote:> Assuming your application is running in rails already, you can run > ''rake db_schema_dump''. This will create db/schema.rb, which you can > then modify before importing into your MySQL database by running ''rake > db:migrate''. If you''re not already running Ruby on Rails, you could > always set up a new rails application and point it to your current > MSSQL database (instructions here: > http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServer). > > Good luck. > > On Feb 19, 7:15 am, Daniel Owen van Dommelen <rails-mailing-I do not think this is an option for me since I''m working with an enormous database. There was a hint I got from the person who''s managing this project and it was somewhat in the line of using SQL queries to get the data into the code and then using this data I have to create the models to support the new database layout. any thoughts on that? 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Owen van Dommelen
2007-Feb-19 12:34 UTC
Re: using rails to migrate between databases
by the way, the old database scheme is not following the rails conventions... -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Do schemas differ a lot structuraly? Are relations more or less preserved structuraly at least? -- fxn --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Owen van Dommelen
2007-Feb-19 12:59 UTC
Re: using rails to migrate between databases
Xavier Noria wrote:> Do schemas differ a lot structuraly? Are relations more or less > preserved structuraly at least? > > -- fxnno the schema are pretty much complete different, also relations have been totally redesigned. The old schema has been done by a student who created it as his internship project, but has really dropped the ball back then. This is also one of the reasons I had to complete redo the database, about a year later now. I might have found my information though. I''m diving into DBI module, and it thusfar is proving to be the thing I was looking for... If anyone is interested follow this link: http://www.kitebird.com/articles/ruby-dbi.html thanks for the attention people! -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel, You might be able to use ActiveWarehouse ETL to extract from the old system, transform the data as necessary and load into the new system - that''s what it was designed for (although primarily for data warehouses but there is nothing that locks it into that). More info: http://activewarehouse.rubyforge.org/etl V/r Anthony On 2/19/07, Daniel Owen van Dommelen <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Xavier Noria wrote: > > Do schemas differ a lot structuraly? Are relations more or less > > preserved structuraly at least? > > > > -- fxn > > no the schema are pretty much complete different, also relations have > been totally redesigned. The old schema has been done by a student who > created it as his internship project, but has really dropped the ball > back then. This is also one of the reasons I had to complete redo the > database, about a year later now. > > I might have found my information though. I''m diving into DBI module, > and it thusfar is proving to be the thing I was looking for... If anyone > is interested follow this link: > > http://www.kitebird.com/articles/ruby-dbi.html > > thanks for the attention people! > > > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---