Changes between Version 14 and Version 15 of P1
- Timestamp:
- 06/25/26 10:56:15 (18 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
P1
v14 v15 96 96 97 97 === '''Student_Subject''' 98 This entity represents a specific student enrollment in a subject (course instance). It tracks grades, attendance, and status. It also acts as the central link resolving which professor teaches this specific instance to the student.98 This entity represents a weak entity that depends on both Student and Subject. It tracks a specific student enrollment in a subject (course instance), including grades, attendance, and status, while resolving which professor teaches this specific instance. 99 99 100 '''Candidate keys:''' ss_id (primary key). 100 '''Primary Key:''' Composite key consisting of (student_id, subject_id, ss_id). 101 102 '''Discriminator (Partial Key):''' ss_id. 101 103 102 104 '''Attributes:''' 103 105 104 '''ss_id''' – serial (integer), required, unique (mapped to ss_id on the diagram)106 '''ss_id''' – integer, required. Acts as the discriminator (partial key) for the weak entity. It uniquely identifies multiple enrollments of the same student in the same subject (e.g., if a student retakes a course). 105 107 106 '''student_id''' – integer, required, foreign key to Student (on delete cascade)108 '''student_id''' – integer, required, identifying foreign key to Student (on delete cascade). Part of the composite primary key. 107 109 108 '''subject_id''' – integer, required, foreign key to Subject (on delete cascade)110 '''subject_id''' – integer, required, identifying foreign key to Subject (on delete cascade). Part of the composite primary key. 109 111 110 '''professor_id''' – integer, required, foreign key to Professor (on delete restrict) (materializes the assignTo relationship from the diagram)112 '''professor_id''' – integer, required, regular foreign key to Professor (on delete restrict) (materializes the assignTo relationship from the diagram). 111 113 112 '''enrollment_date''' – date, required, defaults to CURRENT_DATE (mapped to Enrollment_Date) 114 '''enrollment_date''' – date, required, defaults to CURRENT_DATE (mapped to Enrollment_Date). 113 115 114 '''status''' – varchar(20), optional, defaults to 'Enrolled' 116 '''status''' – varchar(20), optional, defaults to 'Enrolled'. 115 117 116 '''final_grade''' – integer, optional (mapped to Final_Grade) 118 '''final_grade''' – integer, optional (mapped to Final_Grade). 117 119 118 '''absences_count''' – integer, optional, defaults to 0 (mapped to Abesense_Count on the diagram) 120 '''absences_count''' – integer, optional, defaults to 0 (mapped to Abesense_Count on the diagram). 121 122 119 123 120 124 === '''Advice'''
