the email and password columns must be in the student table, not the enrollment
the enrollment table will have, as you described, courseID and studentID
you said "It is possible that more than one record exists with the same email/password" but i'll bet you were thinking of the enrollment table, where the same student will have multiple enrollments
by the way, with courseID and studentID together as the primary key, the same student can enroll for the same course only once, so if you need to, add a third column to the primary key for repeat enrollments
as for your question about looking up the email and password, in your student table, assign a unique key to them
in the login procedure, retrieve email and password from the student table to authorize the visitor, but then carry the studentID as a session variable and use it on the page which looks up the student's courses by doing a query on the enrollments table using the session studentID as the value:
Code:
select coursename
from enrollments
inner
join courses
on nerollments.courseID = courses.courseID
where studentID = sessionID
Bookmarks