goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
300 stars 199 forks source link

enum or another table(foreign-key), which is better? #148

Closed witwall closed 8 years ago

witwall commented 8 years ago

for example, I have 18 brands to manager, I can set brand as enum. but one day, I want to add some brands or set some brands as disable, another table will be better.

if use foreign-key, there will be another issue 147 I met before. of course I save another unique id, not key column in the product table(who has a column brand). and enum seems is not a good choice.

goFrendiAsgard commented 8 years ago

Foreign key is better.