Project Report GR 9
Project Report GR 9
The School Management System database is designed to streamline academic and administrative
processes within educational institutions such as schools, colleges, or universities. This comprehensive
system supports key functionalities, including student enrollment, attendance tracking, grade
management, and class scheduling. Tailored for various stakeholders—students, teachers, parents, and
administrators—the database ensures policy compliance, maintains data integrity, and provides
actionable insights to optimize institutional operations and enhance the overall academic experience.
The School Management System database supports the following user roles, each with specific
responsibilities:
Students
● Roles:
o Primary users of the system for academic and attendance tracking purposes.
● Responsibilities:
o Ensure compliance with attendance policies (minimum 75%) and submit valid excused
absence requests on time.
o Enroll in subjects and classes within the designated timeframes and confirm course
schedules.
Teachers
● Roles:
● Responsibilities:
o Input and update grading information, including assignments, exams, and attendance
scores.
● Roles:
● Responsibilities:
Administrators
● Roles:
○ System operators and policy enforcers.
● Responsibilities:
○ Manage system data, including maintaining accurate records of students, teachers, and
parents.
GRADING SYSTEM:
Business process: A grading system involves setting up processes to evaluate, score, and classify student
performance based on assignments, exams, and attendance. Teachers will update the grading scale,
deciding on letter grades (A, B, C, etc.). Next, weights are assigned to each component of the course
depending on their importance. Then, collect and normalize scores to ensure uniformity—this may
involve adjusting scores to a common scale if components have different maximum points. To calculate
the total grade, multiply each component’s score by its weight, summing these weighted scores to
produce a final result ( in our database the weight of attendance score, assignment score and exam
score weights are 0.1, 0.2, 0.7 respectively ). This final grade can then be converted into the appropriate
letter grade . Each student has their ID, therefore they can verify the process result and announce it to
the teacher for appropriate modification. Before the exam occurs, teachers need to check the students
who have their attendance score under 7.5, these students will immediately get 0 at exam score and
cannot take the exam. Teachers have to update the results after 2 weeks of the final exam. Students
must inform teachers about the mistakes in their results and every change must be carried out in 1
week.
Business rules:
● The system enforces that students who do not meet a minimum 75% attendance rate are
disqualified from taking the final exams. Attendance score=10 - 0,5*late - ( absence -
absence_with_permission )*2
● Attendance weighs 10%, assignments 20%, and exams 70%. Total Grade = (Assignment Score ×
0.2) + (Attendance score × 0.1) + (Exams Score × 0.7).
CLASS SCHEDULING
Business process: The class scheduling process in an educational institution involves systematically
planning, organizing, and managing class times, locations, and resources to optimize the schedule for
students and faculty. It begins by defining scheduling objectives and policies, which include setting
guidelines around class hours, class date, class size limits, with goals like maximizing room utilization,
reducing conflicts. Next, a preliminary schedule is developed by assigning time slots, ensuring no
scheduling conflicts for students. This draft schedule is reviewed by stakeholders, adjusted based on
feedback, and formally approved. The finalized schedule is published to students and faculty through
the institution’s online portal, which opens registration and offers support as needed during this period.
Throughout the term, enrollment and attendance are monitored to allow for adjustments like opening
additional sections, combining small classes, or handling changes in room assignments. At the end of the
term, data on scheduling effectiveness, resource utilisation, and feedback are analyzed to document
improvements, refine policies, and enhance scheduling processes for the future.
Business rules:
● Each class has its own capacity. When classes are full, cannot add any students or make any
arrangements.
STUDENT ENROLLMENT:
Business process
1. Student Registration:
● When a student wishes to enroll, they provide personal details (name, student ID, date of birth,
email, etc.
● Once approved, students use their student ID to enroll the subjects and classes which they want
to learn in one semester.
● Students have 2 weeks to enroll the subjects that they want to learn in the next semester as well
as the class for that subject. After these 2 weeks, they have one more week to change their
aspiration.The student is then added to the class list for their selected subjects.
2. Class Selection:
Capacity Check:
● Scenario 1: Class is Available: If the class has available spots, the student’s registration proceeds
normally.
▪ Notification: If the class is full, the system notifies the student immediately, the
enrollment status becomes “fail”.
Student Choice: After successful enrollment, the student receives their course schedule, which includes
their selected subjects, classes, times, and locations
Business rule
● A student can enroll in at least 12 credits per semester and a maximum of 28 credits. If enroll
less than 12 credits, student will not be able to register for any class in that semester (all
enrollment status of them become “fail’’) and all other column will be set to ‘null’ value
ATTENDANCE TRACKING
Business process
1. Class Setup:
● Teachers set up their course attendance system using the university’s digital platform or
a manual process (e.g., class roll calls or apps).
● Teacher Action: At the beginning of each class, the teacher records student attendance
by paper or calling, late students can request their teacher to change their attendance
status from absent to late.
● Students with absence with permission status will not lose any attendance
score( consider as not late)
● System Update: The attendance system records whether students are present, absent,
or late.
2. Monitoring & Notifications:
● Real-Time Alerts: If a student misses a class or exceeds the attendance threshold, the
system sends automatic notifications to the student.
● Teacher Reports: Teachers review weekly attendance reports for follow-up actions.
● Student Submission: Students submit documentation for excused absences through the
system (e.g., medical notes).
● At the end of the term, a final attendance report is generated for student records and
academic evaluations.
Business Rule
● Students must attend at least 75% of all scheduled classes to be eligible to take final
exams or receive credit for the course. ( If their attendance score are below 7.5, their
exam score will become 0 ).
2. Database design
ERD:
Relational Database Design:
3. Application Description
The School Management System offers several key functionalities to streamline academic and
extracurricular processes:
Functionalities
1. Student Enrollment:
o Users: Students
2. Attendance Tracking:
o Users: Students
o Input: Class name
3. Result System:
4. Class Timetable:
o Users: Student
o Output: Class start time, class end time, class date, class ID, semester
5. Managing student:
o Users: Teacher
o Input: Subject ID
o Output: Student ID, student name, attendance status, assignment grade, exam grades, attendance
date, total grade value
Installed Rule:
1. Attendance score=10 - 0,5*late - ( absence - absence_with_permission )*2
- Created a trigger to automatically update the attendance score after the teachers
insert all the attendance status ( late, absence, absence with permission)
- Created a function to check if students have their attendance score under 7.5 or not. If
students have less then 7.5 attendance score the exam score will become zero.
Method 1:
create or replace function auto_check_khong_duoc_thi(id_monhoc
varchar(10),semesterx varchar(6))
returns void as $$
declare id_hs varchar(10);
att_score float;
begin
for id_hs in (select student_id from enrollment where subject_id=id_monhoc and
semester=semesterx and enrollment_status='success') loop
select attendance_score into att_score from enrollment where student_id=id_hs and
subject_id=id_monhoc and semester=semesterx;
if att_score<7.5 then update enrollment set exam_score=0 where student_id=id_hs and
subject_id=id_monhoc and semester=semesterx;
end if;
end loop;
end;
$$ language plpgsql;
- The performance of the 1st method is pretty bad because the function using
loop and each loop contain an amount of queries, furthermore the using of
where without index (in a large database) cost lots of performance. Finally this
block only deals with 1 student each loop so the execution time is not short.
- Second method:
create or replace function update_exam_score(subject_id_input VARCHAR,
semester_input VARCHAR)
returns void AS $$
begin
update enrollment
set exam_score = 0
where subject_id = subject_id_input
and semester = semester_input
and attendance_score < 7.5
and enrollment_status='success';
and;
$$ LANGUAGE plpgsql;
This method is faster than the first 1 because it does not use any loop and its can deal
with multiple record at the same time, the function only need to execute the query
once.
3. Attendance weighs 10%, assignments 20%, and exams 70%. Created a function to
calculate the letter score.
create or replace function update_diem_chu(id_monhoc varchar(10),semesterx varchar(6))
returns void as $$
declare id_hs varchar(10);
final_score float;
begin
for id_hs in (select student_id from enrollment where subject_id=id_monhoc and
semester=semesterx and enrollment_status='success') loop
select 0.1*attendance_score + 0.2*assignment_score + 0.7*exam_score into final_score
from enrollment where student_id=id_hs and subject_id=id_monhoc and
semester=semesterx and enrollment_status='success';
if final_score>=8.5 then update enrollment set letter_score='A' where student_id=id_hs and
subject_id=id_monhoc and semester=semesterx and enrollment_status='success';
elseif final_score<8.5 and final_score>=7 then update enrollment set letter_score='B' where
student_id=id_hs and subject_id=id_monhoc and semester=semesterx and
enrollment_status='success';
elseif final_score<7 and final_score>=5.5 then update enrollment set letter_score='C' where
student_id=id_hs and subject_id=id_monhoc and semester=semesterx and
enrollment_status='success';
elseif final_score<5.5 and final_score>=4 then update enrollment set letter_score='D' where
student_id=id_hs and subject_id=id_monhoc and semester=semesterx and
enrollment_status='success';
elseif final_score<4 then update enrollment set letter_score='F' where student_id=id_hs
and subject_id=id_monhoc and semester=semesterx and enrollment_status='success';
end if;
end loop;
end;
$$ language plpgsql;
4. When classes are full, cannot add any students or make any arrangement.
- Created a trigger before insert on enrollment to check if the current number of
students in the class is below the capacity or not. If the class is not full, insert
the new students, set enrollment status=’success’, enroll_date = current date
and increase the number of students in that class by 1, else set
enrollment_status = ‘fail’.
5. Credits check : (If currently students have 28 registered credits they cannot enroll to
others subject, still allow to show the enrollment info with enroll_status error)
6. Function to check students who do not have enough credits (<12 credits), all the
enroll status of these students will become fail.