S
S
semki0962019-04-14 15:36:31
MySQL
semki096, 2019-04-14 15:36:31

How to build a table with goods, using an example?

There is a store with a table of goods. It is clear that we do not add accessories to the product table, we build one-to-many or many-to-many relationships for them, depending on the type of relationship.
1 question. But for example, what about the price of a product, or the quantity of a product? Like as it is possible to write in the table of the goods?
2 question. And another question. Let's say a product has 3 colors. Means it is necessary to take out probably quantity of the goods in the separate table? But then a problem arises - the product-color-quantity relationship becomes more complicated, and here the FIG knows how to resolve it. I would be grateful for advice.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-04-14
@semki096

The price is a characteristic of the product, if it does not depend on the configuration. And about the color - you have the wrong concept of the product. Stores from are aggregated for ease of serving to the user. In fact, the red and blue t-shirts are different t-shirts with different, potentially, cost. These are completely different things.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question