Quote:
Originally Posted by Eiolon
... tutorials and books telling me to assign unique ID's to everything.
|
whatever you've been reading, it's wrong
one does ~not~ assign ids to everything willy-nilly
you should assign a
surrogate key (for that's what it's called) only when a suitable
natural key does not exist
suitable often means that the key can be used in other tables as a foreign key without becoming unwieldy
what's a natural key? any column, or combination of columns, that already exist within the data, that uniquely identify each row
more than this, i cannot tell you now, without turning this thread into a tutorial, which i'm not prepared to do
do some research on
natural vs surrogate key -- it's a contentious issue, to be sure, but anyone who says you should apply a surrogate key to every table is deluded