Subject newbie, slightly confused
Author Greg
This is kinda general, but I want to do it with IBobjects.

I'm floundering with a one-to-one data editing problem where I would
be fine and dandy with a one-to-many master-detail scenario.

I've got a one to many relationship (which as you'll see resolves to
a one-to-one) between a "students" table and a "exam results" table.
There's also "Exams" and "Exams_student_link" tables. Each record in
the "exam results" table looks like this :

result_id, exam_id, student_id, result

At some point a bod (one of my users) will come along and want to
enter in the results for each student >>for a particular exam<<
(which is where the one-to-one comes in since theres only one result
per a student per exam).

My problem is that I don't know whether I should have already created
the entries for the "exam results" table or should do it as needed
(when the results come through). If the latter then I don't know how
to arrange for this using IBobjects native components (let alone BDE
or IB dataset components).

In pure SQL it just looks to me like a case of a outer left join,
which is fine for a query but won't help me much with data input.

ie, select student.name, exam_results.result,
from student, exam_results
join outer left student.id=exam_results.student_id and
exam_results.exam_id=:exam_id

or something like that (my sql is manual-dependent, currently).

In short the problem is that on the data entry form the join resolves
(or should resolve) to a one-to-one relationship (the exam_id being
set in advance of the form being displayed) between a student and a
result. But the result record doesn't yet exist. This wouldn't be a
problem for me if the situation was a one-to-many master-detail
scenario since the absence of detail records is par for the course
and I'm accustomed to it, but it ain't.

Can anyone give me a clue as to how I should be approaching this? I
hope that there aren't too many approaches.

Thanks,

Greg