I'm very new in designing professional database system and making a School Management System in Laravel. I have issues setting my database. How to enroll a student. To know the problem, you must have to read requirement once.
Every Classroom can have minimum 1 or maximum many Section. Every Section has many list of Courses and Students enrolled in. Every Classroom has Teacher
The database I am thinking for this is
Student (many-to-many forming Registration ) Classroom
Classroom (many-to-many forming Class_Section ) Section
Section (many-to-many forming Section_Courses ) Courses
or
Student (many-to-many forming Registration ) Classroom
Classroom {class_id, section_id(FK)} (one-to-many ) Section
Section {section_id, course_id} (one-to-many ) Course
The thing I need is that when enrolling a student, I want to register him in the ClassRoom and in any section of that classroom. A Student can see all the courses in that section.
This makes clear that registration should have section id as well. But if I make relation of a section with registration. It will show all sections.
Kindly suggest me a possible way of designing this database. I'm stuck up here and can't find a better option for it.