Hello, folks, I am not sure if this is the best forum to ask this very simple question, but as there must be a lot of great architects here I thought it would be ok.
I am making a simple aplication, for academic purposes, to implement the DAO Pattern. So there is a TO (Transfer Object) used to transfer data between the layers, a BO (Business Object) that validates the business logic and function as a facade between the Presentation Layer and the Data Access layer.
There is an entity called Test and another entity called Question. One Test can have one or more Questions and one Question can be in zero or more Tests.
Implementing this relation on a Relational DataBase we need a "link table" between the Test and Question tables.
So far, everything is ok.
Until when I need to separate the responsabilities between the DAOs.
What is the best approach for this problem?
is the TestDAO who is responsible for inserting the Test and making the associations with the Question table? Or I should create another DAO to encapsulate this logic?
Thanks in advance!
Frederico Costa
[ June 17, 2008: Message edited by: Frederico Costa ]