Hello, im a bit of a noob with mysql and databases all together.
Im trying to design/create a database to support a project that im doing at Uni.
The project is based around an employer employee job website.
Because i will have various users on the website (employers, employees and administrators) i thought id have some basic inheritance, all these sub tables below a super table (user) it seems the logical thing to do as they will all have a username, password and email. Anyhow, please see the basic model i knocked up to show what im trying to achieve:
Link to model:
http://h1.ripway.com/davidcollinsmusic/db2.JPG
What i want to do is have a foreign key in administrator/employer and employee of the table userID, for example heres what i tried to create in mysql:
Link:
http://h1.ripway.com/davidcollinsmusic/db.JPG
After attempting to execute this, it throws up the following error:
Link:
http://h1.ripway.com/davidcollinsmusic/dberror.JPG
I know that its related to the foreign key issue, im not sure exactly what the problem could be?
Regards
David.