Create Relationships between Tables
976002Nov 24 2012 — edited Nov 26 2012Hello,
i have a problem transfering my er model into sql developer
i have 2 entities in my er model
Nation
-nation_id
-name
-flag
and an Entity
Player
-player_id
-name
-birthday
-gender
-nation_id(fk)
it is a 1:n relationship because a nation has several players
now is the problem how to create this model with the SQL Developer
I just created the 2 tables and now i dont know how to make the relationship, how to set the foreign key in the table player
my first try was to rightklick on player --->constraint -->add foreign key
the name should be nation_id_fk
and the referencetable and referencecolumn is clear, but why do i need to add the column name of the existing table ?
what do i need to choose ? i want a new column, the column "nation_id_fk" but there are just the choices nation_id , name , flag..
thank you for you help!