Ruby on Rails with Oracle FAQ
Posted by David December 15, 2006 @ 06:43 PM
Oracle continues blow loving kisses at Rails. This time they’ve posted a new FAQ on how to get Rails and Oracle out on the first date. Initial installation and a hello world application is covered.
In addition, Oracle’s Justin Kestelyn promises that this is just the first of many dates between the two. Keep it flowing.

Dear Sir, does rails blow as much as oracle the loving kisses? very nice conjunction of two good technology.
Mikey, No, Rails does not blow as much as Oracle.
I think not as much reciprocation of support back to oracle, but it is improving in rails.
Number one question in the FAQ:
Q. I think I want to use an Oracle database. A. Think again.
Dealing with an Oracle database promises to make the overall Rails experience hellish.
@Derek
Are you seriously writing off Oracle, one of the biggest database vendors in the world, in one blog comment, with no backup whatsoever?
Oracle “blows”? Why?
I’d let the comment go, but I just see this as the next wave of “everything Microsoft does sucks, linux rules, yay /.” that affects the younger generation and poisons their thinking, and just seems to build steam for no reason, like a snowball rolling down a hill.
Does Microsoft make bad decisions? Yes, sometimes. Is Vista the devil? Maybe, I don’t know. Have they written a lot of good software, and been a big part of what got computers in every dorm room, classroom, and household in the country? Yes. Similarly, has Oracle built a strong database product with a rich feature set that drives the backend of 1000s of businesses worldwide? Yes. Does that mean they’re perfect? Probably not.
But where do you get off saying “Oracle blows”.
M$ has not written any good software. ;P
While I disagree with writing off Oracle so simply, I think one could write off Oracle for Rails.
Why would one want to use Oracle for Rails? Is it cheaper? No. Is it faster? No. Does it have more features? Yes, but Rails doesn’t support them so in terms of Rails no.
When you’re developing with mySQL as a baseline, you don’t take advantage of the more advanced features of systems like Oracle. Oracle does have some cool things like built in tree support and amazing referential integrity, but Rails does all that through the Rails framework.
In the end, Rails was made for mySQL and to a lesser extent PostgreSQL. The article doesn’t give us reasons for why we would want to use a less supported, expensive system whose feature set isn’t taken advantave of by Rails. I’m not saying that Oracle is bad, just that Rails doesn’t use anything it offers (and won’t since the majority of sites will be running mySQL or PostgreSQL). Now, if we were talking about OpenACS, the story would be different as ACS takes advantage of what Oracle has to offer.
BTW, I like being wrong because it means that I get to learn something so if you can say why Oracle would be an advantage in a Rails system, please tell me.
Being able to use Oracle as a backend to Rails is important for at least two reasons:
1. It makes Rails a viable solution for a lot more businesses. Many have made significant investments in Oracle technology and while they must maintain their databases on Oracle they also may move new application developments on our beloved Rails
2. If you need a heavy lifting database then Oracle offers you solid and transparent support for replication and clustering.
moreover it is true that you can program without using any of the relational features of the database but it is important that they are there to help if it is needed.
@Adam
One big reason to support an Oracle backend – what if you’re an in house developer somewhere that runs Oracle. You want to start slowly bringing some rails apps into the picture. No IT department is going to want to deal with other MySQL servers when they’re already supporting Oracle. Bingo, a reason to want Oracle support.
Secondly, doesn’t everyone in the open source world favor choices? There’s more than one way to do it? Why should rails lock you into one database. Support, choice, both good things.
Isn’t one of the things that makes Rails so attractive the fact that it is easily extensible, because Ruby makes it so? If thats the case, then those so inclined could extend rails to take advantage of Oracle’s advanced features.
Hell if Oracle went to the trouble of making that Rails/Oracle Howto, it might not be a bad idea if they made an extended Rails-Oracle library available as a plugin. (hint, hint)
...a lot of greenhorns here not understanding the difference between oracle, mysql, postgresql, etc.
anyway, at least it’s amusing :-)
why not use memcached to store financial transactions? lol
“we don’t need referential integrity in the db because rails already does it” is my favourite!! g
A database is merely a hash sir. Also, it is much better to do integrity in rails because it is written inside Ruby.
Why must use old mainframe technology of oracle, they only focus on database and write stupid assembler code.
This is 21st century. Who needs assembler? use Ruby to access database. I like to open my table inside notepad, then I write one class to meta-program another class which read every line 10 thousand times, then I take 1 million rows and create 1 million symbolisms inside my interpretter.
After that, it is simple way of getting the list size.
count(*) is for foolish persons
The reason for using any industrial strenght database is to leverage Scaffolds to generate the View while using the database to enforce the Model and Controller.
What the yunguns aren’t smart enough to understand :) is this: back in the 1950s it was necessary, and therefore common, to bifurcate a system into Smart Code and Dumb Data. The database had not yet been invented. What the OO folk, all languages, are doing is falling back to that paradigm. It’s a pity, since real databases (and MySql is not among them) allow for much cleaner development. Less code, though. And that’s what makes coders nervous.
The Scaffold approach, whether here in Rails or elsewhere, will eventually win out. It’s simply more practical.
The Rails community will decide.