-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike McGonagle wrote: > From what I am understanding, I get the > impression that a Blob is no more than the binary data
Binary large object. Large is by comparison to other typical data in a database. For example numbers are typically up to 10 digits long and text strings range from a few characters and probably average out at ten to twenty characters. Blobs are typically much larger than that. You also can't use text functions to act on them (eg regular expressions, LIKE). > from a disk file, The origin of blob data is irrelevant. > stored as a string of bytes in a field of the database. SQLite stores blobs as a sequence of bytes in the database file. > Basically, I am trying to write some multimedia stuff, and as such, > was thinking that I need to write some "filters" that access specific > types of data (a wav file, or a MIDI file, or etc.). If this is the > case, it almost sounds like it would be better to store the filename > for the data, and then let the system take care of reading the > particular format of the data. Although SQLite does handle blobs fairly well, common practise is to do exactly as you say - store the filename in the database. Any blob you store in the database has a practical size limit of 1GB and a theoretical maximum of 2GB. Storing the items in the database directly is beneficial if the database has to be moved amongst machines since the other files don't have to be dragged along as well. If you want to hide from your database code what is really going on underneath the hood then I'd recommend using a virtual table. Your virtual tables can automagically make it look like the blob data is stored in the database but behind the scenes have it in separate files or in the database. Profiling will then tell you which is most performant for your application. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkl+aeUACgkQmOOfHg372QSXtwCgqgd5ZXtHIC8mJZgPCY1/VK6H bVkAnR2EgwbsxZD5gC44Dp3Wxm12oki2 =Nl/Y -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users