I need some advice on what would be the best way to store specific information on a MySQL Database.

I have an array of hundreds of items, each one with a specific property color. There is total of 9 colors available and each item may have any combination of those colors.

Ex:

Item1: "green,blue,orange"
Item2: "red,grey",
Item3: "green",
(...)

I'm wondering what would be the best way to store that for maximum performance and acessibility. Should I just store the array of colors on a single cell and explode() it when necessary, or what would be a better approach to this ?

I want to do this the best way possible to avoid hassles later so I could use some opinions from rather more experienced people.

Many thanks!

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top