I've got a question that hopefully won't sound too stupid.
I've got a class that I teach that I want to track student attendance. The current table attendance has three attributes: ssn (a foreign key from the student table), classdate (the date of the class) and didattend (a boolean value).
I designed it this way because it didn't seem very efficient to create a day1 day2 day3... day 48 series of columns.
Eventually I want to be able to create a web page that allows me to add a new class date and enter in whether the student attended the class. This value, in turn, will be used to calculate an attendance score to be added in with the rest of the grade.
So, the question is, am I doing this right? I appear to be a bit stuck as to what to do next.
i might even go further and dispense with the didattend column, and simply enter only those students who were absent on a given classdate
the queries dealing with attendance will be different than what you were thinking, but the number of rows in the table will be a good deal smaller, and updating should be a breeze, on the assumption that absences will be significantly fewer than students present
you might want a separate table for classdates, listing all the dates where class was in session -- this will figure into the query to calculate absences