I totally agree with chrishirst.
I usually use 3 tables for that.
There is a typical mysql schema.
One table with a country list:
Code:
create table country(
iso char 3,
name varchar(255),
primary key (iso)
);
One table with my user infos, but no direct links with the country table
Code:
create table user(
id number not null,
username varchar(50) not null,
password varchar(200) not null,
primary key (id)
);
And finally one last table who link the users and the country:
Code:
create table countryLink(
userId number not null,
iso char(3) not null,
primary key (userId,iso)
);
|