U
U
uurg2020-10-08 19:16:52
Database design
uurg, 2020-10-08 19:16:52

MySQL database organization?

Good afternoon.
I have a database like this -

  1. A table with data types , which stores data about the types of products produced
  2. The partners table with partner data, which has a type_id cell indicating which product type the partner belongs to

5f7f3b4ea30de823721748.png
5f7f3b5486fe0532682883.png
The problem is that there can be several values ​​in this cell, and advice is needed on how to properly implement the database structure so that it is possible to correctly receive / change / delete type_id

data. That is, it is possible to put data in one cell, somehow separating them, or create another table, as long as there is no idea how to do it.

Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexalexes, 2020-10-08
@uurg

See how a many-to-many relationship is implemented.
That is, you need an intermediate third table.
partner_and_product_type
part_id - id. partner
prod_type_id - id. product type.
Then you can add several types of products to any partner.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question