Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Pictures in BLOB field - strange behaviour
Tue, Mar 28 2006 8:14 AMPermanent Link

John Rock
I am using devexpress cxDbImage component to edit pictures in a Dbisam blob field. The blob file size (inventory.blb) grows when a
new picture data assigned into an empty blob field. But, it's size does not change upon clearing pictures from the blob field.

My questions are:

1. What is the recommended data type for pictures (can be any type: bmp,jpg .. etc) in Dbisam (graphic or blob)?
2. What is the best way to compact blob file size, after clearing pictures?
3. Is devexpress cxDbImage component compatible with DBISAM? Or, is it best to do the job programmatically?

John
Tue, Mar 28 2006 8:50 AMPermanent Link

"Walter Matte"
John:

This is 'normal' behaviour for any database.  As you can imagine, once you
get several pictures or whatever in blob fields into a db, if you delete one
and then compact each time the preformance would drop to snails pace.

Use the OptimizeTable method to remove any empty space in a table.  You need
to think about how often this type of data is being removed and how or it
affects disk space.  The retrieval time whether there are lots of blob's or
few should not change much if proper indexing of the table has been done.

See:

http://www.elevatesoft.com/dbisam4d7_optimizing_tables.htm

Also DBISAM will reuse space when new records are added.    Maybe some one
could comment on if this reuse of free space also is done with *.blb's.


1. Recommended... I use blob.
2. Best way  to compact - OptimizeTable - frequence depends on
application... 1 every 6 months , a year, never....
3. cxDBImage should work as long as it support the Graphic Image type you
are storing.

Walter


"John Rock" <teknikbil@gmail.com> wrote in message
news:BC80D85B-1034-4F39-BA4D-D63CFEDC8712@news.elevatesoft.com...
>I am using devexpress cxDbImage component to edit pictures in a Dbisam blob
>field. The blob file size (inventory.blb) grows when a
> new picture data assigned into an empty blob field. But, it's size does
> not change upon clearing pictures from the blob field.
>
> My questions are:
>
> 1. What is the recommended data type for pictures (can be any type:
> bmp,jpg .. etc) in Dbisam (graphic or blob)?
> 2. What is the best way to compact blob file size, after clearing
> pictures?
> 3. Is devexpress cxDbImage component compatible with DBISAM? Or, is it
> best to do the job programmatically?
>
> John
>

Tue, Mar 28 2006 8:54 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

>1. What is the recommended data type for pictures (can be any type: bmp,jpg .. etc) in Dbisam (graphic or blob)?

As far as I know any of the formats will be OK - I tend to use ftMemo

>2. What is the best way to compact blob file size, after clearing pictures?

You'll need to optimise the table. DBISAM doesn't remove the used space, but will reuse it if you add more later (just like the .dat file). SO if its getting to big optimise it otherwise just ignore it.

>3. Is devexpress cxDbImage component compatible with DBISAM? Or, is it best to do the job programmatically?

No idea - I don't have DevEx

Roy Lambert
Tue, Mar 28 2006 1:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< I am using devexpress cxDbImage component to edit pictures in a Dbisam
blob field. The blob file size (inventory.blb) grows when a
new picture data assigned into an empty blob field. But, it's size does not
change upon clearing pictures from the blob field. >>

As others have already indicated, this is normal.  DBISAM will re-use the
space when it needs it.

<< 1. What is the recommended data type for pictures (can be any type:
bmp,jpg .. etc) in Dbisam (graphic or blob)? >>

I would use a straight BLOB field if you're storing various graphic formats.

<< 2. What is the best way to compact blob file size, after clearing
pictures? >>

OptimizeTable will do the trick, but it requires exclusive access and will
be slow on a large table.  It really is intended to only be used
occasionally as a housekeeping method.

<< 3. Is devexpress cxDbImage component compatible with DBISAM? Or, is it
best to do the job programmatically? >>

The DevExpress component should be fine as long as it is compatible with the
TDataSet/TDataSource architecture, which I believe it is.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image