{"id":670,"date":"2021-12-13T00:00:00","date_gmt":"2021-12-13T00:00:00","guid":{"rendered":"https:\/\/wp3.geodatasource.com\/tutorials\/what-is-world-major-cities-database\/"},"modified":"2021-12-13T00:00:00","modified_gmt":"2021-12-13T00:00:00","password":"","slug":"what-is-world-major-cities-database","status":"publish","type":"docs","link":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/","title":{"rendered":"What is World Major Cities Database"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg\" alt=\"What is World Major Cities Database\" class=\"wp-image-344\" width=\"600\" height=\"300\" srcset=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg 1200w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-300x150.jpg 300w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-1024x512.jpg 1024w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-768x384.jpg 768w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-50x25.jpg 50w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-920x460.jpg 920w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-600x300.jpg 600w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article-320x160.jpg 320w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>A database is an organized collection of data or information that is set up and stored for easy access electronically in a computer system.<\/p>\n\n\n\n<p>GeoDataSource World Major Cities Database is a database that consists of the worldwide major cities that can be used in any applications that are requiring a comprehensive list of country code and country 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 accessed or loaded into a relational database for lookup.<\/p>\n\n\n\n<p>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, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Database Fields<\/h2>\n\n\n\n<p>The benefit of using the World Major Cities Database is that the data is updated monthly, ensuring the most accurate and up-to-date source of data. It also provides instant download upon subscription. Below are the database fields for <strong>World Major Cities Database<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Field name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>country_code<\/td><td><strong>ISO 3166 Primary Country Code<\/strong>. A two alphabetic character ISO 3166 Primary Country Code uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty).<\/td><\/tr><tr><td>country_name<\/td><td><strong>ISO 3166 Primary Country Name<\/strong>. The full name of ISO 3166 Primary Country Name uniquely identifying a geopolitical entity (countries, dependencies, and areas of special sovereignty).<\/td><\/tr><tr><td>region_name<\/td><td><strong>Region\/State Full Name<\/strong>. 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.<\/td><\/tr><tr><td>city_name<\/td><td><strong>City Full Name<\/strong>. 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.<\/td><\/tr><tr><td>&nbsp;latitude<\/td><td><strong>Latitude in Decimal Degree<\/strong>. Latitude of the city in \u00b1 decimal degrees (WGS84).<\/td><\/tr><tr><td>longitude<\/td><td><strong>Longitude in Decimal Degree<\/strong>. Longitude of the city in \u00b1 decimal degrees (WGS84).<\/td><\/tr><tr><td>zip_code<\/td><td><strong>City ZIP Code<\/strong>. ZIP\/Postal code of the city.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">&nbsp;Database table<\/h2>\n\n\n\n<p>In order to get the world major cities information, the <strong>World Major Cities Database <\/strong>table can be created and loaded by the following code in MySQL.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Create table \"countrystatecity\"\nCREATE TABLE `countrystatecity` (\n  `country_code` varchar(2),\n  `country_name` varchar(64),\n  `region_name` varchar(128),\n  `city_name` varchar(128),\n  `latitude` float,\n  `longitude` float,\n  `zip_code` varchar(50),\n  PRIMARY KEY (`country_code`,`region_name`,`city_name`)\n) CHARSET=utf8 COLLATE=utf8_bin;\n\n-- Load data into table\nLOAD DATA LOCAL INFILE 'GEODATASOURCE-WORLD-MAJOR-CITIES.TXT'\nINTO TABLE `countrystatecity`\nFIELDS TERMINATED BY 't'\nLINES TERMINATED BY 'rn';\n<\/code><\/pre>\n\n\n\n<p>For more details about the World Major Cities Database, you can visit <a href=\"https:\/\/www.geodatasource.com\/world-major-cities-database\">https:\/\/www.geodatasource.com\/world-major-cities-database<\/a> to learn more about the information provided.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A database is an organized collection of data or information that is set up and stored for easy access electronically [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[20],"doc_tag":[],"class_list":["post-670","docs","type-docs","status-publish","hentry","doc_category-general-topics"],"year_month":"2026-06","word_count":485,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"hexasoft","author_nicename":"hexasoft","author_url":"https:\/\/www.geodatasource.com\/resources\/author\/hexasoft\/"},"doc_category_info":[{"term_name":"General Topics","term_url":"https:\/\/www.geodatasource.com\/resources\/categories\/general-topics\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is World Major Cities Database |<\/title>\n<meta name=\"description\" content=\"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is World Major Cities Database |\" \/>\n<meta property=\"og:description\" content=\"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/geodatasource\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_geodatasource\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/\",\"name\":\"What is World Major Cities Database |\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/gds-dec-article.jpg\",\"datePublished\":\"2021-12-13T00:00:00+00:00\",\"description\":\"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/gds-dec-article.jpg\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/gds-dec-article.jpg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-world-major-cities-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is World Major Cities Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"name\":\"GeoDataSource Articles & Tutorials\",\"description\":\"Resources About GeoDataSource Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\",\"name\":\"GeoDataSource.com\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"width\":220,\"height\":27,\"caption\":\"GeoDataSource.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/geodatasource\\\/\",\"https:\\\/\\\/x.com\\\/_geodatasource\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is World Major Cities Database |","description":"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/","og_locale":"en_US","og_type":"article","og_title":"What is World Major Cities Database |","og_description":"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.","og_url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/","article_publisher":"https:\/\/www.facebook.com\/geodatasource\/","og_image":[{"url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@_geodatasource","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/","url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/","name":"What is World Major Cities Database |","isPartOf":{"@id":"https:\/\/www.geodatasource.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/#primaryimage"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg","datePublished":"2021-12-13T00:00:00+00:00","description":"This article shows the definition What is GeoDataSource World Major Cities Database. Read about it to learn more details.","breadcrumb":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/#primaryimage","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/12\/gds-dec-article.jpg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-world-major-cities-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.geodatasource.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/www.geodatasource.com\/resources\/tutorials\/"},{"@type":"ListItem","position":3,"name":"What is World Major Cities Database"}]},{"@type":"WebSite","@id":"https:\/\/www.geodatasource.com\/resources\/#website","url":"https:\/\/www.geodatasource.com\/resources\/","name":"GeoDataSource Articles & Tutorials","description":"Resources About GeoDataSource Services","publisher":{"@id":"https:\/\/www.geodatasource.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.geodatasource.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.geodatasource.com\/resources\/#organization","name":"GeoDataSource.com","url":"https:\/\/www.geodatasource.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","width":220,"height":27,"caption":"GeoDataSource.com"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/geodatasource\/","https:\/\/x.com\/_geodatasource"]}]}},"_links":{"self":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/comments?post=670"}],"version-history":[{"count":0,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/670\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/media?parent=670"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_category?post=670"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}