I have been wondering what the best practices or ramifications are in setting up the PK in a M2M table in SQL Server. For instance:
I have 2 tables
- Users
- Roles
I am making a new table
- UserRole
Which has 2 fields RoleId & UserID
now should I
- create a UserRoleID as the PK and make UserID and RoleID the FKs
- make the PK UserID AND RoleID and set them as FKs
- something else
I would like to know the performance issues with each of the options and what the recommended best practices are.