ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vamsee Kanakala <vamli...@gmail.com>
Subject Several dumb questions
Date Tue, 15 Mar 2005 11:11:01 GMT

This is more of a database design question than an ibatis question, I 
hope you guys don't mind :) Here goes:

I have a table called students, and students can be assigned to several 
batches ('course' would be a better name, I think). So, I'm using a 
students_batches_map which basically contains  and id(primary key), 
student_id and batch_id.

First of all, is this a good idea? Is there any better way I can express 
such a relation? Second, if I have to update the number of batches a 
student is associated with, I can think of only one way: drop all 
batches a student is associated with and insert new selections again. 
Again, is this a good idea?

Finally, I'm having to iterate through the list of batches and insert 
each record into the students_batches_map. Is there a better way?


View raw message