Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create Relationships between Tables

976002Nov 24 2012 — edited Nov 26 2012
Hello,

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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2012
Added on Nov 24 2012
1 comment
3,168 views