Hi everyone, I'm trying to sort out my database before developing my interface any further and have run into a problem. Many to many relationships. I understand the theory but am falling short on putting it to practice for SQL tables.
The database is for a university.
I have 2 tables: a modules table and a lecturers table.
Each module has a moduleID and each lecturer has a lecturerID.
A module can have multiple lecturers and a lecturer can have multiple modules.
How can I easily implement this?
Do I create a third table i.e module_staff with its own uniqueID i.e module_staffID and include the moduleID and lecturerID as foreign keys?
If I do this, and put moduleID in the second column and lecturerID in the third, do I simply allow the moduleID to be repeated when there are more than one lecturer ID associated with it?
Any quick help with this would be greatly appreciated.