Hi! I need help to design an structure and the relationship.
I need to create 4 tables: REGION, SUBREGION, CITIES and COUNTRY and do the relationships
I have this:
Table: REGION
CREATE TABLE REGION(
REGION VARCHAR(2),
REGION_NAME VARCHAR(200),
);
Values:
REGION REGION_NAME
1 Africa
2 Americas
Table: SUBREGION
CREATE TABLE SUBREGION(
SUBREGION VARCHAR(2),
SUBREGION_NAME VARCHAR(200),
);
Values:
SUBREGION SUBREGION_NAME
1A Central Africa
1B Eastern Africa
Table: CITIES
CREATE TABLE CITIES(
CC_FIPS VARCHAR(2),
FULL_NAME_ND VARCHAR(200),
);
CC_FIPS FULL_NAME_ND
AA Angochi
AA Arasji
Values:
CREATE TABLE COUNTRIES(
CC_FIPS VARCHAR(2),
COUNTRY_NAME VARCHAR(100),
);
Table: COUNTRY
CREATE TABLE CITIES(
CC_FIPS VARCHAR(2),
FULL_NAME_ND VARCHAR(200),
INDEX(CC_FIPS),
INDEX(FULL_NAME_ND),
INDEX(FULL_NAME_ND,CC_FIPS)
);
Values:
CC_FIPS COUNTRY_NAME
AA Aruba
AC Antigua and Barbuda
AE United Arab Emirates
Anybody help me with the relationships??
thanks!