School database design
Homework questions like this will generally not elicit answers with code. Stack Exchange is not a place where you can come to get others to do your homework for you. However you have only asked for pointers of where to look, so to that end, I will inform you that what you are looking for is called a many-to-many relationship, and requires a third table that maps table 1 to table 2. Usually, this third table just has two columns, each containing the primary key of one of the main tables, and the primary key of this table covers both columns.

Read up:


http://en.tekstenuitleg.net/articles/software/database-design-tutorial/many-to-many.html
http://www.tomjewett.com/dbdesign/dbdesign.php?page=manymany.php