Topic: Pre Populated Microsoft Database into Rails

Hi,
I have an Microsoft SQL database with predefined tables and columns and I was wondering that the best way would be to tie
this (microsoft) database into the model. Some of the obvious issues that come with this approach would be that the primary key on tables isn't 'id' but is usually a custom primary key on the table. The other problem is tying the custom foreign keys to the associated datatabase tables. Does someone know  of a guide/tutorial to follow - I have looked everywhere for one but maybe my search criteria is wrong..

Any help would be appreciated!

Last edited by IcedBoots (2013-04-15 14:10:37)

Re: Pre Populated Microsoft Database into Rails

Without knowing more about the structure of your database giving guidance is kind of impossible

Re: Pre Populated Microsoft Database into Rails

Have a look here

http://guides.rubyonrails.org/migrations.html
http://guides.rubyonrails.org/association_basics.html
http://guides.rubyonrails.org/active_re … rying.html

It can be helpful to answer your questions

Re: Pre Populated Microsoft Database into Rails

Thank you this has helped