Connecting store procedures

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

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