Get data from 4 different tables
View Single Post
01-16-2008, 04:58 AM
Join Date: Apr 2007
You've already said that your tables have been normalised (3NF) but I think your table structure could really do with being improved before moving forward. What do you expect to happen when a student and admin have the same id number (they're in different tables, so it can happen) and the same password (unlikely but again, it can happen). The admin tries to log in but gets logged into the student's account!
I think you'd make things far, far easier for yourself if you broke things down a little more. It would make sense (to me) to have a 'person' or 'user' (or other appropriate name) table which everyone gets put into. Then if the person is a student, a row in the students table can identify them as such or a flag within the person table and the same for any admins.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe