I've been designing a database for a private school.
Every Student attends some Lessons in specific Classes.
To my knowledge I can meet the above requirement by using a join table
which holds StudentID, LessonID and ClassID,
or to have a join table StudentsandLessons which holds StudentID and LessonID
and another table with a one-to-one relation with StudentsandLessons which holds the ClassID for every Student-Lesson record.
The first way has the disadvantage of not allowing null values for records.
This is a problem for me, because in the school the want firstly to enter Lessons
and afterwards - when Schedule is ready to - enter Classes.
I thought a solution to the above restriction could be the Classes field to have a default value e.g. NoClassYet but this isn't aesthetically correct for me.
The second way overcomes the above restriction, but it doesn't seem "programmatically " correct to me.
Any ideas would be far more than just helpful.
Thank you in advance
Every Student attends some Lessons in specific Classes.
To my knowledge I can meet the above requirement by using a join table
which holds StudentID, LessonID and ClassID,
or to have a join table StudentsandLessons which holds StudentID and LessonID
and another table with a one-to-one relation with StudentsandLessons which holds the ClassID for every Student-Lesson record.
The first way has the disadvantage of not allowing null values for records.
This is a problem for me, because in the school the want firstly to enter Lessons
and afterwards - when Schedule is ready to - enter Classes.
I thought a solution to the above restriction could be the Classes field to have a default value e.g. NoClassYet but this isn't aesthetically correct for me.
The second way overcomes the above restriction, but it doesn't seem "programmatically " correct to me.
Any ideas would be far more than just helpful.
Thank you in advance