Want to design country, currency, timezone table for mysql database? -
am working on international project, , want design 3 major tables structure required in project:
- country table (contains
country_name
,iso_code
,calling_codes
) - currency table (contains
currency_name
,currency_code
) - timezone table (contains
gmt_coordinates
,gmt_fullname
like:-10.0
(gmt-10:00)-hawaii
)
am confused tables data-types structure. searched & google it, many confused answers , different structure.
so, please suggest proper table structure appropriate fields data-types, appreciates suggestion , answers.
advance mates!
there surprises when working currencies , time zones every country in world. on geonames , data, idea of expect.
from experience geonames data, need following fields:
country info
- country name - varchar(50)
- iso code - char(2)
- calling code - integer(4)
currency
- code - char(3)
- name - varchar(10)
with data in geonames database, these data fields , respective sizes should cover every country in world. haven't made actual model or links haven't specified language working with. i'm not sure appropriate length time zone string should be, guess need up.
if need populate tables countries, geonames thing.
country name, iso codes, calling code , currencies: http://download.geonames.org/export/dump/countryinfo.txt
time zones bit more tricky, many countries have several time zones. data there, have iterate data set find different time zones per country.
geonames' data dumps: http://download.geonames.org/export/dump/
here forum thread importing geonames data mysql database: http://forum.geonames.org/gforum/posts/list/15/732.page
Comments
Post a Comment