Database Table Design

I want to know your opinion and what should be the best approach for this case:

I have 2 tables: - clients; - suppliers;

I create 2 pages so that people leave feedback about the customer and the supplier. With this in mind, the created feedback table.

Now the question is which approach to choose:

1) Create one feedback table with two foreign keys (clientid and supplierid). With this approach, if they leave feedback with the customer, then the FK provider will be empty.

2) create 2 tables called clientfeedbacks and providersfeedback. With this approach, since each table will have only one FK, then the FK will not be empty.

Thank.

+3
source share
2 answers

, : client_feedback, client_id , request_feedback, amps supplier_id to feedback_id? (has_many )

+2

โ„–2 , .

0

Source: https://habr.com/ru/post/1772001/


All Articles