Таблица стран countries: |
|
`id_country` mediumint(8) unsigned NOT NULL auto_increment, |
`country_name_ru` varchar(50) NOT NULL, |
`country_name_en` varchar(50) NOT NULL, |
PRIMARY KEY (`id_country`) |
Таблица регионов regions: |
|
`id_region` int(10) unsigned NOT NULL auto_increment, |
`id_country` mediumint(8) unsigned NOT NULL, |
`region_name_ru` varchar(255) NOT NULL, |
`region_name_en` varchar(255) NOT NULL, |
PRIMARY KEY (`id_region`), |
KEY `id_country` (`id_country`) |
Таблица городов cities: |
|
`id_city` int(10) unsigned NOT NULL auto_increment, |
`id_region` int(10) unsigned NOT NULL, |
`id_country` mediumint(8) unsigned NOT NULL, |
`city_name_ru` varchar(255) NOT NULL, |
`city_name_en` varchar(255) NOT NULL, |
PRIMARY KEY (`id_city`), |
KEY `id_region` (`id_region`), |
KEY `id_country` (`id_country`) |