On 5/9/15, William Drago <wdrago at suffolk.lib.ny.us> wrote: > All, > > Say you encounter a blob in a database. There's no way to > tell if that blob carries bytes, floats, doubles, etc, correct?
As far as SQLite is concerned, a BLOB is just bytes. The interpretation of those bytes (as floats, doubles, a JPEG thumbnail, a file compressed with zlib, etc.) is entirely up to the application - SQLite does not know or care. > > Assuming the above is true, then is it always prudent to > store some metadata along with your blobs so that they can > be identified in the future? > I suppose that depends on the application. If the field always holds exactly the same thing (ex: a JPEG) then the metadata is not really needed. On the other hand, I have added a separate "mimetype" column to accompany BLOB fields in cases where the BLOB might be different things. -- D. Richard Hipp drh at sqlite.org