Create countries table as child table to regions

Let us understand how to create countries table as child table to regions. We need to define foreign key between regions and countries.

  • Already we have created REGIONS table with primary key on region_id
  • As per data model diagram COUNTRIES is child table to REGIONS.
  • Here are the columns in the COUNTRIES table.
    • country_id
    • country_name
    • region_name