Answer the question
In order to leave comments, you need to log in
How to create a relationship between tables in MySQL?
How to organize the relationship correctly, namely, what fields and with what parameters should be created in order to link the accounts , individual and cargo_carriers tables ?
accounts is the user account. When registering, the user will select using the checkbox what type of account he wants to create:
individual (individual) or cargo_carriers (carrier company).
Here is the diagram:
Answer the question
In order to leave comments, you need to log in
Add an account_id int field to the individual and cargo_carriers tables and create foreign keys to the accounts table
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question