What would be the best db design for user generated (custom) fields

Hi,

I'm creating an app for product management, where users can create products, these products have attributes that are created and defined on the front end by users.

I'm trying to work out the design of a database where users can create custom fields on the front end.

My confusion is how best to design for different field types, the custom field could be any of the following types text, integer, decimal, date, url, media.

Does anyone have any suggestions on the best way to design of the attributes table to support the different user-defined fields?

Thanks in advance.

1 reply