[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ActiveRecord alternatives

elriba

7/13/2006 9:56:00 PM

Hi,
I have a database application running under sybase anywhere SQL server.
I would like to develop modules in Ruby to access that database.

I started to look at ActiveRecord, but it seems that one requirement is
that all tables have an identity column with a specific name. My
database was not designed that way :-(

Are there ActiveRecord alternatives that would allow me to use my
existing database design? Or even better, are there reviews that
compare the different data layers available for Ruby?

Thanks,
Edgard

4 Answers

Kashia Buch

7/13/2006 10:10:00 PM

0

On Fri, 14 Jul 2006 00:00:17 +0200, elriba <edgard.riba@gmail.com> wrote:

> Hi,
> I have a database application running under sybase anywhere SQL server.
> I would like to develop modules in Ruby to access that database.
>
> I started to look at ActiveRecord, but it seems that one requirement is
> that all tables have an identity column with a specific name. My
> database was not designed that way :-(

I don't think ActiveRecord is that stupid (but I've never tried it).
I think there must be a way to trick it into doing that.

> Are there ActiveRecord alternatives that would allow me to use my
> existing database design? Or even better, are there reviews that
> compare the different data layers available for Ruby?

Yes, Og from George. You can find information on nitroproject.org.
It does what you require, but it's hidden. The Nitro-General ML
helps there.
(http://rubyforge.org/mailman/listinfo/nit...)

Jo

--
Using Opera's revolutionary e-mail client: http://www.opera...

Philip Hallstrom

7/13/2006 10:36:00 PM

0

Marcin Mielzynski

7/13/2006 10:52:00 PM

0

Philip Hallstrom wrote:
>> On Fri, 14 Jul 2006 00:00:17 +0200, elriba <edgard.riba@gmail.com> wrote:
>>
>>> Hi,
>>> I have a database application running under sybase anywhere SQL server.
>>> I would like to develop modules in Ruby to access that database.
>>>
>>> I started to look at ActiveRecord, but it seems that one requirement is
>>> that all tables have an identity column with a specific name. My
>>> database was not designed that way :-(
>>
>> I don't think ActiveRecord is that stupid (but I've never tried it).
>> I think there must be a way to trick it into doing that.
>
> set_primary_key()

You can override table names and names of all your columns. There are
few things AR doesn't allow (compound primary and foreign keys notably)

There is another orm http://jutopia.tirsen.com/articles/... that
will allow you to create much more flexible mappings.

lopex

Kashia Buch

7/13/2006 11:19:00 PM

0

Hi,

> You can override table names and names of all your columns. There are
> few things AR doesn't allow (compound primary and foreign keys notably)

mh, ok. good to know.

> There is another orm http://jutopia.tirsen.com/articles/... that
> will allow you to create much more flexible mappings.

Thanks for that link, didn't know that one yet.

Jo

--
Using Opera's revolutionary e-mail client: http://www.opera...