0

I have designed 3 tables as below:

Table: Country

Columns:

  • country(name of country),
  • iso2_code,
  • iso3_code,
  • phone_code

primary key: country

Table: State

Columns:

  • state(name of state),
  • country(fk from country table)

primary key: state, country

Table: City

Columns:

  • city(name of city),
  • state(fk),
  • country(fk)

primary key: city, state, country

I have used composite keys as primary key for state & city tables. Is it bad design? Should I create auto-increment key for state & city tables & use them as primary key?

0 Answers0