Hi
I think packages that simplify database handling from R, for non-expert
users, potentially can be very useful. As you said, database script
language is not always easy for beginners.
I have myself programmed an R packages (
http://easydb.r-forge.r-project.org/) that makes it easier to read, write
and subset data to and from SQLite, MySQL, MS Access and MS Excel (based on
RSQLite and RODBC). I found that it speeds-up the development of R-Database
applications, reduces the amount of code, and makes it easier to switch
from one database system to another. It also saves some time when helping
other R users writing scripts that involve a database.
On the other hand it is not easy to make sure such a package will always
work as expected. I don't know any way to run tests that involve a local
database server during the package compilation on CRAN or r-forge (are
there any?).
There are several other projects with similar ideas:
- dfdb (http://r-forge.r-project.org/projects/dfdb-rodbc/)
- dbframe (https://github.com/gcalhoun/dbframe-R-library)
You may find r-forge useful if you are not sure it is ready for CRAN.
All the best
Julien Moeys
PS: I shall precise that I am not a database "expert", but rather a
regular user of database systems.
-----Original Message-----
From: r-sig-db-bounces at r-project.org [mailto:r-sig-db-bounces at r-
project.org] On Behalf Of Jim Jones
Sent: 18 June 2012 11:56
To: Prof Brian Ripley; r-sig-db at r-project.org
Subject: Re: [R-sig-DB] Database R Package
Dear Prof. Ripley,
Thanks a lot for your feedback!
You're right, the packages DBI and RODBC already provide R-level
for databases. My proposed package actually depend on them. What I
wanted to propose is to have predifined functions, e.g.
so that the user doesn't need to care about the database script
just need to call the package functions and provide the necessary
parameters. Something simple that in my opinion saves some time.
Best,
Jim Jones
2012/6/18 Prof Brian Ripley <ripley at stats.ox.ac.uk>
On 17/06/2012 10:59, Jim Jones wrote:
Gentlemen,
Last winter at university in the R Programming course I developed an
R Package (so far called rdba) for dealing with some DBA tasks from R
scripts. The package basically avoids the need of the user to have
knowledge of database (PostgreSQL + PostGIS) scripts to manage their
databases. It aims to facilitate the scripts development when "on the
you need to handle databases and tablespaces in a physical level.
The package contains the following functions:
Create Database (With or without a template) Drop Databse List
Database Database Exists
Create Tablespace
Drop Tablespace
List Tablespace
Rename Tablespace
Tablespace Exists
Change Owner Tablespace
ListUsers
UserExists
I would like to hear your opinion about submitting it to CRAN, since
I'm new in the list and you are the experts. Initially I just wrote
the functions for PostgreSQL, but it is already in my plans to extend
it to Oracle and SQL Server. What do you think?
I think you are re-inventing the wheel. Please see the R posting
guide (it asks for no HTML, for example), especially about doing your
homework before posting.
Both RODBC and DBI provide R-level interfaces to this kind of thing
the latter with a few backends including RPostgreSQL and ROracle (but
not SQL Server). 'Owner' is not really a portable concept: see the
RODBC manual for how it and similar things are implemented in a range
of DBMSs
CRAN does not make value judgements about usefulness of packages, so
duplication is no bar there.
Best,
Jim Jones
University of M????????nster
Germany
[[alternative HTML version deleted]]