Python Forum
Database for a College or School
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database for a College or School
#1
While working on a task today, my brain was occupied by another task that I'm not quite sure how to solve. Either I'm trying to do too many things with a design that doesn't allow it or I'm not thinking about it properly. This isn't an professional issue or problem with code I'm having, so please don't move this thread to General Coding Help, it's more a recreational problem. Here it is:

Suppose you've been tasked with creating a system to allow students to register for a course, and view there grades at the end of the course. This same system should allow the professor to generate an attendance list of his/her class.

The problem I'm having is where would the student grade go? or the student relationship to class.

My thinking is:

A Student can enroll in a class, provided it isn't full.

A Class can have a list of students.

A Student can obtain a grade in the course they enrolled in.

class Student:

    def __init__(self, id, firstname, lastname, listofcourses):
   
        self._id = id
        self._firstname = firstname
        self._lastname = lastname
        self._listofcourses = listofcourses;
class Course:

    def __init__(self, courseID, courseName, professor listofStudents):
 
        self._courseID = courseID
        self._courseName = courseName
        self._professor = professor # A class called professor
        self._listofStudents = listofStudents
        self._isFull = False

  1. Should the Student class have a list of Courses that he/she has enrolled in?
  2. Should Course have a list of students who have enrolled in the class?
  3. Where would Student grade go for each class?
  4. Using this design, how would a professor generate an attendance sheet?
  5. Am I trying to accomplish too many things with a design that doesn't allow it?

A little Googling turned up this link and this one. Because of the many-to-many relationship, you would create a junction table, but how then would a professor generate an attendance list with the database? Would grade go in the junction table?
Reply


Messages In This Thread
Database for a College or School - by nexusfactor - Oct-13-2017, 10:18 PM
RE: Database for a College or School - by Larz60+ - Oct-14-2017, 03:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I've Wanted to do This Since College ichabod801 1 2,420 Aug-01-2018, 08:53 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020