If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Fixed size binary filed?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-06, 09:49
mythix mythix is offline
Registered User
 
Join Date: Jun 2002
Posts: 63
Fixed size binary filed?

Hi,

I'm looking to store permissions in a table in MySQL. I was thinking of using somthing similar to Linux permissions, i.e. a binary representation. The size of the field will obviously be minimal, 8bits ish...

Whats the best way of storing this data? The blob type fields look a little overkill, or do they 'shrink to fit' like Levis... lol.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-12-06, 10:41
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
don't mess around, disk space is not as expensive as it used to be back in the mainframe days

use TINYINT for 0/1 values
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-12-06, 11:41
mythix mythix is offline
Registered User
 
Join Date: Jun 2002
Posts: 63
but i like messing around it's fun lol.

I;m gonna have to ask, you seem to answer every1s questions here, do you ever sleep? or is your brain wired to the web? lol

Thanks for continued input and general all round helpfulness!!!
Reply With Quote
  #4 (permalink)  
Old 10-12-06, 12:05
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
i sleep in between posts
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On