Unix Technical Forum

how to know contents of blob column

This is a discussion on how to know contents of blob column within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi, I have a table containing blob column. There are some records in the table and the blob column ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 10:07 AM
milindsj@gmail.com
 
Posts: n/a
Default how to know contents of blob column

Hi,
I have a table containing blob column.
There are some records in the table and the blob column contains .jpg,
..gif, .doc files.
I dont have filename stored in database which have the extension.
When I take the blob column throug java, how do I know whether the
respective blob is a gif file or jpg file or some other file.
Please let me know if you have any idea.

Milind

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 10:07 AM
milindsj@gmail.com
 
Posts: n/a
Default Re: how to know contents of blob column

Thanks alot,
But we dont have interMedia.
Is there any other way to find out what is the type present in blob
(jpg, xls, gif, png etc)??

Milind

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 10:07 AM
Vladimir M. Zakharychev
 
Posts: n/a
Default Re: how to know contents of blob column

Well, you may try to employ signature checks (the same
way mod_mime_magic Apache module does) - use a
list of known file format signatures, compare them to the
first few bytes of the LOB to detect file format.

Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com

<milindsj@gmail.com> wrote in message news:1143789838.448325.125190@u72g2000cwu.googlegr oups.com...

> Thanks alot,
> But we dont have interMedia.
> Is there any other way to find out what is the type present in blob
> (jpg, xls, gif, png etc)??
>
> Milind
>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 10:08 AM
Frank van Bortel
 
Posts: n/a
Default Re: how to know contents of blob column

milindsj@gmail.com wrote:
> Thanks alot,
> But we dont have interMedia.
> Is there any other way to find out what is the type present in blob
> (jpg, xls, gif, png etc)??
>
> Milind
>

Or rethink your design, and *store* the mime type

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 10:08 AM
DA Morgan
 
Posts: n/a
Default Re: how to know contents of blob column

milindsj@gmail.com wrote:
> Thanks alot,
> But we dont have interMedia.
> Is there any other way to find out what is the type present in blob
> (jpg, xls, gif, png etc)??
>
> Milind


Why don't you think you have interMedia?

Q: Do I have to buy a separate option or license to do it?
No. Oracle10g includes a component called interMedia that makes it
possible to manage digital media. interMedia is a component of the
Oracle Database and is included in Oracle Database licensing.

Source:
http://www.oracle.com/technology/pro...media_faq.html
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 10:08 AM
HansF
 
Posts: n/a
Default Re: how to know contents of blob column

On Thu, 30 Mar 2006 23:23:58 -0800, milindsj wrote:

> Thanks alot,
> But we dont have interMedia.
> Is there any other way to find out what is the type present in blob
> (jpg, xls, gif, png etc)??


interMedia is included in the Standard and Enterprise editions of the
database (since 8.0) at no additional charge.

You say you have no interMedia ... Have you removed interMedia from the
database?

--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** Top posting [replies] guarantees I won't respond. ***

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-08-2008, 10:08 AM
steve
 
Posts: n/a
Default Re: how to know contents of blob column

On Fri, 31 Mar 2006 23:07:57 +0800, Frank van Bortel wrote
(in article <e0jfql$a6m$5@news6.zwoll1.ov.home.nl>):

> milindsj@gmail.com wrote:
>> Thanks alot,
>> But we dont have interMedia.
>> Is there any other way to find out what is the type present in blob
>> (jpg, xls, gif, png etc)??
>>
>> Milind
>>

> Or rethink your design, and *store* the mime type
>
>


Intermedia is not a solution in this situation. you still must store the
Extension/mime type.

steve


--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-08-2008, 10:08 AM
HansF
 
Posts: n/a
Default Re: how to know contents of blob column

On Sat, 01 Apr 2006 18:19:06 +0800, steve wrote:

>
> Intermedia is not a solution in this situation. you still must store the
> Extension/mime type.
>


Please explain - why will the interMedia getMimeType( ) not work in this
case?

http://download-east.oracle.com/docs...f.htm#sthref81

--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** Top posting [replies] guarantees I won't respond. ***

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com