Forum: Ruby on Rails Rails with existing RDBMS schema

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
01dbef04375ade5dc7ca7da7f1411113?d=identicon&s=25 David Mattes (Guest)
on 2006-04-13 18:39
Hi,

I'm seriously considering using Rails to develop several internal
corporate web apps that will need to interact with well-established
database systems (3 systems running SQL Server, Oracle, and PostgreSQL).
The schema on these systems are basically set in stone.  Can a Rails
application interact with an existing schema without serious Rails
modification?  From what I've read about Rails, it expects the schema to
have certain names, entries, and structure.

Has someone developed with Rails in a similar situation?  How did it go
for you?

Thanks,
David
D2a5b7975f49e051c1de10f98ea81f63?d=identicon&s=25 Chang Sau Sheong (Guest)
on 2006-04-13 18:59
(Received via mailing list)
Yes. I am also building an internal app that interacts with an existing
database system. It works fine. Check out
http://wiki.rubyonrails.com/rails/pages/HowToUseLe.... There
isn't much you need to change in Rails, just more settings to point away
from the default settings that's all.

David Mattes wrote:
> Has someone developed with Rails in a similar situation?  How did it go
> for you?
>
> Thanks,
> David
>
>


--
Sau Sheong

http://blog.saush.com
http://read.saush.com
http://jaccal.sourceforge.net
43ec5998360a0cc21b51afef1781e9c0?d=identicon&s=25 Daniel Higginbotham (Guest)
on 2006-04-13 18:59
(Received via mailing list)
Hi David,

You should be able to use Rails without modifying the Rails code itself.
Most likely you'll need to do some extra configuration in your
application's
models. This should help:
http://api.rubyonrails.org/classes/ActiveRecord/As...
ml

You would also probably use the set_table_name macro here:
http://api.rubyonrails.org/classes/ActiveRecord/Ba...

Daniel
9cda8aa1eba99b44d85b389642a889d4?d=identicon&s=25 Ville (Guest)
on 2006-04-13 19:27
(Received via mailing list)
David Mattes <david.mattes@...> writes:

> I'm seriously considering using Rails to develop several internal
> corporate web apps that will need to interact with well-established
> database systems (3 systems running SQL Server


Works fine, I am doing exact that as we speak, mostly with SQL-server.
You can
override the primary key name etc. Of course more you configure, more
you lose
the "convention over configuration" advantages of Rails.
6f7c877de704c7cc03c8a3b2dc52df92?d=identicon&s=25 Carmen --- (carmen)
on 2006-04-14 05:35
> http://wiki.rubyonrails.com/rails/pages/HowToUseLe.... There

from what i can tell, this is great for a place that is soo stodgy they
dont want to ever move to a new schema, or theres too much other legacy
stuff relying on it..

is there an easy way to cast from one class to another? for example, i
have a bunch of old data, and id like to make a OldThing and Thing
class, they would be identical except OldThing would be decorated with
all the custom SQL, and once the object is read, id like to write it out
in the shiny new schema format...
This topic is locked and can not be replied to.