List:General Discussion« Previous MessageNext Message »
From:Rhino Date:August 7 2004 3:41am
Subject:Re: What would you store in a BLOB field?
View as plain text  
I'm not sure if anyone has mentioned this - I only see part of this thread -
but music is something else you can store in a BLOB. As an experiment, I
stored a photograph (in JPEG format) and a music file (in MIDI format), each
in their own BLOB columns and then fetched them out again to display them on
a web page. This worked fine and is a technique I will use again in the
future.

Rhino

----- Original Message ----- 
From: "Daniel Lahey" <drlahey@stripped>
To: "mysql" <mysql@stripped>
Sent: Friday, August 06, 2004 11:03 PM
Subject: Re: What would you store in a BLOB field?


> Another use for binary columns is for case-sensitive text such as
> passwords.  If you store text in a CHAR, VARCHAR, or TEXT column,
> comparisons will not be case-sensitive unless you use the BINARY
> keyword.  An example (from section 6.3.22 of the Language Reference:
>
> mysql> SELECT "a" = "A";
> -> 1
> mysql> SELECT BINARY "a" = "A";
> -> 0
>
> On Aug 6, 2004, at 7:10 PM, Dan Nelson wrote:
>
> > In the last episode (Aug 06), Levi Campbell said:
> >> I know the blob field is binary but what would you store there? and
> >> if you could give me an example of real-life uses please.
> >
> > Say you want to have multiple remote webservers all serving the same
> > data.  Create a table with "filename", "mtime", and "content" fields
> > and replicate it to a mysql database on each server.  The "content"
> > field would be a blob.  You could also add custom HTML fields, like
> > Content-Type: and Expires:.
> >
> > You could have an employee table, with their photo in a blob field.
> >
> > You could implement your own full-text index by creating a table next
> > to a table of documents, with a "word" field, and a blob field
> > containing a compressed bitmap of documents containing that word.
> > Searches would be done by pulling the bitmaps for each search word and
> > AND/OR'ing them (I have done this; it works well).
> >
> > -- 
> > Dan Nelson
> > dnelson@stripped
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> > http://lists.mysql.com/mysql?unsub=1
> >
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

Thread
What would you store in a BLOB field?Levi Campbell7 Aug
  • Re: What would you store in a BLOB field?Dan Nelson7 Aug
    • Re: What would you store in a BLOB field?Daniel Lahey7 Aug
  • Re: What would you store in a BLOB field?Rhino7 Aug
  • Re: What would you store in a BLOB field?Rhino7 Aug
  • Re: What would you store in a BLOB field?Egor Egorov10 Aug
RE: What would you store in a BLOB field?Scott Hamm10 Aug
  • RE: What would you store in a BLOB field?SGreen10 Aug
RE: What would you store in a BLOB field?Scott Hamm10 Aug