double foreign key to the same table [message #90516] |
Wed, 07 January 2004 03:35 |
CK
Messages: 20 Registered: February 2001
|
Junior Member |
|
|
Hi! I've got a design problem to see whether someone can help.
I've got a table storing the source and destination airport of a flight.
columns
-------
FLIGHT_ID VARCHAR2(10)
SRC_AIRPORT_ID VARCHAR2(10)
DES_AIRPORT_ID VARCHAR2(10)
In order not to duplicate the info, I define a static table to store airport-specifi attributes like (landing fee, number of lanes, etc.)
columns
------
AIRPORT_ID VARCHAR2(10)
LANDING_FEE NUMBER(5,2)
NO_OF_LANES NUMBER(2,0)
The flight table has two foreign keys (SRC_AIRPORT_ID, DES_AIRPORT_ID) pointing to the airport attribute table (AIRPORT_ID). How can this be represented in the ER diagram?
Thanks.
|
|
|
|
|