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:
- word_table (you have )- word_id, word, ...
- categories_table - cat_id, cat_name, ...
- word_cat_table - cat_id, word_id
here word_id in word_table , cat_id in categories_table primary key
Comments
Post a Comment