BLOB question
Date: Tue, 10 Oct 2000 21:11:54 GMT
Message-ID: <8s00mj$ppl$1_at_nnrp1.deja.com>
[Quoted] 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 - 23:11:54 CEST