Skip to content

Instantly share code, notes, and snippets.

@sethmclean
Last active August 29, 2015 14:13
Show Gist options
  • Save sethmclean/7f81be93f603f6472108 to your computer and use it in GitHub Desktop.
Save sethmclean/7f81be93f603f6472108 to your computer and use it in GitHub Desktop.
Create Table for the US data set from GeoNames
CREATE TABLE `geoname` (
`geonameid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(200) DEFAULT NULL,
`asciiname` varchar(200) CHARACTER SET ascii DEFAULT NULL,
`alternatenames` varchar(10000) CHARACTER SET ascii DEFAULT NULL,
`latitude` double DEFAULT NULL,
`longitude` double DEFAULT NULL,
`feature class` char(1) DEFAULT NULL,
`feature code` varchar(10) DEFAULT NULL,
`country code` char(2) DEFAULT NULL,
`cc2` varchar(60) DEFAULT NULL,
`admin1 code` varchar(20) DEFAULT NULL,
`admin2 code` varchar(80) DEFAULT NULL,
`admin3 code` varchar(20) DEFAULT NULL,
`admin4 code` varchar(20) DEFAULT NULL,
`population` bigint(20) DEFAULT NULL,
`elevation` int(11) DEFAULT NULL,
`dem` int(11) DEFAULT NULL,
`timezone` varchar(40) DEFAULT NULL,
`modification date` date DEFAULT NULL,
PRIMARY KEY (`geonameid`),
KEY `latitude` (`latitude`),
KEY `longitude` (`longitude`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment