On 17 Oct 2002 at 9:24, paul butler wrote:
<snip>
> That way your future proofed, varchar without brackets is unlimited
Thanks a lot, I didn't know that.
> and while I know you didn't ask
>
> create table country (
> code varchar primary key,
> name varchar not null unique;
> insert into country (code, name) values ('NL', 'Nederland');
> insert into country (code, name) values ('BE', 'Belgie');
>
> create table gender (
> code varchar primary key,
> name varchar not null unique);
> insert into gender (code, name) values ('M', 'male');
> insert into gender (code, name) values ('F', 'female');
>
> might serve just as well
I have considered this. As a matter of fact, that is the way it is in
our current db but I'm not really happy with it. Theoretically CODE
should never change and is therefore safe to use as primary key. But
having an "extra" serial primary key will make the db more flexible
regarding to unforeseen complications.
> Hope this helps
It did, thanks again.