Creating a database for a scenario involving students, teachers and courses
"Roles" has a different meaning.
A bridging ('mapping') table is how specify a 'relationship' between two tables that is "many-to-many".  Example:  Students:Classes.
1-many works differently.  It needs a column in one table to link to the other.  Example:  Worker:Manager


In designing an "Entity-Relationship" ("ER") schema do something like this:


One table per "entity":  Student, Teacher, Course, Class.  (This assumes there are no 'student teachers'.)  Each entity table would have numerous columns for attributes such as name (most tables), date (for class), 
Establish the relations between them.  Many:many:  Student:Class, Teacher:Class; 1:many: Class:Course


Building a list of students as 101,103,... is best done via a JOIN and GROUP BY and GROUP_CONCAT(), not by having a column with such a list.

Since a "class" might multiple times a week need to be another table session, and 1:many for class:session.