How is it possible to model in a database many different products? For example, a smartphone might have attributes such as RAM and camera resolution, whereas a fridge has way different attributes. Is there a way to store these data in a relational database?
You probably have some columns that are common to almost all products:  Price, SKU, Manufacturer, etc.  Those may as well be columns.  The rest can be put into a JSON string.  More discussion:  http://mysql.rjweb.org/doc.php/eav