Data base design with Blob
        Posted  
        
            by mmuthu
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mmuthu
        
        
        
        Published on 2010-05-22T09:24:21Z
        Indexed on 
            2010/05/22
            9:30 UTC
        
        
        Read the original article
        Hit count: 191
        
Oracle
Hi, I have a situation where i need to store the binary data into database as blob column. There are three different table exists in my database where in i need to store a blob data for each record. Not every record will have the blob data all the time. It is time and user based.
The table one will have to store the *.doc files almost for all the record The table two will have to store the *.xml optionally. The table three will have to store images (not sure what is frequency, etc)
Now my questions is whether it is a good idea to maintain a separate table to store the blob data pointing it to the respective table PK's (Yes, there will be no FK's and assuming program will maintain it). It will be some thing like below,
BLOB|PK_ID|TABLE_NAME
Alternatively, is it a good idea to keep the blob column in respective tables.
As for as my application runtime is concerned,
The table 2 will be read very frequently. Though the blob column will not be required. The table 2 record will gets deleted frequently. Similarly other blob data in respective table will not be accessed frequently. All of the blob content will be read on-demand basis.
I'm thinking first approach will work better for me. What do you guys think?
Btw, I'm using Oracle.
© Stack Overflow or respective owner