I am still battling to work out if the use of an identity column for a PK, when you COULD get away with using an exisiting column, is the right way to go.
Example:
CREATE TABLE person_link
(
person_link_id INT NOT NULL IDENTITY(1,1)
,owner_person_id INT NOT NULL
,link_person_id INT NOT NULL
,link_date_created DATETIME NOT NULL DEFAULT(GETDATE())
,deleted_person_id INT NULL
CONSTRAINT pk_person_link PRIMARY KEY(person_link_id)
,CONSTRAINT fk_person_link_owner FOREIGN KEY (owner_person_id) REFERENCES person (person_id)
,CONSTRAINT fk_person_link_link FOREIGN KEY (link_person_id) REFERENCES person (person_id)
)
OR, should I remove the person_link_id, and rather put a primary key across my two columns which will always be unique. i.e:
CONSTRAINT pk_person_link PRIMARY KEY(owner_person_id, link_person_id)
Is it just a personal choice, or is there a good reason NOT to use the identity (which, I am in favour of, purely because - I do it all the time).