GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Creating database using geonames dump  XML
Forum Index -> General
Author Message
mdhaman



Joined: 25/11/2009 06:28:19
Messages: 3
Offline

I am creating GeoNames database using database dump. I have gone thru quite a few post regarding using database dump as well. Our database is SQL SERVER 2005.

I want to confirm the format of Admin1 code, Admin2 code and feature code used in the dump files so that I can setup primary keys and foriegn keys in my database

Admin1 Code:
Format is :<CountryCode>.<Admin1Code>
CountryCode - is same as CountryCode field in the Geoname dump file and Iso Field in the CountryInfo.txt file
Admin1Code - this code is unique for a country


Admin2 Code:
Format:<CountryCode>.<Admin1Code>.<Admin2Code>
CountryCode - is same as CountryCode field in the Geoname table and Iso Field in the CountryInfo.txt file
Admin1Code - this code is unique for a country
Admin2Code - this code is unique for a Admin1Code



Are there any dump files for Admin3Code and Admin4Code?

marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

You don't need any dump files for adm codes. All information is included in the main dump file (including adm3 and adm4 codes).
If you want to use fk's for the admin codes you will first have to delete the orphaned codes. We have preferred to not deleted the orphaned codes as they still contain valuable information, even if it is obsolete and refers to a previous adm division, but as long as the new and correct adm code has not been determined we keep the old one as a reference.

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team