SFUFlow / SFUCompass

“By failing to prepare, you are preparing to fail.” ― Benjamin Franklin
https://sfu-compass.vercel.app
GNU General Public License v3.0
0 stars 0 forks source link

ERD #3

Open WongMatthew opened 1 year ago

WongMatthew commented 1 year ago

*Multiple people can work on the ticket

https://lucid.app/lucidchart/f48574d5-a485-44f5-a183-e547287bf497/edit?view_items=yRKqh-dGCGV0&invitationId=inv_b20d096d-2285-445b-b5d8-2a06190a75b2

Create a lucid chart

Database will need the following:

General Idea:

The ERD would consist of four tables: Users, Ratings, Classes, and Professors.

Users: This table would have columns for email, username, and password, which would store the personal information of users who create an account on the platform.

Ratings: This table would have columns for the user who left the rating, the date the rating was left, the class or professor the rating is for, and the rating itself.

Classes: This table would have columns for the professor, description, sections, feedback, and rating. The professor column would be a foreign key referencing the Professors table.

Professors: This table holds tuples of unique professors

ProfRatings table, contains ratings of professors (this is separate to the Professors table that holds tuples of unique professors).

Having a ratings & feedback column for each professor generates rows for each rating & feedback that a professor has -> would be 1NF 😆.

The relationship between the tables would be as follows:

The Users table would have a one-to-many relationship with the Ratings table, as one user can leave multiple ratings.

The Ratings table would have a one-to-one relationship with the Classes table, as each rating would be for a single class.

The Classes table would have a many-to-one relationship with the Professors table, as many classes can be taught by a single professor.

ChrisFong604 commented 1 year ago

Link to LucidChart: https://lucid.app/lucidchart/f48574d5-a485-44f5-a183-e547287bf497/edit?view_items=yRKqh-dGCGV0&invitationId=inv_b20d096d-2285-445b-b5d8-2a06190a75b2

WongMatthew commented 1 year ago

Hey @jam0ra I’m using Zenhub in GitHub, click this link to join my workspace and see other features available in GitHub or download the Zenhub extension and sign up with your GitHub account. Posted using Zenhub

jerrydngzh commented 1 year ago

The professors table mentioned in the description can be turned into a ProfRatings table, that contains ratings of professors (this is separate to the Professors table that holds tuples of unique professors).

Having a ratings & feedback column for each professor generates rows for each rating & feedback that a professor has -> would be 1NF 😆.