ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] Mysql BLOB strangeness?
by Brian Gustin other posts by this author
Mar 17 2006 8:46AM messages near this date
Re: [Tutor] Mysql BLOB strangeness? | Re: [Tutor] Mysql BLOB strangeness?
if the data is not binary, you can use TEXT type - accepts all readable 
characters and data, BLOB type is more for binary data storage, and 
MYSQL's Varchar type only stores up to 255 characters. (65,536 bits, or 
64Kbits)

If you are storing Binary data (DES-3 encrypted data, or image data, for 
example (a silly idea, IMHO, but some people store image data in 
databases), then you would use BLOB, but I prefer to use TEXT type for 
plain ol' storage of text or characters (say an html page or template, 
etc) rather than the binary BLOB type, although BLOB would be a space 
savings if the data will be quite large, and you will have many rows)

HTH
Bri!


Kent Johnson wrote:
>  Adam Cripps wrote:
>  
> >On 3/17/06, Kent Johnson <kent37@[...].net> wrote:
> >
> >>Why are you using a BLOB when the content is text?
> >
> >I'm using BLOB because I want them to be able to write content that is
> >longer than 255 chars.
>  
>  
>  I'm no MySQL expert but the docs say VARCHAR fields can be up to 65,535 
>  chars.
>  
>  Kent
>  
>  _______________________________________________
>  Tutor maillist  -  Tutor@[...].org
>  http://mail.python.org/mailman/listinfo/tutor
>  
>  !DSPAM:441acc98175353568816312!
>  
>  
_______________________________________________
Tutor maillist  -  Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Adam Cripps
Brian Gustin
Adam Cripps
Brian Gustin
Adam Cripps
Kent Johnson
Brian Gustin
Adam Cripps
Kent Johnson
Adam Cripps
Liam Clarke
Brian Gustin
Adam Cripps
Hugo González Monteverde

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved