db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Murphy <jim.mur...@pobox.com>
Subject Re: Copy varchars from table A to Blobs in Table b?
Date Mon, 14 Jan 2008 17:00:26 GMT

They do need to be blobs becasue I've always had trouble with blobs and the
fact that I support 5 DBs via hibernate I chose to structure all of my
"blob" usable via a blob table.  Anyone who uses blobs uses this
"binarydata" table that includes the blob as well as other metadata like,
length, encoding if its a string and media type id etc..  

That way I isolate blob related goo in one spot and can make that work for
all the db flavors etc without having my team trickle blobs and clobs
everywhere - which as silly as it sounds - ends up creating more hassle. 
Its offly simple for us to add a BinaryData Java clas dependency and get
blobby functionality for free.  

So thats why they need to be blobs.  Because for my app everything thats
stream oriented is.


Kristian Waagan-4 wrote:
> Jim Murphy wrote:
>> I can't seem to convert/cast from plain old varchars to blobs.  
>> I have a table of biggish varshars that in a new DB schema are now
>> modeled
>> as blobs.  In writing the conversion script I can't figure a way to
>> select
>> varchars from one tabel and insert them into the other.
>> Any ideas?
> Do you have a special requirement in your application, since a Blob 
> column is chosen over a Clob column to hold the VARCHAR data?
> If you can use a Clob column, I think the conversion problem might just 
> go away.
> regards,
> -- 
> Kristian
>> Thanks
>> Jim

View this message in context: http://www.nabble.com/Copy-varchars-from-table-A-to-Blobs-in-Table-b--tp14778877p14805917.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message