Let’s say I have a Products table, ProductsCategory table and a Category table.
The ProductsCategory table has two columns: ProductID and CategoryID. Should I be using a composite primary key or a unique index on the two columns?
Additionally if I use the index, I can make it a unique index or a key.
Might as well use a composite key – no need to add a unique index when you already have the uniqueness semantics of a composite primary key.