binary column type

2004-11-26 Thread Chenri J
What is 'binary' in column type stand for?
is it describe how the data is stored (in biner value)?
what do we want use it for?
- encryption ?
- space efficiency ?
- fast index ?
- or ?


I've searched the mysql manual but didn't find any clue about it
thanks for your help before.



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: binary column type

2004-11-26 Thread Alec . Cawley
Chenri J [EMAIL PROTECTED] wrote on 26/11/2004 10:52:51:

 What is 'binary' in column type stand for?
 is it describe how the data is stored (in biner value)?
 what do we want use it for?
 - encryption ?
 - space efficiency ?
 - fast index ?
 - or ?
 
 
 I've searched the mysql manual but didn't find any clue about it
 thanks for your help before.

BINARY is usually used on character columns to tell MySQL to do an 
case-dependent rather than case-independent indexing and selection. By 
default, character columns use case-independent ordering.

Alec


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: binary column type

2004-11-26 Thread Jigal van Hemert
 What is 'binary' in column type stand for?
 is it describe how the data is stored (in biner value)?
 what do we want use it for?
 - encryption ?
 - space efficiency ?
 - fast index ?
 - or ?

AFAIK it's used for determining the behaviour while comparing values
(operators, sorting, etc.).

Normally 'Garçon' (4th character is c-cedille) and 'garcon' are seen as
identical strings if the language collation settings are set accordingly.
Characters with accents are used in many languages depending on various
circumstances (compound words, plural/singular forms, etc.); so can come in
handy to take this into consideration while handling the data. Also
upper/lower case is ignored by default (since the letter case is often
depending upon the context in which the word is used).

You can use BINARY in a column type to indicate that sorting, indexing and
comparing should always be done without taking the above into consideration;
comparing is thus done as if it were binary data: byte by byte.
You can use BINARY in an operation to indicate that this case needs to be
handled as binary data.

I've used it in one table where I wanted each record to be
case/accent-dependent unique. Now MySQL considered 'WiNTer' as different
from 'winter', etc.

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: binary column type

2004-11-26 Thread Paul DuBois
At 2:52 -0800 11/26/04, Chenri J wrote:
What is 'binary' in column type stand for?
is it describe how the data is stored (in biner value)?
what do we want use it for?
- encryption ?
- space efficiency ?
- fast index ?
- or ?
I've searched the mysql manual but didn't find any clue about it
thanks for your help before.
http://dev.mysql.com/doc/mysql/en/BINARY_VARBINARY.html
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]