Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

RoR: Composite Primary Keys? Stored Procedures? ListGrid?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

I actually picked up the book last week. I'm only four chapters in, but it's the best intro material I've read so far, and I'm looking forward to getting through the middle of the book and creating the Depot application.

After the Depot app, I have a "real" application I want to try, but I'm still very new to Rails, and I keep hearing about the "greenfield" vs legacy thing. I have three specific features in mind; maybe you can tell me if they're do-able in Rails.

My legacy app uses a back-end DB2 database. So far, no problem. But the tables have composite primary keys. Most of the examples of Rails apps I see use surrogate auto-generated integer primary keys. Are composite primary keys possible using Rails?

This legacy app I have in mind also uses Stored Procedures. I haven't seen any examples of this in Rails, at least from what I've seen so far. Can I call DB2 Stored Procedures in Rails?

Finally, this legacy app displays a grid, similar to DomAPI's Listgrid. Is something like this possible in Rails?

Thanks for a great book!
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might find interesting information on how to use Rails with legacy databases on this article on the Rails Wiki:

http://wiki.rubyonrails.com/rails/pages/HowToUseLegacySchemas

Composite keys are not supported by plain Rails. However, there is a plugin that seems to support them, but I haven't tried it:

http://compositekeys.rubyforge.org/

Hope that helps.
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic