db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Binary data using Torque
Date Tue, 01 Nov 2005 15:12:40 GMT
Just curious... wouldn't you want to use a BLOB type for stuff like
this? Since it's variable and BINARY is fixed?  Either way, both should
work.

One issue with both types is that you have to read the file into memory
to store it since both type are set via a Java byte[] objects.  It might
be nice for blobs/clobs to support the java.sql.Blob/Clob interfaces in
some way.  Not sure how to work this Torque's current Village
underpinning though, but I haven't dug into it at all.

FWIW, I've always found that putting pictures into a DB is generally
causes more performance problems than any benefits gained.  Much easier
just to upload the file with a unique name to a resources directory and
then store the URL/reference info in the DB. But that's just a personal
view.

> -----Original Message-----
> From: Thomas Fischer [mailto:tfischer@apache.org] 
> 
> Yes, its possible. Postgresql has the bytea data type for 
> storing binary 
> data. Use the Torque type BINARY for it.
> 
>     Thomas
> 
> On Wed, 26 Oct 2005, Jakub Piechnik wrote:
> 
> > Hello
> >
> > I wonder if it's possible to handle binary data with Torque. I mean 
> > that for
> > example there is a picture file (gif) and I want to put it 
> in my database 
> > (Postgresql). Is it possible to do that using Torque and if 
> so - how should I 
> > try to use it
> >
> > Regards
> > Jakub Piechnik
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message