Subject Re: saving email and its attachments to a BLOB field
Author mikcaau
--- In firebird-support@yahoogroups.com, "innoy1k" <duncan.chen@t...>
wrote:
> Hi there,
>
> I am writing a Delphi desktop application that requires to save
> incoming/outgoing MSOutlook emails with all sorts of attachments. I
> have 2 options to do this:
>
> 1) one is to save email in a blob field of the Firebird database.
> 2) save email as .msg file, but keep the directory path in the database.
>
> For option 1), my concerns is the capacity, compatibility and
> reliability of the BLOB field. What is the size limit of a blob field,
> and can it store all different kind of attachments from emails, like
> pictures and video clips? Is there performance issue when retrieving
> an email with large attachments?
>
> Is there option 3)?
>
> thanks & regards,
> Duncan Chen

Put a maxsize VarChar field in your table.
Compress email before saving it.
If compressed size < VarChar field size (~32k) then save into varchar
field, else save to blob.
Note that blobs are not compressed during backup

That's my theoretical 2c worth
mick