views:

44

answers:

1

i have entity A that has foreign key to entity B, does entity B need to have foreign key back to entity A? if yes, how? coz entity B, id already used for primary key

entity A --> id, entity_a_name, foreign_key_entity_B
entity B ---> id, entity_b_name

+2  A: 

No, your mapping is fine as is.

KLE
thanks, need more people to confirm this =)
cometta
@cometta I have seen many projects :-) Our current application involves 830 tables, 30 000 columns and around 2000 foreign keys. Your need is very simple, so I feel confident that other people would confirm that I am not mistaken ;-) Have a good day! :-)
KLE