Am working on international project, and want design 3 major tables structure as required in my project:
- Country Table (contains all
country_name,iso_code,calling_codes) - Currency Table (contains all
currency_name,currency_code) - TimeZone Table (Contains all
GMT_coordinatesand itsGMT_fullnameLike:-10.0(GMT-10:00)-Hawaii)
Am confused with tables data-types structure. I searched & google it, but many confused answers and different structure.
So, Please Suggest a proper table structure with appropriate fields data-types, i will appreciates all your suggestion and answers.
Advance thanks to all my mates!
There are some surprises when working with currencies and time zones for every country in the world. I would look up on Geonames and their data, to get an idea of what to expect.
From experience with the Geonames data, you will need the following fields:
With the data in the Geonames database, these data fields and their respective sizes should cover every country in the world. I haven’t made the actual model or its links as you haven’t specified which language you are working with. I’m not sure what the appropriate length for the time zone string should be, I guess you need to look that up.
If you also need to populate the tables with all countries, Geonames is just the thing.
Country name, ISO codes, calling code and currencies: http://download.geonames.org/export/dump/countryInfo.txt
Time zones are a bit more tricky, as many countries have several time zones. The data is there, but you have to iterate the data set to find the different time zones per country.
Geonames’ data dumps:
http://download.geonames.org/export/dump/
Here is a forum thread about importing the Geonames data to a MySQL database:
http://forum.geonames.org/gforum/posts/list/15/732.page