Welcome Guest, Not a member yet? Register   Sign In
Maintaining cities & countries database
#1

[eluser]charlieD[/eluser]
I've downloaded a list of cities and countries that I'll be using in an application I'm developing. It comes in a TXT format (basically a tab separated file), and I've imported this into MySQL.

The CC_FIPS (country code, e.g. 'UK', 'US') column is the unique identifier for countries, and it's also used to relate the city to the country.

There are about 2.2 million cities listed and 267 countries.

My question is whether it's worth adding a numeric primary key/index for cities and countries, and using this as the relation between cities and countries. I'm sure it must be more efficient, does anyone know by how much?

Also, is there an easy automated way to do this, particularly considering the situation where if the database is updated, I'll need to integrate these results. If I don't change the data, I'll be able to easily overwrite it with any updates that come through.


Messages In This Thread
Maintaining cities & countries database - by El Forum - 07-29-2008, 01:56 PM
Maintaining cities & countries database - by El Forum - 07-29-2008, 04:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB