I have two tables : products and tags.
products
key | name | description | url
tags
key2 | tag | tag description
Association
- One tag can be associated with many products.
- each product has one or more tags associated with it.
eg a product “plate” has the tags “ceramic”, “white”, “delicate”, etc associated with it.
I don’t know however how to create a many-to-many representation.
What’s the best way to store these tag associations? Create a tags field in products? Or another table? Thanks!
Edit: tags are many-to-many, thanks S.Lott
I would go with an additional table named (productTags: key, productKey, tagKey) that would map the two tables together.