I have a Student class:
public class Student implements Serializable{
//each student has an arraylist of modules
private String name = null; //students name
private int ID = 0; //students ID number
private String DOB = null; //Students Date of Birth
private ArrayList <Module> modules; //creating the students module arraylist
public Student(String name,int ID, String DOB) {
this.setName(name);
this.setID(ID);
this.setDOB(DOB);
setModules(new ArrayList <Module> ()); //initialising the arraylist
}
Each student has many modules and the grade they got in each of these modules. I need to write these student objects to a Mysqln database but how would I store the arraylist of modules each student has in the student table?