I have a table with products like
Products
id
name
styles_id
I also have a table with styles like
Styles
id
name
When I add a style to a product I use a foreign key id value from the Styles
table. I do this for a few years now on a lot of projects but I was thinking WHY? It would be a lot easier to get the products if I have a Styles
table with a name as primary key and without an id
. So I do not have to do a join to get the style name of the product. I see it is done a lot but what are the advantages of the id
in the Styles
table?