I have a site which more than 95% sales are for usa and canada. less than 5% are for other countries.
In ZenCart, it only has a countries list (a country table list all the countries, and in the address table there is a countries_id to link to the certain item from the country table), but the states/province fields are free input text field in ZenCart.
But we may want to put the USA's states or Canadian Provinces into a "state-province table" and in the address table, use state_id to refer to the certain state or province from that "state-province table" like we did for the countries in ZenCart. This way, when we can apply the sales tax to the different states, or apply differnet shipping cost to different states. Regular ZenCart doesn't have it.
So my design is
"Address" table will have the following fields
...
countries_id
state_province_id
state_province_name
So if you are from USA or Canada, you will be assigned a state_province_id (bigger than 1 integer) which refer to an item in "state_province table", in this case, state_province_name will be empty.
But if you are from other countries, then you will be assinged state_province_id as 1, and in the "state_province table" id 1 means you are not either from USA or Canada. And you will get your state/province name from the state_province_name field of the address table.
OK, that is the database design.
For the member registration form when the fill out the address. There are two approaches
1) list the countries drop down menu before the state/province field. If the user select usa or canada, the state/province will be a drop down menu list all the states/provinces. if the use select other countries, the state/province will be a text field. (this way is simple, but ask people to select the country before the state/province is kind not so professional.)
2) or state/province will be a drop down menu, with all the states and provinces, but with one additional selection, "other countries". If the user select one state or one province, then that is all, the countries id will be also set up. If the user select "other countries" it will show a free text field, let them input the name of the province from other countries. And then they will also have to select one name from the countries drop down menu in the next step. This is complicated, but the user will select state/province first before the select countries, more like American way.
Which way you want to use? Or if you have other suggestions?
The largest stores such as officedepot, homedepot, futureshop etc. they have the branches in each countries. So their .com or .ca only deal with the USA or Canada orders, so it is easy that they don't have to worry about have the countries list like ZenCart has too, they only have the states list.