This MySQL database project models a school system, managing information about students, courses, professors, and their relationships
Students
student_id- primary key- Name (
f_name,l_name) - varchar not null birthdate- date not nulladdress- varchar not nullemail- varchar not null
Courses
course_id- primary keycourse_name- varchar not nullcourse_code- varchar not nullyear_level- ENUM('1st year', '2nd year', '3rd year', '4th year') not nulldepartment_id- foreign key not null
Subjects
subject_id- primary keysubject_name- varchar not null
Departments
department_id- primary keydepartment_name- varchar not nulldepartment_head(teacher_id) - foreign key not null
Professors
teacher_id- primary key- Name (
f_name,l_name) - varchar not null department_id- foreign key not nullis_head- Boolean (TRUE/FALSE)
- Courses from Departments
- Professors from Departments
- Departments from Professors
Enrollments (for Students and Courses relationship)
enrollee_id- primary keystudent_id- foreign keyyear_level- foreign key ENUM('1st year', '2nd year', '3rd year', '4th year') not nullcourse_id- foreign keysemester- ENUM('1st sem', '2nd sem') not nulldate- date not null
Course_Subjects (for Courses and Subjects relationship)
course_id- primary key, foreign keysubject_id- primary key, foreign key
Student_Grades (for Students and Subjects relationship)
student_id- primary key, foreign keysubject_id- primary key, foreign keygrade- decimal(3 size, 2 decimals)semester- ENUM('1st sem', '2nd sem') not nullyear- date not null
Teachers_Subjects (for Teachers and Subjects relationship)
teacher_id- primary key, foreign keysubject_id- primary key, foreign key
Enrollments- student_id, year_level, course_idCourse_subjects- course_id, subject_idStudent_grades- student_id, subject_idProfessor_subjects- prtofessor_id, subject_id
- do not enroll if student not in Students table
- do not enroll if course and year not in courses
