Even n-n relation tables should have a simple PK

Continuing with the above/earlier I say that even the table to create a many-to-many relationship should have a simple primary key.
E.g.:
Table User_Role
– field UserRoleID PK
– field UserID FK
– field RoleID FK

As long as harddisk space is cheap and a simple PK does not create a performance impact there should be no reason to not have a simple primary key.

Tags:

Leave a Reply