Assignment on DDL and DML

Create the following tables with the given structure

REGIONS

Field nameData typeAdditional inputs
region_idintprimary key
region_namevarchar(50)not null

COUNTRIES

Field nameData typeAdditional inputs
country_idvarchar(2)primary key
country_namevarchar(50)not null
region_idintforeign key to REGIONS table

LOCATIONS

Field nameData typeAdditional inputs
location_idintprimary key
street_addressvarchar(255)
postal_codevarchar(10)
cityvarchar(50)
state_provincevarchar(50)
country_idvarchar(2)foreign key to COUNTRIES table

DEPARTMENTS

Field nameData typeAdditional inputs
department_idintprimary key
department_namevarchar(50)
manager_idintforeign key to EMPLOYEES table
location_idintforeign key to LOCATIONS table

JOBS

Field nameData typeAdditional inputs
job_idvarchar(15)primary key
job_titlevarchar(50)
min_salaryint
max_salaryint

EMPLOYEES

Field nameData typeAdditional inputs
employee_idintprimary key
first_namevarchar(50)
last_namevarchar(50)
emailvarchar(100)
phone_numbervarchar(50)
hire_datedate
job_idvarchar(15)foreign key to JOBS table
salarydouble
commission_pctdouble
manager_idintforeign key to EMPLOYEES table
department_idintforeign key to DEPARTMENTS table

JOB_HISTORY

Field nameData typeAdditional inputs
employee_idintcomposite key part 1
start_datedatecomposite key part 2
end_datedate
job_idvarchar(15)foreign key to JOBS table
department_idintforeign key to DEPARTMENTS table