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

Expanding on graff's idea - to normalize this schema, you should have a the 'session' table contain unique entries, and separate out and create a new 'session_member' table that contains (session_id, member_id, role) where member id can be a student, or teacher - whose role is specified by 'role'. This table can have aidditional info, like enrollment date, and grades.

        "Despite my privileged upbringing, I'm actually quite well-balanced. I have a chip on both shoulders."         - John Nash

Replies are listed 'Best First'.
Re^3: Avoiding SQL double jeopardy
by GrandFather (Saint) on Jun 27, 2015 at 05:55 UTC

    Yup, that's what I did. :-)

    Perl is the programming world's equivalent of English