... | ... | @@ -11,6 +11,12 @@ Their elements are listed as follow: |
|
|
|
|
|
**Sprint4**
|
|
|
|
|
|
Set up a new table: s_attendance.
|
|
|
- s_attendance: uses **id** as primary key, and stores course_id, type, student_id and cdate at the same time. Besides, course_id, cdate and student_id **must relatively stay the same as** id in s_course, course_date in s_course and id in s_student.
|
|
|
![Relationship](uploads/855e9daeaf94f7ea4b46342025192d04/Relationship.png) |
|
|
\ No newline at end of file |
|
|
At first we set up a new table: s_attendance. (The turquoise part is the new element, the orange part is new primary key, the turquoise relation line is the new relationline)
|
|
|
- s_attendance: uses **id** as primary key, and stores course_id, type, student_id and course_date at the same time. Besides, course_id, course_date and student_id **must relatively stay the same as** id in s_course, course_date in s_course and id in s_student.
|
|
|
![Relationship1](uploads/438266a9fc428a9ec9a3b680b450adbe/Relationship1.png)
|
|
|
|
|
|
Then we make some changes to the database. (The turquoise part is the new element and the turquoise relation line is the new relationline)
|
|
|
1. Add the new element date in s_attendance.
|
|
|
2. course_id in s_selected_course must also **stay the same as** id in s_course
|
|
|
3. Add the new element count in s_course.
|
|
|
![Relationship2](uploads/93bbf3cd173d42cd1cbcbe9e88d56e4a/Relationship2.png) |
|
|
\ No newline at end of file |