I
I
Ildar Saribzhanov2016-02-10 18:05:28
MySQL
Ildar Saribzhanov, 2016-02-10 18:05:28

How to link one record to many records from multiple tables?

Structure.
dl3.joxi.net/drive/0008/1339/533819/160210/3c40453...
Conditions of the problem:
There is a store where goods are brought from 3 different cities. Each city has its own manufacturer table. The fields in the tables of manufacturers are different (due to some reasons, this is not the topic now), it is impossible to combine all tables of manufacturers into one table.
The store has a table of goods.
Question: How can I change/add the table/database structure in order to establish a connection between a product in a store and a specific manufacturer? It is necessary to uniquely identify the production by the id of the product from the store.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Kitaev, 2016-02-10
@Bluz

As an option, two fields: the name of the table and id in this table, but
Can.

I
Ildar Saribzhanov, 2016-02-11
@Bluz

Ultimately, the decision was made to merge the tables into one, as the first answer states.
To the extreme, if I don’t like null fields, then unique fields for each city can be placed in an additional table of detailed information.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question