On Wed, Jun 16, 2010 at 7:23 AM, Andreas Henningsson
<andreas.hennings...@gmail.com> wrote:
> Do some testing to find out if it suits the application you develop.
> But just in general .. file systems are build to handle files, databases are
> for handle data.
>

Well, at the risk of being pedantic, you say files I say data (sung to
the tune of "you say poe-tay-toe, I say poe-tah-toe"). What is within
the files is data after all. When storing a blob of, say, an image,
you are not storing the file; instead, you are storing those
bits-and-bytes that are reconstructed as an image by your image
viewer. To do so, you open your image file, you read in the contents,
and write them to the db blob column. Your file is gone... it is no
longer relevant. Now what you have is the data in your db.

But yes, my sense is (no firm, scientific tests backing this claim,
mind you), that storing very large binary objects in a db doesn't seem
efficient. Storing them on the file system while storing their
metadata in the db seems a lot more efficient. On the other hand, a
case could be made for storing blobs in the db when you have many,
many small binary objects, as in the case of image thumbnails.
Especially if the blobs are smaller than a page size, the db would
likely be extremely efficient.


> I don't think BLOB in SQlite will increasing the performance compared to
> store the files in
> the file system.
>
> Some SQlite APIs do not support BLOB very good. Also something to
> consider if you will store large files.
>
> /Andreas
>
> On Wed, Jun 16, 2010 at 1:31 PM, P Kishor <punk.k...@gmail.com> wrote:
>
>> for some reason, I remember you asking the same question not too long
>> ago, and getting a bunch of answers. I recall chipping in with an
>> answer myself. DIdn't any of those answers help?
>>
>> On Wed, Jun 16, 2010 at 1:58 AM, Navaneeth Sen B
>> <navanee...@tataelxsi.co.in> wrote:
>> > Hi All,
>> > I would like to know more about this BLOB support in SQLite. Some of my
>> > queries are:
>> >
>> >   1. One of my colleague suggested that using BLOB support for storing
>> >      images in the DB is a good idea, whereas storing AVCHD data(huge
>> >      size) as blobs is not a good idea. I need a bit more clarification
>> >      on this statement.
>>
>> What is the clarification you need? I remember writing that (in my
>> wisdom), it is better to store large binary objects such as big video,
>> audio or image files in the file system, and store the metadata for
>> them in the db. If you have many, many small items, storing them
>> directly as blobs in the sqlite should be very quick and helpful, but
>> other than that, storing them in the file system may be better. Did
>> you experiment with one or the other?
>>
>> >   2. I just want to know how does this BLOB support help in increasing
>> >      the performance?
>>
>> Don't know. Only you can tell, based on your usage scenario and your
>> performance expectations.
>>
>> >   3. What is the difference produced in storing the file inside DB(not
>> >      in blob format) and storing the same file in BLOB format in the DB?
>> >
>> >
>>
>> What do you mean by "What is the difference produced"? Which
>> difference and produced from what? If stored correctly, you will have
>> the same item in the db as would have been in the file system, so
>> which difference are you talking about? If you are talking about the
>> mechanism itself, well, we went through that earlier and above as
>> well... the db does all the homework for you regarding where to store
>> the files, even what to call them, if you implement that, etc. But, of
>> course, you can't access those files directly if they are in the db.
>> You have to get to them via the db only.
>>
>>
>> > --
>> >
>> > ____________________________________*
>> > Thanks & Regards
>> > SEN*
>> > /
>> > /////
>> >
>> >





-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to