Closed lctoye closed 3 months ago
Created an initial version of the ERD:
users -> classes -> [assessments, notes]
where ->
is a 1-to-many relationship.
However, we will need to query assessments many times without classes, so it would be appropriate to added a user_id FK to assessments and notes:
users -> [assessments, notes, classes]
classes -> [assessments, notes]
As per meeting with professor, we should revisit cardinalities on the ERD.
Added to SRS section 5.1.3
erDiagram
users ||--o{ classes : manages
users {
UUID user_id PK
TEXT name
TEXT email
TEXT password
TEXT image
TIMESTAMP created_at
}
classes ||--o{ assessments : has
classes ||--o{ notes : includes
classes {
UUID class_id PK
UUID user_id FK
TEXT name
TEXT professor
TEXT details
TIMESTAMP created_at
TIMESTAMP updated_at
}
users ||--o{ assessments : creates
assessments {
UUID assessment_id PK
UUID class_id FK
UUID user_id FK
TEXT name
TEXT description
TEXT status
NUMBER weight
TIMESTAMP due_date
TIMESTAMP created_at
TIMESTAMP updated_at
}
users ||--o{ notes : creates
notes {
UUID note_id PK
UUID class_id FK
UUID user_id FK
TEXT name
TEXT content
TIMESTAMP created_at
TIMESTAMP updated_at
}
Entity Relationship Diagram