I want to create "product_category" (some kind of dicrionary) table with only one UNIQUE column "name". Then create a relation with existing table "product" like below: 
-
Do I need an extra column "ID" (Primary Key) in table and create a relation with this "ID" column instead of with "name" or just INDEXED "name" column is enough or make "name" column as PK?
-
Do I need a relation at all? In case of delete row in "product_category" I want to only wipe category out in "product" table.
Aucun commentaire:
Enregistrer un commentaire