C-O-D-E-H-U-B / Tutor

0 stars 1 forks source link

Mapp Tables belong to the ER diagram #3

Closed ruwanliyanage123 closed 2 years ago

ruwanliyanage123 commented 2 years ago

Need to do the mapping task for the tables belong to the ER diagram in https://github.com/C-O-D-E-H-U-B/Tutor/issues/2 issue.

ruwanliyanage123 commented 2 years ago

Student(_student_id_, first name, last name, address, email, phone number, parent WhatsApp number, dob) User(_userid, display name, password, permissions, settings, type, dob ,active status, profile pic, _studentid, _permissionid) Post(_post_id_, posted time date, type, active status) Comment(_commentid, comment body, date time, _post_id_, _userid,) Exam(_exam_id_, content, owner, date and time) User_Exam(_userid,,_exam_id_, duration ) Assignment(_assignmentid, content, status, deadline, _userid, ) Result( result id, _userid,, _exam_assignment_id_, date and time, marks) Lecture(_lectureid, content, date and time) Report(_report_id, content, date and time, response, status, student_id) Advertisement(ad_id_, ad_content, from, to, type, status)

ruwanliyanage123 commented 2 years ago

@melanj can you review this also?

melanj commented 2 years ago

@ruwanliyanage123 I have few concerns

  1. Why does User entity has reference to Student entity, doesn't it doesn't it vice versa?
  2. How we handle authentication for lectures?, I believe user entity should be common for both user students and lectures
  3. How does assignments get map to lectures?
  4. How does student get map to lectures? don't we need a separate entity map it?
  5. Better to have entity names in singular
ruwanliyanage123 commented 2 years ago

@melanj , 1.According to this system, First of all student needs to sign up. So in here he or she need to provide the details in the student table and will register as a student. Meanwhile registered student will be an user. so user table must have the student_id as the foreign key. 2.Actually Lecture mean not 'Lecturer', In here mentioned about the Lecturer notes, videos etc. There are not lecturers. One and only lecturer is the Tuition Master. 3.Not lecturers only we have lecture(videos, notes) 4.Same answer 5.Seems all entities are with the singular. is not it?

melanj commented 2 years ago

@ruwanliyanage123 I only noticed your ERD after adding some comments here, your above comment had some non singular entries. anyway we can ignore it as ERD has correct wordings.
e.g. Reports(report_id,` content, date and time, response, status, student_id)

so it seems we are not planing to implement lecturer login yet? however, As per my understanding "user" table should be dedicated to authentication purpose. let's say we need to implement admin login (or later moderator,lecturer, etc ) then we have to introduce separate for each type of roles.