[R-sig-DB] DBI drivers ?

Emmanuel Charpentier ch@rpent @end|ng |rom b@cbuc@dyndn@@org
Sun Aug 25 13:53:37 CEST 2002


David James wrote:
> Hi Emmanuel,

Hi !

Sorry for the late answer : I was on vacation.

[ ... ]

> Well, there are other issues involve.  For instance, in the case
> of the RODBC driver the underlying C code does not map correctly
> R data types to SQL data types -- it just saves all the data as
> character strings.  This approach is not too bad if R (thru the
> RODBC driver) is the only application that will use those data;
> but the tables created like this (with all the columns stored as
> strings) may not be too useful to other applications (say, excel or
> Splus or Matlab, ...).  I believe that in some (older?) versions of
> RPgSQL the fetching cannot (could not) be done in batches, and in
> some situations one may need to bring the data in chunks to avoid
> crushing R.

Too right ... So we need to improve this a bit. One of my pet peeves at 
the moment with RODBC is the way it munches date/time data ...

About RPgSQL : it does some great things, but the current doc does not 
describe what the current package does. For example : the funcrtion 
binding a dtabase table to a R object does nt return this R proxy 
object, as described, but, as a side effect, creates a R object having 
the same name as the table in the top-level environment.

Therefore, both packages have to be enhanced. To my naïve eyes, it seeme 
to me that the ODBC specificaation is a good starting point, but I may 
be wrong. IMHO, we'd better stick to an early ODBC specification (2.0 or 
3.0), in order to avoid too specific features ...

> At some point it is better to rebuild from the ground up some of
> these drivers.  My current plans is to update the RODBC and 
> Duncan Temple Lang has expressed interest in continuing Tim's
> RPgSQL driver.

Dreat ! However, I think tht wrapping those two (and other ?) drivers in 
a common interface is still the way to go ...

> Which driver are you most interested in?

Ah ! That's a hard one : I use mostly PostgreSQL for many reasons, but 
ODBC is, IMHO, the most important interface : it is currently the only 
DB interface specification close enough to a cross-platform standard. As 
much as I dislike some points of the specification, I feel that this 
interface gives the most cross-platforms interoperability.

Furthermore, even as a PostgreSQL die-hard, I have sometimes to use 
other datasources. ODBC is quite useful in this case.

Therefore, I would vote for an ODBC driver as the highest priority. 
However, the proxu object concept of RPgSQL is quite interesting, and I 
wonder if such an interface can be build on top of ODBC : if so, my vote 
would go to it.

Sincerely,

					Emmanuel Charpentier
-- 
Emmanuel Charpentier




More information about the R-sig-DB mailing list