adiss's avatar

How to store in DB different product with similar attributes

What is the best way to store product data in ecommerce application? Example if i have many products with similar attributes like

CD -> Memory
CD -> Price

Ram -> Memory
Ram-> Price

Notebook -> Processor
Notebook-> Memory
Notebook->ScreenSize
Notebook-> Price

Workstation-> Memory
Workstation->Processor
Workstation->ScreenSize
Workstation->Price 
....

do I need to create different tables for every product type or there is other solution? I read about Single Table Inheritance (STI) but i think that is not optimal solution.

0 likes
1 reply
bestmomo's avatar

I do not see the point of complicating the tables. The fact that attributes have the same name does not justify pooling. It would be different if there was sharing of values.

Please or to participate in this conversation.