I recently read foreign keys and joined them, and was pleasantly surprised that many of the basic concepts are things that I already put into practice. For example, with one project I'm working on now, I organize word lists and have a table for sets, for example:
`words` Table
`word_id`
`headword`
`category_id`
`categories` Table
`category_id`
`category_name`
Now, generally speaking, this will be a one-to-many relationship, with several words placed under the same category with a foreign key category_id. However, suppose for a moment that the user wants to add another category to the word, making it many-to-many. Is there a way to set up my table wordsto handle additional categories of words without creating additional columns for example category_2, category_3etc.?
source
share