for a current customer project, i’ve developed a CMS that stores products.
Products are entries that have some properities like title, text & etc.
However, some clients want to have different properties like price, color & etc.
I try to make my code as generic as possible so i don’t want to modify the code
for each customer.
My Question:
How can i design such a database, that a product can have infinite, multiple properties?
How to create/generate forms for such a different design?
Thanks for reading.
you need to have two tables:
The first table contains one product per row with their unique ID and their common properties
The second table relates each product to its non-common properties:
You get a product’s information with two queries, first you get the common properties:
then the non-common properties: