Forum: Ruby on Rails Connecting store procedures

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.
Arnold (Guest)
on 2007-07-12 10:00
(Received via mailing list)
Hello everybody,

  I am new to Ruby, I am a developer using .NET . I wanted to try ruby
out, and till now I find it usefull.
Though I have 3 questions, that I would require some assistance,

I am using SQL-Server 2000 as database along with Ruby on Rails.

1) Can we write stored procedures in the database itself and call it
from our application? if yes then how ?

2) Is it mandatory to create database tables from the application
itself ? If we create the tables directly in the database then how can
we access it from our application?

3) Is it mandatory to provide an id attribute in each database table?
If we use some other attribute as primary key then how can we access
that from our application?

I request anyone in this group to provide me with answers to this
questions.

Thank you
Florian Aßmann (Guest)
on 2007-07-12 11:28
(Received via mailing list)
Hello Arnold,

Arnold schrieb:
> 1) Can we write stored procedures in the database itself and call it
> from our application? if yes then how ?
Don't know much about it, but this could be a hint:
http://wiki.rubyonrails.org/rails/pages/StoredProcedures

> 2) Is it mandatory to create database tables from the application
> itself ? If we create the tables directly in the database then how can
> we access it from our application?
Just create a model and set the Tablename manually. See
ActiveRecord::Base API rdoc

> 3) Is it mandatory to provide an id attribute in each database table?
> If we use some other attribute as primary key then how can we access
> that from our application?
Again, set it manually but I'd not use anything other than Integers as
pkey column type...

Regards
Florian
This topic is locked and can not be replied to.