student program relationship

S

Shawn Anderson

I need to create a student/program relationship, based on the age of a
student.

If the student is over 13 then they are enlisted the a teen program.

If the student is under 13 then they are enlisted in the children program.

If the student is 13 then they can be in either program.

The tables for the children and the teen programs have to be different. The
children's program contains extra fields that are not in the teen program.
 
S

Steve Schapel

Shawn,

I would need to know more details to be sure, but on the face of what
you have said so far, I would not have separate tables for the two
programs. I would have a field in the table for Program, and on your
data form you could have a routine to automatically allocate the Program
when you enter the age, but you could then change this if necessary in
the case of the 13-year-olds or for any other reason. For the data that
only pertains to one program and not the other, it would be a judgement
call whether you still put these fields in the same single table, or
whether you opt for a sub-classing design, where you have separate
tables just for these exclusive fields, related one-to-one to the main
table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top