Some problems in relational database design (students, teachers, classes, courses)

I want to try some demo at random, but it got stuck when I started designing the database. The following is the relational model I derived. Please help me to see what is unreasonable, regardless of the data type. In addition, there is a class_teacher_course table that is built in this way. Is there anything wrong with it? Please give us some advice.

clipboard.png

Sql
Jan.20,2022

before building a table, we should first make it clear that the main table, the relational table, and the relationship between the table and the table are one-to-one, one-to-many, many-to-many.

recommend several habits of building tables:

the field name in the principal table does not have the principal table name, for example:

class_student
- id
- class_id
- student_id
- ctime
- utime

the relationship between your class table and course table is not clear, you need to determine whether it is reasonable according to your specific business.

Menu