Hi,
If you're (like myself, until yesterday) looking for a countries/states/cities database, check out that site:
http://dataservices.assemblysys.com/
They have very comprehensive databases and even one with the weather.com codes. After looking for weeks without finding anything ready-made (and it's a pain in the *** truing to build one, because it take A LOTof time (yes, I've tried that...)), I got that one yesterday. I use it with xoapWeather, so I can offer targetted weather to my registered users (in conjunction with the location they give me during the signup process).
Hope that helps.
Mike