[R] RMySQL and Blob

jonathan_li@agilent.com jonathan_li at agilent.com
Wed Sep 22 18:08:26 CEST 2004


Hi David,

The application I have in mind is for images. In my case, size of images is known and they are not big. As an example, a 64*32 image will have 2048 pixels. If they are 8-bit grey-level pixels, the image occupies 2KB memory. 

I may venture to guess that the unknown size and type of a blob object in MySQL prevent it from being very usable in R since R doesn't have a datatype for a binary blob?

Thanks!
Jonathan


-----Original Message-----
From: David James [mailto:dj at research.bell-labs.com]
Sent: Wednesday, September 22, 2004 7:05 AM
To: LI,JONATHAN (A-Labs,ex1)
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] RMySQL and Blob


Hi Jonathan,

Currently RMySQL doesn't handle blob objects.  The mechanics of
inserting and extracting blob objects by itself is not too hard,
but issues such as how should blobs be made available to R, how to
prevent buffers overflows, how to prevent huge blobs from exhausting
the available memory, should R callback functions be invoked
as chunks of the blob are brought in, etc., need more consideration.
And these issues are not R/MySQL specific, but also relevant to
other databases and other non-dbms interfaces.

BTW there are R facilities (e.g., external pointers, finalizers) that 
seems quite important for this type of implementation.  

What type and how big are the blobs that want to import?

--
David

jonathan_li at agilent.com wrote:
> Dear R experts,
> 
> Does RMySQL package handle Blob datatype in a MySQL database? Blob can represent an image, a sound or some other 
> large and complex binary objects. In an article published by R-database special interest group, named "A common database interface (DBI)" (updated June 2003),  it's mentioned in "open issues and limitations" that "We need to carefully plan how to deal with binary objects". 
> 
> Before I invest time to try, I would appreciate any experts' opinions.
> 
> Thanks,
> Jonathan
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list