There is annotate_models (http://github.com/ctran/annotate_models/)
gem for ActiveRecord which will extract schema definition from table
and will put it as comments in your model file - so in this sense you
can get the same benefit in AR with less typing :)

If you have tables with composite primary keys (or non-numeric keys)
then DM handles them natively. in AR there is composite_primary_keys
gem but it breaks with each new release of AR :)

P.S. There are more benefits in using DM with legacy Oracle database
tables as in Oracle there is less database types than in MySQL and
therefore it is good that you can specify exact mapping between Ruby
types and database types in models.

Raimonds

On Sep 30, 9:27 am, Nicholas Orr <[email protected]> wrote:
> The main advantage I'd see is being able to see your MySQL tables in
> your models.
> This is a big plus for me over ActiveRecord, no need to refer to
> phpmyadmin, just look at the models.
> Since I used merb over rails I'm not sure if this is relevant still...
>
> Nick
>
>
>
> On Wed, Sep 30, 2009 at 1:25 PM, Ming <[email protected]> wrote:
>
> > I need to integrate Rails with a set of MySQL tables managed by
> > another system.  Rails should need mostly to read from these tables.
>
> > Are there any significant advantages -- or disadvantages -- in the way
> > DataMapper handles database integration over ActiveRecord?
>
> > TIA

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to