M
M
Meridian3122013-12-14 17:50:03
MySQL
Meridian312, 2013-12-14 17:50:03

How can you organize a table that has 3 foreign keys (FKs) and they are all Master Keys?

How can you organize a table that has 3 foreign keys (FKs) and they are all Master Keys?
1FvZgZX.png
Table A, all PK and FK fields
Table B, all PK and FK fields
Table C, airline_code FK, flight_number PK
Task, create a CONSTRAINT for Table A.
An entry is created in Table A only when the Airline Code matches the Aircraft Model ( Table B) and Flight Number (Table C)
If the design needs to be redesigned, explain how it can be presented.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2013-12-14
@mgramin

For example, in table B the primary key is composite, and in A there is a forenkey with a unique constraint.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question