CarletonComputerScienceSociety / auto-grader

Apache License 2.0
2 stars 3 forks source link

Document initial database class diagram #9

Open AngelOnFira opened 2 years ago

AngelOnFira commented 2 years ago

The database for the Django backend of auto-grader can be modeled with a relatively simple class diagram. There's a tool called Mermaid JS that allows you to create graphs from code pretty easily. I think we can use this to brainstorm an intitial schema for the backend.

The auto-grader architecture document already uses this format for showing off some graphs, but for this one we'll use a class diagram instead.

Here's an example of what the schema might look like. I think we can start with this, and create a PR to see what it looks like, then work on it a bit more.

Student
    - many-to-many with course
    - many-to-many with assignment
    - name
    - student id
Assignment
    - many-to-many with course
    - name
    - instructions
Course
    - name
    - code
Instructor
    - many-to-many with course
    - name
    - instructor id
areej-i commented 2 years ago
 classDiagram
      Course <|-- Assignment
      Assignment <|-- Question
      Professor <|-- Course
      Course <|-- Student

      class Assignment{
          string description
          string name 
          string dueDate
          int grade
          Question[] questions
      }

      class Course {
          string course_id
          string name
          string description
          string section
          string professor
      }

      class Student {
         int student_id
         string name
         Course[] courses_registered_in
         Assignment[] assignments_due
         Assignment[] assignments_finished
      }

      class Professor {
          string name
          string email
          course course_teaching
          Student[] students_in_course
          Assignment[] assignments_for_class
      }

      class Question {
          string description
          boolean complete
          int grade
      }
AngelOnFira commented 2 years ago

Ooh this is looking great! I do want to take a longer look at the relationships between tables, say how Assignment has Question[] (mostly because I don't know which syntax is best myself :P ). But I think this should be good to move into a markdown file!

Can you make a file SCHEMA.md and add this to it? Then you should be able to make a new branch and create a pull request for it 💯

areej-i commented 2 years ago

SCHEMA.md

not sure where to make a new branch at