If there are List,Map or other classes as members in the Java PO class, how to design the corresponding fields of mysql?

the Java PO class has List,Map or other classes as members, and mybatis acts as the dao layer
such as

 Class Student{
     int id;
     School school;
     List<String> courses;
     List<Teacher> teachers;
     Map<String, List<Integer>> courseScores;
 }
 
 School TeacherPO
 

Design a table in mysql, how to design the corresponding fields of school, teachers,courses,courseScores? Do school and teacher use school_id, teacher_id foreign keys directly? What about courses, courseScores?

Mar.28,2021

field name, you can do the field according to the words you can understand at a glance. This is not limited, and it is not recommended that you have no choice but to use foreign keys. The constraint is too strong, which will lead to problems or restrictions in your other operations.


teachers child table
courseScores, is converted to json and a field is saved.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b42163-2bb30.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b42163-2bb30.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?