MySQL: Storing item properties
-
15-10-2022 - |
Pergunta
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!
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow