Subject newbie needs advice
Author Greg
Hi folks,

I've got a problem. This is kinda general like my last question. I'm
sure it's a normal circumstance that any C/S guy knows how to tackle,
but I don't.

I have "attendance" and "attandance_details" tables. they look like
this (FK for foreign key)

Attendance : attendance_id, FK contract_id, month, notes

Attendance detail : FK attendance_id, FK student_id, hours

Theres also a student_contract_link table so that with the right join
I can fetch the students needed to generate the "attendance detail"
rows (one per a student).

What I would like to do i have a grid with the names of the students
in the first column and the "hour" field in the second column. Then
the user can edit each hour field (no need to edit the student's

However this isn't, it seems to me, a straight forward master-detail.
I can't just show the student id's in the first column, so I need to
do a join, which means that things are getting scary (for me).

Also the detail rows don't exist in the first place. I can see myself
writing lots of code to make sure that each students attendance
detail is present and adding new rows for those that aren't. If there
is anyway to make this automatic I would be over the moon.
Is "autoinsert" the soloution?

Perhaps a trigger is what I need?

Thanks for any help,