"Joshua D. Drake" wrote:
<snip/>
>
> That's it, in a nut shell. There is no argument there. That is why you
> don't use artificial keys. That said... pretty much every table I create
> will have an artificial key... because it makes managing data easy. An
> example (to reuse the simple example):
>
> users
> =====
> id serial unique,
> first_name text,
> last_name text,
> primary key (first_name,last_name)
Why not
users
=====
id serial primary key,
first_name text,
last_name text,
unique (first_name, last_name)
? This way, you can use the "id" as foreign key (more efficient),
allows you to "UPDATE first_name" if needed, and if you find out you
need to add another Joshua Drake to the DB, all you need is to drop the
unique constraint?