• Your shopping cart is empty!
World Major Cities Database

World Major Cities Database

Drop Down List Source Codes Inclusive

$399.95 per year

Latest release: March, 2024

GeoDataSource™ World Major Cities is a database of worldwide major cities that suitable for any applications requiring a comprehensive list of country code and name, region/state/province name, city name, latitude, longitude and ZIP code. Most major cities in the world are included in this database in TSV (tab separated values) format, and can be easily access or load into a relational database for lookup.

This database enables a web developer to easily implement drop down lists, or any other solutions, that requires the list of countries, states and cities. Sample codes written in ASP, .NET and PHP are provided in the package to generate city names drop down list by countries and states. The sample codes enable a developer to rapidly deploy and utilize this package. Developer can apply this data for other purposes such as data validation, auto form filling and etcs.

Advantages

  • Updated Monthly
  • Most Accurate and Up-to-Date Source of Data
  • Sample Codes of Drop Down List in Several Programming Languages
  • Covers Major Cities to Simplify Data Processing
  • Instant Download Upon Subscription
  • Free Customer Support
  • Many Happy Customers

Requirements

  • Internet connection capable of downloading 954.21 kB compressed ZIP data file
  • 954.21 kB free disk space for compressed file
  • 3.73 MB free disk space for uncompressed data files
  • WinZIP or other similar archive extraction utility
  • SQL Server, Oracle, MySQL, PostgreSQL or other database software application capable of importing database records from a standard tab-delimited ASCII text file and sufficient disk space to import the database

Specifications

Field Name Description Type Length
country_code ISO 3166 Primary Country Code. A two alphabetic character ISO 3166 Primary Country Code uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty). character 2
country_name ISO 3166 Primary Country Name. The full name of ISO 3166 Primary Country Name uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty). character 200
region_name Region/State Full Name. The full name is a complete region name which identifies the first-order administrative division. It is comprised of the specific name, generic name, and any articles or prepositions. character 200
city_name City Full Name. The full name is a complete city name which identifies the named feature. It is comprised of the specific name, generic name, and any articles or prepositions. character 200
latitude Latitude in Decimal Degree. Latitude of the city in ± decimal degrees (WGS84).

no sign (+) = North;
negative sign (-) = South.
float 10
longitude Longitude in Decimal Degree. Longitude of the city in ± decimal degrees (WGS84).

no sign (+) = East;
negative sign (-) = West.
float 10
zip_code City ZIP Code. ZIP/Postal code of the city. character 50

Total Cities Breakdown By Country

Country Name Number of Cities
Afghanistan 55
Aland Islands 24
Albania 20
Algeria 249
American Samoa 2
Show More »

SQL Statement
DROP DATABASE IF EXISTS `world_major_city_db`;

CREATE DATABASE `world_major_city_db`;

DROP TABLE IF EXISTS `world_major_city_db`.`countrystatecity`;

-- Create table "countrystatecity"
CREATE TABLE `countrystatecity` (
  `country_code` varchar(2),
  `country_name` varchar(64),
  `region_name` varchar(128),
  `city_name` varchar(128),
  `latitude` float,
  `longitude` float,
  `zip_code` varchar(50),
  PRIMARY KEY (`country_code`,`region_name`,`city_name`)
) CHARSET=utf8 COLLATE=utf8_bin;

-- Load data into table
LOAD DATA LOCAL INFILE 'C:\\[your folder path to the data file]\\GEODATASOURCE-WORLD-MAJOR-CITIES.TXT'
INTO TABLE `world_major_city_db`.`countrystatecity`
CHARACTER SET utf8
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n';
CREATE DATABASE [world_major_city_db]
GO

USE [world_major_city_db]
GO

-- Create table "countrystatecity"
CREATE TABLE [world_major_city_db].[dbo].[countrystatecity](
	[country_code] nvarchar(2) NOT NULL,
	[country_name] nvarchar(200) NOT NULL,
	[region_name] nvarchar(200) NOT NULL,
	[city_name] nvarchar(200) NOT NULL,
	[latitude] float NOT NULL,
	[longitude] float NOT NULL,
	[zip_code] nvarchar(200) NOT NULL
) ON [PRIMARY]
GO

-- Load data into table
BULK INSERT [world_major_city_db].[dbo].[countrystatecity]
FROM 'C:\[your folder path to the data file]\GEODATASOURCE-WORLD-MAJOR-CITIES.TXT' 
WITH 
( 
	CODEPAGE = '65001',
	FIELDTERMINATOR = '\t', 
	ROWTERMINATOR = '\n'
)
GO
Demo
Note: For demo, only first 5 characters of the city names will be shown.
Country-Region Dropdown Menu

Free dropdown menu javascript allowing you to implement the country and region dropdown selection with ease. Learn more at Country-Region Dropdown Menu (Free)

Licensing

Single Server License

All prices mentioned in this page are for "Single Server License" unless specified otherwise. "Single Server License" can be used for 1 database server in a commercial environment with single or multiple connected clients.