Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> BLOB question

BLOB question

From: <marciat_at_my-deja.com>
Date: Tue, 10 Oct 2000 21:11:54 GMT
Message-ID: <8s00mj$ppl$1@nnrp1.deja.com>

I have two scenario's and am curious if anyone has strong feelings about one approach over the other.

I need to store a blob in a database, and could potentially be adding 30,000 or more each day to the table that holds them. I would like to keep a history of edits to this blob also so a table of the following design is one approach:

table Object_Blob

  object_id          integer                (primary key)(foriegn key)
  user_id             integer                (primary key)(foriegn key)
  object_date     date/time            (primary key)
  object               blob


Another approach follows the theory that any table with a blob should only contain the blob and a single field as a key, such as:

table Object_blob

   blob_id         integer               (primary key)
   object           blob

table  Object_blob_reference
  object_id          integer                (primary key)(foriegn key)
  user_id             integer                (primary key)(foriegn key)
  object_date     date/time            (primary key)
  blob_id             integer

In the first approach, with all the fields with the exception of the blob being the primary key, the RDBMS should consider that a single field. With the right secondary indexes I should be able to go where I want in the table correct? Would there be any extra performance gains with respect to locating the blob by following the second approach over the first?

Thanks to all in advance

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Oct 10 2000 - 16:11:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US