Generating Class Lists for Student Enrollment
I'm working on a database for a dance studio and things are coming along nicely. I have a Students, Classes, Enrollments and Line Item tables set up each with their own primary keys. StudentID, ClassID, EnrollmentID and LineID.
2 thinks I want to generate and maintain.
1) A list of students enrolled in each class.
-- I think I'm okay with doing this via a relationship and a portal.
2) A tally of how many students are in each class.
-- With registration coming up in September it would be nice to have a running tally of the how many students have registered for a class so my client can keep track of any over bookings for a particular class.ie, create a list view of all classes offered with a number showing how many students were in each class so far.
I guess the question is, for example, for ClassID=312, how many students have enrolled in it? Or in the Line Items table, how many records have a ClassID=312. That would be the number of students in the class.
I have a few ideas about how to loop through records and start doing a tally then putting the result in a field, but that would be like running a report. Which is fine, but I was wondering if there was a way I could do that tally on the fly so it is up to date.
Should I be looking at a summary field for this?