|
|
## Appendix: Relationships between elements in the database
|
|
|
**Sprint3**
|
|
|
All information is classified as 6 tables: s_admin, s_selected_course, s_course, s_clazz, s_student, s_teacher.
|
|
|
Their elements are listed as follow:
|
|
|
- s_admin: uses **id** and **name** as primary key(used to uniquely identify a record in a table), and stores password and status at the same time.
|
|
|
- s_student: uses **id** and **sn** as primary key and stores name, password, clazz_id and photo at the same time.
|
|
|
- s_selected_course: uses **id** as primary key and **must stay the same as id in s_student**, and stores student_id and course_id at the same time.
|
|
|
- s_teacher: uses **id** and **sn** as primary key and stores name, password, clazz_id and photo at the same time.
|
|
|
- s_course: uses **id** as primary key and **must stay the same as id in s_teacher**, and stores name, teacher_id, course_date, selected_num, max_num and info at the same time.
|
|
|
![Relationship](uploads/9c2bfd6dc06df7887c6845205e5dcb86/Relationship.png)
|
|
|
**Sprint4**
|
|
|
Set up a new table: s_attendance.
|
|
|
s_attendance: uses **id** as primary key, and stores course_id, type, student_id and date at the same time.
|
|
|
![Relationship-sp4](uploads/62be47df78650e57c93c517117ad524b/Relationship-sp4.png) |
|
|
\ No newline at end of file |