Different Attributes

what 's the best logic to save products with different attributes?
like “Monitor” attributes would be size and brand , “Mouse” attributes would be brand, buttons and software. and so on? Do I create table for each?

Hi, maybe brand and model? I think today, you recognize brands and models also.

I would probably create one table with column brand, model, could be size, atributes, etc…
If u have lots of items, then maybe you can create different tables like one for monitors, one for keyboards and so on. Or trables using brands and what they got.

You sholud do it the way you think will be better for your understanding or needs.

1 Like

Look up the EAV Model (Entity-Attribute-Value)

Thank you I did not know about it before but it sounds a bit complicated for me I am trying to build a simple structure. If I stored the attribute column as JSON type, would that affect the performance?


JSON is an option for the attributes.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service