Files
2012-02-21 01:15:00 -05:00

1 line
4.9 KiB
JSON

[{"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302551234.899914, "message": "I'm looking at Rails as a useful admin interface to a bunch of existing tables/views/ stored procedures in an Oracle DB. Will Rails work, or should I look somewhere else?", "group_id": 447, "id": 628497}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302551255.838999, "message": "In either case, where can I go to read up on how people are doing this?", "group_id": 447, "id": 628502}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302551287.4682131, "message": "It seems like Rails and pretty much every other web framework out there, deal with people creating NEW apps, and I don't know of any framework that advertises how great it is at working with legacy systems", "group_id": 447, "id": 628508}, {"user_id": 323, "stars": [], "topic_id": 18670, "date_created": 1302559292.818362, "message": "It depends on how crazy the DB design is. What we've built with AdGrok (rails 3) has the db design that I'd want if we had been using oldskool tools, like hibernate.", "group_id": 447, "id": 630862}, {"user_id": 323, "stars": [], "topic_id": 18670, "date_created": 1302559311.2686419, "message": "For the sprocs, know that you can always drop to direct SQL within a model.", "group_id": 447, "id": 630867}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302575324.7272279, "message": "So while it looks pretty straightforward, I don't really know how to go about making an app with it since all tutorials deal with starting from scratch, and there are few (if any) resources to tell you how to map models to existing tables and such.", "group_id": 447, "id": 635066}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302575277.70189, "message": "I don't think what I'm looking to deal with is too crazy. They're probably similar to a Rails-style model, except that the mappings won't work and I might have a join here and there that won't match up easily (unless Rails is just that awesome).", "group_id": 447, "id": 635061}, {"user_id": 28862, "stars": [], "topic_id": 18670, "date_created": 1302608081.420469, "message": "I've done legacy stuff with MySQL and Postgres (which is close enough to Oracle) - it's really not that bad, you just use `set_primary_key` and its friends a lot. Like mrm says, though, you're guaranteed to be using `find_by_sql` at some point when `Object.all :select => blah, :conditions => blah, :join => blah` isn't enough.", "group_id": 447, "id": 640608}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302609480.9110861, "message": "Fair enough. What are some places I can look for that show me the helpers and methods that will let me remap my model around an existing table/s?", "group_id": 447, "id": 640955}, {"user_id": 28862, "stars": [], "topic_id": 18670, "date_created": 1302610940.925699, "message": "is the schema more or less relational? (i.e. not a star or snowflake)", "group_id": 447, "id": 641251}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302693349.9593251, "message": "I'd say it's not unlike Rails currently. No physical foreign keys, but there are key relationships that can be joined. There also probably aren't the same timestamp columns you'd get in Rails app, either.", "group_id": 447, "id": 663155}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1302693370.8395979, "message": "But definitely not star-like or like a data warehouse", "group_id": 447, "id": 663156}, {"user_id": 28862, "stars": [], "topic_id": 18670, "date_created": 1302788581.690501, "message": "set_table_name and set_primary_key will probably do it for you, then. Documentation of that is kind of hard to find (at least in one coherent tutorial), so I feel your pain. Having recently done that very thing, though, feel free to ask questions. If you start with putting the connection info into database.yml, and then `rails g model Person` for each table, then add set_table_name with the Oracle table name, and set_primary_key with that table's primary key, all that's left is to run rake db:migrate.", "group_id": 447, "id": 684720}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1304682210.7812679, "message": "That being said, this ActiveRecord stuff is pretty neat. I was thinking there would be more to worry about, but then I realized that the only place that you define columns are in migrations, which I don't have to do since the tables are already there.", "group_id": 447, "id": 940766}, {"user_id": 4221, "stars": [], "topic_id": 18670, "date_created": 1304681973.1469669, "message": "Ok, so following both the set_table_name and set_primary_key seem to be all I need for this app, but I'm looking at how we're doing alot of other things and it seems a bit more complicated.\n\n - Views for read\n - Stored Procedures for write\n\nHow do you emulate that in Rails?", "group_id": 447, "id": 940736}]