I'm designing a database for a school management system and am facing couple of problems and I thought of throwing it here and someone might help. I've a STUDENTS table that holds students details and CLASS table that holds class information. In the application one will need to know to which class a student should be promoted if he or she passes the exam. So the class table looks like this in my design:
+----------------------+
|id | name | parent_id |
+----------------------+
where the parent_id
is the id of the previous class. Now each class has more than one stream (e.g., class form 1 can have 3 streams: form 1A, form 1B, form 2B etc) and each stream has students say form 1A has 40 students and so forth. So i have a stream table with this design:
+---------------------------------------------+
| id | student_id | class_id | stream_name |
+---------------------------------------------+
so for each stream with 40 students I will have 40 rows in the stream table and the stream name will contain the name like A, B, C or whatever the user wants it to be named. Is this the best design regarding my problem? Will this design affect performance of the system in any way? What is the best database design approach with the problem in question?
STUDENTS table carries information about the student like their name and parents information.
EDIT: The stream table is updated every-time a students is registered or when the new academic year has been registered for-instance if i were in stream A of form 1 then all the student in that class (form 1) should be promoted to class form 1 retaining their stream so if i was in form 1A then the next academic year i will be in form 2A. There is an ACADEMIC_YEAR table that holds the information of academic year such as when does it start and end and all sort of information, also there is a EXAM_RESULTS table which stores results for each student in particular stream in an academic year. For records i will need to know all stream and classes that the student has studied.
Thanks in advance