I
I
inavpetrov1942015-01-18 14:54:45
Database
inavpetrov194, 2015-01-18 14:54:45

How to make a database with the technical characteristics of different products?

there are three tables:

  • product;
  • manufacturer (brand);
  • category (laptops, tablets, monoblocks).

Where to insert those. characteristics?cba43b4e136a42d0bd926c8b556ab0c4.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IceJOKER, 2015-01-18
@IceJOKER

Easy way - visual editor and one field DESCRIPTION - very bad solution
Another - Create another table with all possible fields for characteristics and fill in one or another field depending on the product category, and NULL default is a convenient way to filter the product.
Another way - several tables for each product category - in my opinion, also a bad solution

Y
Yuri Shikanov, 2015-01-18
@dizballanze

If you need to be able to set a different set of characteristics for different product categories and these categories are added dynamically (for example, in the admin panel), then you can look at EAV . However, in this case, it is likely that using NoSQL would make more sense.

A
Anatoly Scherbakov, 2015-01-18
@Altaisoft

- Non-relational DBMS would allow you to do this, but in return you will have to pay by the inability to use foreign keys, integrity control and other features of relational DBMS.
- Postrelational DBMS (OrientDB, say) can do this and have integrity control, but they still need to be dealt with. The community is not that big.
- In my opinion, the best solution at the moment is to use PostgreSQL, keep all types of products in one table, and for specialized attributes specific to categories, create one data column of the HStore type, which stores an array of the key-value type.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question