I'm just wondering, as a hypothetical example, what would be the best way to layout a table for the following scenario:
Let's say I'm writing an app for tracking student attendance. At the beginning of every year, I want to add all the students in (I'll do this manually - now, should a student ID be assigned to each one here? Let's call that table Students). Now, each day, I'm going to display all the Students in table Students and will allow the user to choose attendance.
So, how should I lay my table out? (If you don't understand what I mean, I mean what data should be entered in each column, row...) For example, maybe have a Students table with Student IDs and for each student every day create a new row in the Attendance table with Column 1: Student ID, Column 2: Date, Column 3: Status (present/absent). However, that doesn't seem to be very efficient. What do you think?
UPDATE: From all these first answers, it seems that one student is in each row in the student-attendance table (where he/she is designated as present/absent), but what if I were to include more than one student id per row, say for all students absent on some day? Would that be better or worse (probably it's ambiguous)? Actually, I'm starting to think efficiency would be decreased because the only actions this move even helps can be easily accomplished already. Hmm...