Save into a blob.

here is a C example http://www.sqlite.org/cvstrac/wiki?p=BlobExample

On 23/02/07, Stef Mientki <[EMAIL PROTECTED]> wrote:
hello,

I've started with SQLite, because it's one of the first dbases with a
local filessytem without authenciation.
It looks great, compared to ini-files.

Now I've a basic problem:
I've a table, with 10 simple fields and 1 blob field, containing a
(possibly large) image.
Uptill now the dbase is small so no performance problems yet.
But what if it grows ?

I want to look at the table in a table overview,
where the blob-field just displays the type of image
(identified by the fisrt 2 bytes SOI-code).

When I ask for the table through a query,
I get all the blob-filed information, while I only need the first 2 bytes,
and only the full picture of 1 selected record.

I can think of several solutions, but as my experience with databases is
almost zero, I can't decide
(and maybe I'm overlooking some better solutions)
solution 1:
add a extra field for each blob field, filled with the first 2 bytes of
a blob
solution 2:
put the blob fields in a separate table, with a link to the main table

any suggestions would be appreciated.
thanks,
Stef Mientki

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




--
Cesar Rodas
http://www.sf.net/projects/pagerank (The PageRank made easy...)
http://www.sf.net/projects/fastfs ( The Fast File System)
Mobile Phone: 595 961 974165
Phone: 595 21 645590
[EMAIL PROTECTED]
[EMAIL PROTECTED]

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to