Database Structure¶
ngshare is using SQLAlchemy to model data relationships and manage database queries.
Tables¶
User: analogous to users of JupyterHub. A user can be a student, instructor, or both.Course: a course for nbgrader, can have multiple students and instructors.Assignment: an assignment, has multiple states; belongs to a course.Submission: a student’s submission to an assignment; includes submission and feedback; belongs to an assignment.File: Store files related to 1) assignment, 2) submission, or 3) feedback.
Allocation Tables¶
Allocation tables are created by SQLAlchemy to represent many-to-many relationships. You should not worry about them when designing a high-level database structure.
instructor_assoc_table: Relationship between instructor (User) andCourse- Also contains metadata:
first_name,last_name,email
- Also contains metadata:
student_assoc_table: Relationship between student (User) andCourse- Also contains metadata:
first_name,last_name,email
- Also contains metadata:
assignment_files_assoc_table: Relationship betweenAssignmentandFilesubmission_files_assoc_table: Relationship betweenSubmissionandFilefeedback_files_assoc_table: Relationship between feedback (Submission) andFile
Assignment State¶
Currently, the Assignment table has a boolean column released. It may be used in future versions of ngshare to manage assignment states.