<p dir="ltr">Kami's usage matches my own. Filesystem management of data can be a little involved, so a lot of people put that data in a blob. The other fields are there to provide as lookup and indexing information.</p>
<div class="gmail_quote">On Feb 2, 2015 2:45 PM, "Kami Vaniea" <<a href="mailto:kami.vaniea@gmail.com">kami.vaniea@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I occasionally use BLOBs in my work, though I tend to use MySQL over<br>
SQLite. For example, I once built a site that would do a kind of email<br>
based version repository. So you would email the system your doc file,<br>
and CC everybody who you wanted to view it. The system would then store<br>
the doc file, along with all future emailed doc files in one easily<br>
found place. Managing all that via the file system was annoying, and<br>
security problematic, so we threw the doc files into BLOBs. When the<br>
user wanted their file back the system would just read the contents of<br>
the BLOB back to them like it was a regular file.<br>
<br>
I've also done research projects where we automatically screen captured<br>
websites and needed to store the captures somewhere with a pile of<br>
metadata. So again, we used BLOBs. Other projects I've worked on needed<br>
to store binaries of various things. For example, web scraping projects<br>
that wanted to store the binaries of free apps so they could be analyzed<br>
in the future.<br>
<br>
I imagine BLOBs are also an excellent place to put things you don't want<br>
MySQL getting smart about. I've had way too many issues in the past with<br>
UTF8/16 text getting chewed up by either MySQL or whatever language I'm<br>
using. Putting data in a BLOB is a good way to flag "here be dragons" to<br>
the database so it doesn't try and index it or "improve" it in any way.<br>
<br>
I've never really tried reading the BLOB data directly from the DB.<br>
Normally I just use the DB the same way I would use the file system and<br>
code the application I'm writing to visualize whatever the binary is.<br>
<br>
- Kami<br>
<br>
<br>
On 02/02/2015 02:17 PM, Chick Tower wrote:<br>
> I've been doing a little research into SQLite, and they have a storage<br>
> class (they say it's slightly more general than a datatype) for binary<br>
> large objects (BLOB).  You can store photo images, or I suppose even<br>
> executables, in the database.  (I assume the same is true for other<br>
> databases.)  My question is why?  You can't view an image with SQLite.<br>
> How do you even get an image out of a database to view it?<br>
><br>
><br>
><br>
> Perhaps I'm wrong in the intended use of the BLOB storage class.  It<br>
> says on the SQLite website "The value is a blob of data, stored exactly<br>
> as it was input."  So maybe it's intended for something other than<br>
> images, but, if so, what?  I still wonder how you extract a BLOB from a<br>
> database in order to do anything with it.  Does anyone know what to do<br>
> with BLOBs?<br>
><br>
><br>
><br>
<br>
<br>
_______________________________________________<br>
linux-user mailing list<br>
<a href="mailto:linux-user@egr.msu.edu">linux-user@egr.msu.edu</a><br>
<a href="http://mailman.egr.msu.edu/mailman/listinfo/linux-user" target="_blank">http://mailman.egr.msu.edu/mailman/listinfo/linux-user</a><br>
</blockquote></div>