Dear expert,

I just learnt DAO.

However, I have no experience in inserting into many-to-many tables using the DAO pattern.

table1 : tutor
table2 : subject
table 3 : tutor-subject (this is the link table)

In my DAO, I have tutorDAO, tutorDAOImpl, subjectDAO, subjectDAOImpl

How do I do the insertion in my controller using plain JDBC ?(or should I better off in EJB)

Can I do it in a single query ?

Hope someone can give me some tips how to accomplish the above.