Hello, 

>Many thanks for your response.  Can yo u offer any advice with regards
usage
>of country_codes eg gb and regions, cities etc ?  I've been reading up on
>http://en.wikipedia.org/wiki/ISO_3166 etc.  Should I be looking to use a
>Surrogate key for countries ?  Or the country code like fr for France ?
>
>Same with regions/states and cities and districts ?

I do not think you need surrogate key for country. Country code is 2
letters, so if you use char(2) charset ASCII you only need 2 bytes for that.
That is ok and your queries would be easier to read.
You do not need surrogate keys for US states also but if you speak about
"states" in general you may need key (many countries over the world have
"states")
The same is about cities: city name is too big to be used as primary key,
and there may be many cities with similar names.

Ilya.




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

Reply via email to