Description
Details
Structure
Details
The file "world-city-database-regions.sql" should be run first in order to create the tables and all entries but the cities. Subsequently run "us-canada-cities.sql" script to create the entries in CITIES table. The first script will create 4 tables namely CONTINENTS, COUNTRIES, REGIONS and CITIES. If you want you can just create CITIES table (as you are interested in only US and CANADA cities you may not need all the country and region names) and delete all other table definitions but remember that CITIES table use country codes and region codes that are defined in COUNTRIES and REGIONS table. Also, if you keep these extra table definitions in your database you will be able to extend your database in future with records of other countries and cities available from this site. Definitions of all the tables are described below:
Fields in the Table CITIES:
- CityID: City identification number
- ISO2: Two character ISO country code
- RC: Two character region code
- City: Name of the city
- AccentCity: Accented name of the city
- Latitude: Latitude of the city
- Longitude: Longitude of the city
Fields in the Table CONTINENTS:
There is a single field named [Continent] in this table. Actually the table contains name of the continents as well some mapping reference zones. The full list of the continents or zones is:- Africa
- Antarctic Region
- Arctic Region
- Asia
- Central America and the Caribbean
- Commonwealth of Independent States
- Europe
- Middle East
- North America
- Oceania
- South America
- South East Asia
- World Others
Fields in the Table COUNTRIES:
- ISO2: Two character ISO country code
- FIPS104: Two character FIPS country code
- ISO3: Three character ISO country code
- ISON: Numeric ISO country code
- TLD: Top level Internet domain name for the country
- Country: Name of the country
- Continent: Continent or reference zone
- Capital: Capital of the country
- NationalitySingular: Nationality (singular form)
- NationalityPlural: Nationality (plural form)
- Currency: Currency of the country
- CurrencyCode: Three character currency code
- Population: Population of the country
Fields in the Table REGIONS:
- ISO2: Two character ISO country code
- RC: Two character region code
- Region: Name of the region of the country
The corresponding SQL command, for example, in the dump file to create CITIES table is:
CREATE TABLE `Cities` ( `CityID` INTEGER NOT NULL, `ISO2` VARCHAR(2), `RC` VARCHAR(2), `City` VARCHAR(100), `AccentCity` VARCHAR(100), `Latitude` DOUBLE NULL, `Longitude` DOUBLE NULL, PRIMARY KEY (`CityID`) ) ENGINE=innodb DEFAULT CHARSET=utf8;
Others
Additional Information
File Format | CSV File, MySQL Script |
---|---|
Format Details |
The package contains data in two formats: as SQL dump files and as CSV files. SQL Dump files are script files that can be readily executed from a SQL query tool such as MySQL query browser. The script will create required tables and populate with cities data. CSV files are comma delimited text files that can be readily imported in Microsoft Access or MS Excel. Although Excel 2003 has limitation regarding number of records in one worksheet (65,535) you can split the CSV files into 3 parts and import into 3 excel worksheets. However, Excel 2007 or 2010 is able to import the CSV file in one go. Additional format such as TAB delimited text file, Microsoft Excel or Microsoft Access database is available on request. A small fee for data conversion may be applicable. Please send your request to [email protected] |
Keywords | city, database, latitude, longitude, usa, canada, cities, names, list, lat, long, us |
Key Phrases | city database, usa latitude longitude, database city, city latitude longitude, cities latitude longitude, names of us cities, canada city names, canada city list, lat and long, long and lat, latitude and longitude, canada latitude longitude, us and canada |
Specific Terms and Condition | Unauthorized copying, distribution and use of this database product is strictly prohibited. You can purchase and download this product only from www.eBusinessGems.com. This product is for your personal use only and you cannot resell or distribute it in its original form and content. However you may use this database in your own web site or application and sell the resulting product or service. Thank you. |
Sample
Details
CityID |
ISO2 |
RC |
City |
AccentCity |
Latitude |
Longitude |
2639795 |
US |
PR |
columbia |
Columbia |
18.0063889 |
-65.9069444 |
2639796 |
US |
PR |
combate |
Combate |
18.4316667 |
-66.4313889 |
2639797 |
US |
PR |
comerio |
Comerio |
18.22 |
-66.2263889 |
2639798 |
US |
PR |
cometa |
Cometa |
18.1447222 |
-65.8291667 |
2639799 |
US |
PR |
comunas |
Comunas |
18.0891667 |
-65.8441667 |
2639800 |
US |
PR |
concordia |
Concordia |
17.9816667 |
-66.0372222 |
2639801 |
US |
PR |
condado |
Condado |
18.4563889 |
-66.0711111 |