CREATE DATABASE MyDB;

USE MyDB;

CREATE TABLE Member (
    Name 		VARCHAR(128) NOT NULL,
    Password 	VARCHAR(128) NOT NULL,
    EMail 		VARCHAR(128) NULL,
    PRIMARY KEY (Name)
);
INSERT INTO Member VALUES('ali','ali123',NULL);
INSERT INTO Member VALUES('abu','abu123',NULL);

CREATE TABLE Country (
    Code 	CHAR(2) NOT NULL,
    Name 	VARCHAR(128) NOT NULL,
    PRIMARY KEY (Code)
);

INSERT INTO Country VALUES('cn','China');
INSERT INTO Country VALUES('jp','Japan');
INSERT INTO Country VALUES('kr','Korea');
INSERT INTO Country VALUES('my','Malaysia');
INSERT INTO Country VALUES('om','Oman');
INSERT INTO Country VALUES('sa','Saudi Arabia');
INSERT INTO Country VALUES('sg','Singapore');

SELECT * FROM Country;

CREATE TABLE State (
    ID INT AUTO_INCREMENT PRIMARY KEY,
    Country 	CHAR(2) NOT NULL,
    Name 		VARCHAR(128),
    LocalName 	VARCHAR(128)
);

INSERT INTO State (Country,Name,LocalName) VALUES('my','Selangor',	     'Selangor');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Pahang',	     'Pahang');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Sabah',		     'Sabah');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Sarawak',	     'Sarawak');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Perlis',	     'Perlis');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Kedah',		     'Kedah');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Negeri Sembilan',    'Negeri Sembilan');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Johor',		     'Johor');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Penang',	     'Pulau Pinang');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Terengganu',	     'Terengganu');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Kelantan',	     'Kelantan');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Perak',		     'Perak');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Malacca',	     'Melaka');
INSERT INTO State (Country,Name,LocalName) VALUES('my','Federal Territories','Wilayah Persekutuan');

INSERT INTO State (Country,Name,LocalName) VALUES('cn','Andong',	'安东');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Anhui',		'安徽');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Chahar',	'察哈尔');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Fujian',	'福建');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Gansu',		'甘肃');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Guangdong',	'广东');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Guangxi',	'广西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Guizhou',	'贵州');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Hainan',	'海南');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Hebei',		'河北');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Hejiang',	'合江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Heilongjiang',	'黑龙江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Henan',		'河南');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Hubei',		'湖北');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Hunan',		'湖南');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Jiangsu',	'江苏');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Jiangxi',	'江西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Jilin',		'吉林');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Liaobei',	'辽北');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Liaodong',	'辽东');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Liaoning',	'辽宁');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Liaoxi',	'辽西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Nenjiang',	'嫩江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Ningxia',	'宁夏');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Mudanjiang',	'牡丹江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Pingyuan',	'平原');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Qinghai',	'青海');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Rehe',		'热河');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Sichuan',	'四川');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Shaanxi',	'陕西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Shandong',	'山东');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Shanxi',	'山西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Songjiang',	'松江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Suiyuan',	'绥远');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Taiwan',	'台湾');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Xikang',	'西康');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Xing''an',	'兴安');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Xinjiang',	'新疆');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Yunnan',	'云南');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Zhejiang',	'浙江');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Guangxi',	'广西');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Inner Mongolia','內蒙古');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Ningxia',	'宁夏');
INSERT INTO State (Country,Name,LocalName) VALUES('cn','Tibet',		'西藏');

INSERT INTO State (Country,Name,LocalName) VALUES('sg','Central Region',   'Central Region');
INSERT INTO State (Country,Name,LocalName) VALUES('sg','East Region',	   'East Region');
INSERT INTO State (Country,Name,LocalName) VALUES('sg','North Region',	   'North Region');
INSERT INTO State (Country,Name,LocalName) VALUES('sg','North-East Region','North-East Region');
INSERT INTO State (Country,Name,LocalName) VALUES('sg','West Region',	   'West Region');

INSERT INTO State (Country,Name,LocalName) VALUES('kr','Busan',		   '부산시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Chungcheong','충청북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Chungcheong','충청남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Daegu',		   '대구시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Daejeon',	   '대전시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Gangwon',	   '강원도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Gwangju',	   '광주시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Gyeonggi',	   '경기도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Gyeongsang', '경상북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Gyeongsang', '경상남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Hamgyeong',  '함경북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Hamgyeong',  '함경남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Hwanghae',   '황해북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Hwanghae',   '황해남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Incheon',	   '인천시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Jagang',	   '자강도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Jeju',		   '제주도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Jeolla',	   '전라북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Jeolla',	   '전라남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Nampo',		   '남포시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Naseon',	   '나선시/라선시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','North Pyeongan',   '평안북도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','South Pyeongan',   '평안남도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Pyeongyang',	   '평양시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Yanggang',	   '양강도/량강도');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Sejong',	   '세종시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Seoul',		   '서울시');
INSERT INTO State (Country,Name,LocalName) VALUES('kr','Ulsan',		   '울산시');

INSERT INTO State (Country,Name,LocalName) VALUES('sa','''Asir',	  'عسير');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Bahah',		  'الباحة');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Eastern Province','الشرقية');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Ha''il',	  'حائل');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Jawf',		  'الجوف');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Jizan',		  'جيزان');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Al Madinah',	  'المدينة');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Makkah',	  'مكة');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Najran',	  'نجران');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Northern Borders','الحدودالشمالية');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Qassim',	  'القصيم');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Riyadh',	  'الرياض');
INSERT INTO State (Country,Name,LocalName) VALUES('sa','Tabuk',		  'تبوك');

INSERT INTO State (Country,Name,LocalName) VALUES('jp','Aichi',	   '愛知県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Akita',	   '秋田県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Aomori',   '青森県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Chiba',	   '千葉県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Ehime',	   '愛媛県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Fukui',	   '福井県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Fukuoka',  '福岡県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Fukushima','福島県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Gifu',	   '岐阜県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Gunma',	   '群馬県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Hiroshima','広島県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Hokkaido', '北海道');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Hyōgo',	   '兵庫県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Ibaraki',  '茨城県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Ishikawa', '石川県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Iwate',	   '岩手県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kagawa',   '香川県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kagoshima','鹿児島県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kanagawa', '神奈川県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kōchi',	   '高知県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kumamoto', '熊本県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Kyoto',	   '京都府');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Mie',	   '三重県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Miyagi',   '宮城県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Miyazaki', '宮崎県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Nagano',   '長野県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Nagasaki', '長崎県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Nara',	   '奈良県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Niigata',  '新潟県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Ōita',	   '大分県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Okayama',  '岡山県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Okinawa',  '沖縄県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Osaka',	   '大阪府');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Saga',	   '佐賀県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Saitama',  '埼玉県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Shiga',	   '滋賀県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Shimane',  '島根県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Shizuoka', '静岡県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Tochigi',  '栃木県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Tokushima','徳島県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Tokyo',	   '東京都');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Tottori',  '鳥取県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Toyama',   '富山県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Wakayama', '和歌山県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Yamagata', '山形県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Yamaguchi','山口県');
INSERT INTO State (Country,Name,LocalName) VALUES('jp','Yamanashi','山梨県');


