Sample Header Ad - 728x90

The most generic e-shop DB schema

0 votes
1 answer
408 views
Let's say I create a schema for an e-shop what potentially sells everything: laptops, phones, tires, snacks etc. Considering this, I cannot create a new table/entity for each good category the shop sells and describe the good's properties by new attributes. So, I went to more generic model to describe each product Image To me, it seems fine but as soon as I've tried to implement this solution, it's appeared to impossible to execute any query like > select names and prices of all laptops where ssd capacity >= 512 and weight < 2kg and price <= 2000 money How is possible to change this schema and keep the ability to store information about any product?
Asked by 63350541 (1 rep)
Mar 20, 2021, 12:00 PM
Last activity: Apr 18, 2025, 02:04 PM