Answer the question
In order to leave comments, you need to log in
How to organize a pattern for an online store on Laravel + PostgreSQL?
Greetings,
I just can’t figure out how to organize an e-store database on postgresql, namely:
1. Each product has its own unique characteristics, for example:
if these are mobile phones, then the characteristics are (standard: GSM, camera: 20mpx, infrared port: yes, well, etc.), and if it is a refrigerator - the characteristics will be as follows (Type of refrigerator: Two-chamber, Number of compressors: 1, Type of control: Electronic, etc.) - I don’t understand how to organize such a base ... But, there is one more nuance :
2. Looking through the html in some marketplaces, I saw the same characteristics in the categories, when adding a product, for example, Bluetooth TVs and refrigerators also have Bluetooth - in these categories, the "bluetooth" parameter has the same id. How can this be done with laravel and postgresql. Please do not judge strictly! Thank you in advance!
Answer the question
In order to leave comments, you need to log in
Table of attributes id:1, title: "BlueTooth", type: "Boolean", ...
Table of classes (sets of attributes for a product) id: 1, title: Холодильник
Cross-tab: id_класса, id_признака
Products:title: Бирюза Х-1, id_класса: 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question