Re: [R] R ORM?

From: Faheem Mitha <faheem_at_email.unc.edu>
Date: Tue, 18 Nov 2008 16:43:42 -0500 (EST)

Hi Hans,

Thanks for the reply.

On Tue, 18 Nov 2008, Hans Werner Borchers wrote:

> Faheem Mitha <faheem <at> email.unc.edu> writes:
>>
>> Hi,
>>
>> Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of
>> something similar to sqlalchemy (http://www.sqlalchemy.org/).
>> Alternatively or additionally, can people offer suggestions about managing
>> relational databases from R. I'm currently using postgresql, but would
>> like a flexible solution that works across different databases, hence the
>> enquiry about ORMs.
>
> Hi Faheem,
>
> I am wondering, what kind of objects or classes you would like to
> apply the object relational mapper to. S4 classes? -- I doubt that
> very much.

Yes. R classes. As long as they support the object oriented paradigm, it doesn't matter too much to me what kind exactly. ORMs map between classes and db tables.

The attraction of an ORM is high level abstraction capabilities as well as a helping of syntactic sugar.

> The only reasonable structure for which one could use a mapper in R is
> the data frame. All R database packages provide support for getting
> and sending data in data frames to and from databases. Admittedly,
> this is not what someone from the Python community would accept as an
> "object relational mapper", but may be sufficient given that there is
> only this one class concerned.

You mean eg http://rpgsql.sourceforge.net/ can be used to read and write from a postgresql db, and there are similar packages for mysql etc.?

> The only way I know to become a somewhat independent from specific
> databases is to turn to RODBC (Windows or Linux, you didn't say that).

I use Linux (Debian). You mean
http://cran.r-project.org/web/packages/RODBC/index.html? Is this a recommended approach?

CCing back to list, just in case someone else is interested...

                                                             Faheem.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 18 Nov 2008 - 21:45:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Nov 2008 - 19:30:50 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive