BLOB fields
Bart Pietercil
bart.pietercil at cognosis.be
Mon May 5 06:56:06 CDT 2008
Hi JB,
looks like you need to define an extra table (a 1 to many table) where
you can store the pictures
ie: tbl_pictures. This will hold a reference (object pointer) to your
original table + a blob field for storing the picture(s)
Mind you this is a general rule and is the standard operation
procedure if you find yourself in the situation you just described
(maybe a wikipedia on 'normalization').
As you can see this resolves the problems for having zero, 1 or more
pictures pointing to a given record
On 04 May 2008, at 06:15, -= JB =- wrote:
> I am using Valentina with Revolution and have some questions
> about BLOB fields.
>
> When I add a new field to my table it adds the field for every
> record and every new record. So if I add a new field named
> 'State' every record has the field state.
>
> From what I understand about BLOB fields they do the same
> thing. So if I want to create a field with TEXT or PICTURE then
> I create the BLOB field and every record has one.
>
> The question concerns space management with BLOB fields.
> What if I have 200 records. Each record will use 1 TEXT field
> and at least one PICTURE field. The problem is some of the
> PICTURES will be maybe 33KB while others might be 256KB.
> And some records will have 1 or 2 PICTURES while others
> will have 5 or 10 PICTURES.
>
> It seems like a lot of wasted space if I allocate space for every
> record to have 10 PICTURES at the largest size when I don't
> need every record to have 10 PICTURES and they don't need
> to be the largest size either.
>
> What is the best way to manage BLOB fields where the amount
> and size of the PICTURES needed vary from record to record.
> Is there a way to make a BLOB for each record insted of making
> it for all of the records. Would it be better to have a link and then
> make a special table for each record or what is the best solution
> anyone would suggest to save as much space as possible.
>
> -=>JB<=-
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list