Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confusion on difference between one to many and many to one mapping.

 
Monica Shiralkar
Ranch Hand
Posts: 866
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a confusion between one to many and many to one mapping.If state-city relation is one to many then city-state relation will be many to one.So it is the same thing from other end.One to many is many to one from other end and same way many to one is one to many from other end. so we have to never implement many to one relation because to implement that we can do one to many from other end.Please correct me if I am wrong.Thanks.
 
Volodymyr Lysenko
Ranch Hand
Posts: 512
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I didn't understand very well what you wrote. For me many to one means
Table that represents side MANY has foreign key column whose values point to primary keys in table on ONE side. Many rows on MANY side point to single primary key on ONE side table.
And one to many relation says that primary key on ONE side is pointed many times on MANY side table by foreign key column.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic