Database
World Cities Database
World Major Cities Database
Add-On
Web Service
World Cities Database Free Edition
FREE
Free database of worldwide cities in text format suitable for any applications requiring a comprehensive list of cities and country code. It is a subset of the paid edition of GeoDataSource World Cities Database Basic, Premium, Gold, Platinum, Titanium Edition.
Latest release: November, 2024
- Free and Updated Monthly
- Multiple Subscriptions Packages Available
- Most Accurate and Up-to-Date Source of Data
- Comprehensive List of Cities and Related Items (2,994,358 Entries)
- Support Worldwide 260+ Countries, Territories and Sovereign Lands
- Instant Download Upon Subscription
- Free Customer Support
- Many Happy Customers
- Internet connection capable of downloading 11.66 MB compressed ZIP data file
- 11.66 MB free disk space for compressed file
- 46.64 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 2,994,358 records from a standard tab-delimited ASCII text file and sufficient disk space to import the database
Field Name | Description | Type | Length |
---|---|---|---|
cc_fips | FIPS 10-4 Primary Country Code. A two alphabetic character FIPS 10-4 Primary Country Code uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty). | character | 2 |
cc_iso | 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 | 5 |
full_name_nd | Feature's No Diacritics Full Name. Same as the full name but the diacritics and special characters are substituted with Roman characters. | character | 200 |
-- Create table "world_cities_free"
CREATE TABLE `world_cities_free`(
`cc_fips` VARCHAR(2),
`cc_iso` VARCHAR(2),
`full_name_nd` VARCHAR(200),
INDEX `idx_cc_iso` (`cc_iso`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- Load data into table
LOAD DATA LOCAL
INFILE 'GEODATASOURCE-CITIES-FREE.TXT'
INTO TABLE `world_cities_free`
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;
-- Create table "country"
CREATE TABLE `country`(
`cc_fips` VARCHAR(2),
`cc_iso` VARCHAR(2),
`tld` VARCHAR(3),
`country_name` VARCHAR(100),
INDEX `idx_cc_fips`(`cc_fips`),
INDEX `idx_cc_iso`(`cc_iso`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- Load data into table "country"
LOAD DATA LOCAL
INFILE 'GEODATASOURCE-COUNTRY.TXT'
INTO TABLE `country`
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;
-- Create table "world_cities_free"
CREATE TABLE [geodatasource].[dbo].[world_cities_free](
[cc_fips] nvarchar(2) NOT NULL,
[cc_iso] nvarchar(2) NOT NULL,
[full_name_nd] nvarchar(200) NOT NULL
) ON [PRIMARY]
GO
CREATE INDEX [idx_cc_iso] ON [geodatasource].[dbo].[world_cities_free]([cc_iso]) ON [PRIMARY]
GO
-- Create table "country"
CREATE TABLE [geodatasource].[dbo].[country](
[cc_fips] nvarchar(2) NOT NULL,
[cc_iso] nvarchar(2) NOT NULL,
[tld] nvarchar(3) NOT NULL,
[country_name] nvarchar(100) NOT NULL,
) ON [PRIMARY]
GO
CREATE INDEX [idx_cc_fips] ON [geodatasource].[dbo].[country]([cc_fips]) ON [PRIMARY]
GO
CREATE INDEX [idx_cc_iso] ON [geodatasource].[dbo].[country]([cc_iso]) ON [PRIMARY]
GO