On Fri, 10 Nov 2006, toofah wrote:
I am somewhat new to sqlite and am a novice at setting up databases for a product, so here goes:
Gary, This is a good learning situation. Lots of useful information on the web site: <http://www.sqlite.org/>.
What are the Advantages/Disadvantages to using TEXT vs. BLOB to store and access data in sqlite...or are they pretty equal. Most of my data is string data...but for some reason the previous developer chose to use BLOB for everything...I am trying to determine if there are performance reasons or other reasons to make changes and use TEXT where appropriate...or if they will perform just the same for my needs.
The former developer was either ignorant or lazy. There are big differences between TEXT and BLOB. As the web page documents <http://www.sqlite.org/datatype3.html>: TEXT. The value is a text string, stored using the database encoding (UTF-8, UTF-16BE or UTF-16-LE). BLOB. The value is a blob of data, stored exactly as it was input. A BLOB is a Binary Large OBject; it can be a PDF file, a digital image, sound, or anything else. BLOBs cannot be searched, compared, or manipulated. You want TEXT for your string data. And don't forget NULL, INTEGER, and REAL for when they are most appropriate. It may take you a while to change the blobs to text or a numeric type, but it's worth the effort. HTH, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------