MySQL database structure (assign multiple values in one column)? -


i have table contains list of words. each of words has multiple categories assigned them. best way that?

i not want use set, because list of categories keeps changing.

i thinking of having table assigns ids categories , add field list of categories table containing words. storing list of ids in text field "proper" way this?

you should have 3 table this:

  1. word_table (you have )- word_id, word, ...
  2. categories_table - cat_id, cat_name, ...
  3. word_cat_table - cat_id, word_id

here word_id in word_table , cat_id in categories_table primary key


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -