On Sat, 09 May 2015 06:09:41 -0400 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? > > 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? > > Example table: > > ModelNo TEXT (e.g. SO-239) > SerialNo TEXT (e.g. 101) > VSWR BLOB (e.g. x'feab12c...') > VSWR_Type TEXT (e.g. double) > > > Does this make sense? You can use SQL comments on CREATE TABLE, those comments aren't deleted from SQLITE_MASTER table, you can query it as a normal table. CREATE TABLE blob_table ( ModelNo TEXT, -- e.g. S0-239 SerialNo TEXT, -- e.g. 101 VSWR BLOB -- double, e.g. x'feab12c....' ); SELECT sql from sqlite_master where type='table' AND tbl_name='blob_table'; will return CREATE TABLE blob_table ( ModelNo TEXT, -- e.g. S0-239 SerialNo TEXT, -- e.g. 101 VSWR BLOB -- double, e.g. x'feab12c....' ) (Note that ';' is deleted) I check it in Firefox Sqlite3 Manager extension. > Thanks, > -Bill --- --- Eduardo Morras <emorrasg at yahoo.es>