in reply to Re: Avoiding SQL double jeopardy
in thread Avoiding SQL double jeopardy

In fact the real code uses session and person tables as you suggest. It is exceedingly unlikely that there will ever be more than two roles. People don't have a permanent role, they are either a teacher or a learner in each session. The SessPeople table is what you suggest as a PersonSessions table.

As an aside, additional roles could easily be added if really needed by re-purposing the IsTeacher column as a RoleId column to be a foreign key for a Role table and setting Learner = 0, Teacher = 1 in the new table.

Perl is the programming world's equivalent of English