I am trying to redesign an older DB for a school,
to meet the new needs that emerged.
I am totally confused due to the complexity of the problem. I've already searched in this forum and in Google but most articles are for simpler DBs.
Well to get to the point.
School has Students,
Students attend to Classes (many to many)
Students are assigned Lessons (many to many)
and coming to the confusing part
a Lesson in specific Class may be teached from two different Professors
(e.g. the 1st may teach the theory and the other the excersizes).
So another many to many Class-Professor and another Class-Professor-Lesson and so on?
After throwing away many sheets of paper I come up with a schema which seems a little bit strange but seems to going to work for my case.
I figure out that I could have a unique junction table storing all these info, and that's no other than the Schedule table.
So I'm thinking of having the following relationship schema:
Students
StundeID
Name
etc.
Lessons
LessonID
Title
Classes
ClassID
Title
Professors
ProfessorID
Name
etc.
Schedule
ScheduleID (maybe a combination of all others)
ProfessorID,join with Ptofessors
ClassID, join with Classes
LessonID, join with Lessons
Day
Time
Schedule_Students
tableID
ScheduleID,join with Schedule
StudentID, join with Students
What is your oppinion about? Can you see any problems which may emerge from such a design?
Thanks in advance
to meet the new needs that emerged.
I am totally confused due to the complexity of the problem. I've already searched in this forum and in Google but most articles are for simpler DBs.
Well to get to the point.
School has Students,
Students attend to Classes (many to many)
Students are assigned Lessons (many to many)
and coming to the confusing part
a Lesson in specific Class may be teached from two different Professors
(e.g. the 1st may teach the theory and the other the excersizes).
So another many to many Class-Professor and another Class-Professor-Lesson and so on?
After throwing away many sheets of paper I come up with a schema which seems a little bit strange but seems to going to work for my case.
I figure out that I could have a unique junction table storing all these info, and that's no other than the Schedule table.
So I'm thinking of having the following relationship schema:
Students
StundeID
Name
etc.
Lessons
LessonID
Title
Classes
ClassID
Title
Professors
ProfessorID
Name
etc.
Schedule
ScheduleID (maybe a combination of all others)
ProfessorID,join with Ptofessors
ClassID, join with Classes
LessonID, join with Lessons
Day
Time
Schedule_Students
tableID
ScheduleID,join with Schedule
StudentID, join with Students
What is your oppinion about? Can you see any problems which may emerge from such a design?
Thanks in advance