[clug-progsig] Storing large bitwise values in MySQL

sgrover sgrover at open2space.com
Tue May 22 16:44:12 PDT 2007


Not tooo sure what you're looking for here.  Are you saying you have a 
select list with all the countries that you pick one from?  Or are you 
saying you need to store a value that represents one or more countries?

If the first case, this is a simple "countries" lookup table.  So I'm 
guessing that's not it.

If the second case, they it sounds like you need a country cross 
reference table (i.e. item - item/country - country).  Then your storage 
values become simple integers (or strings if that is how you stored your 
countries).

The moment you are considering storing more than one value in a single 
field, your tables probably need to be restructured to reflect this 
better.  Otherwise you are not using the database to handle the data 
anymore - you are instead using code to process the values.  If that's 
the case, why use a database when a simple file will do the same?  :)

But, I'm shooting a little blind here - I'd need more details of your 
situation to understand things right.. :)

HTH

Shawn

Nick Wiltshire wrote:
> Hi all,
> 
> this might not even be the correct way to go about it, but I need to store a 
> multiple-select value with the possible choices being the countries of the 
> world.
> 
> Should I use a BLOB, a _really_ big INT or go about it some completely 
> different way?
> 
> Nick
> 
> _______________________________________________
> clug-progsig mailing list
> clug-progsig at clug.ca
> http://clug.ca/mailman/listinfo/clug-progsig_clug.ca



More information about the clug-progsig mailing list