hex337 / quantum-attendance

An attendance program for Quantum Martial Arts
MIT License
3 stars 2 forks source link

Figure out how to store the student to class relationship #23

Open hex337 opened 7 years ago

hex337 commented 7 years ago

Right now, there is a table that links classes to students - MeetingMembers.

When looking at a student, we want to have access to all of the classes they have attended. When looking at a class, we want to have access to all of the students in that class.

I could see us storing this in two separate formats, one that's indexed by class id, and one that's indexed by student id. This makes it easy to do both look ups, but we have to store duplicate data. Realistically, this won't be that much data, since you probably only really have a working set of 50-60 active students and only usually care about the most recent 100 classes.

Might be easies to just try one way and see what happens and then try to optimize later.

hex337 commented 6 years ago

I think for now, it's safe to assume we can always pull and store all active students in the current session, but we don't want to store all classes. I'm going to have classes get pulled when you view a student page, and just grab those each time.