I am doing a small EJB app (exam), in which there are 2 tables,questions_master and options_master.
I am unclear abt how i should desing the EJB's my logic is , every question has more than one options, questions have id and ans_id, where as options have question_id (id=question_id)and sr_no(sr_no==ans_id),and there respectiive display string.
1 - should i go in for two ejb's for two table's and handle them indepently (in which case where should i code the business logic i.e a question should have more then one answer, there should be no unlinked options etc...),
2 - define only one bean (questionsEJB)and add a business method inside it to handle the options_master table.
(which looks more convincing to me as a complete business component, which will also take care that options are not entered independently of questions)
another way of looking at it is say...
my entity is not a row in a table (questions_master )but,
a row from a table (questions_master)and more than one row from a different table (options_master)...
how do i create a complete enterprise entity bean from the above...
any help in this regard would be highly appreciated
thanx in advance.
cpyder at usa dot net