Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OR-MAPPING ISSUE

 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I am bit confuse about mapping between two class/tables.
I working on one project which maintains,
question(id,sub_id,que_Text) and answer(id,que_id,ansText) 2 tables.
Now question of thinking is ,like we know we can set multiple answer for question in "answer" table so do i need to maintain(one-many relation).
But at the same time we know that question can have multiple/single answers. So what kind of relationship is better to perform??
And if you can suggets me some nice thoughtof it,its great for me....

Thanks In Advance
 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am thinking of one-many relation(due to multiple/single answer).

Any other nice suggestion??
 
M.S. Hossen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this situation I think 1:M is better, because you have to consider multiple answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic