Hello. I am trying to create a function that wold allow me to register gym members to gym classes. I do understand searching on the web that I would need a third table to store this data, as one gym class can have many members.
The new table will be called class registration and will have two columns: class_id and member_id that will be taken from the main members and classes table.
Also after having this new table I could perform operations like, retrieving all member_id that have registered with a particular class_id, or entering a class_id I could see all registered members.
Is this the right approach to the problem, and how I should formulate mysql statement for example to get the member details from the original members table, registered with a particular class.
Thank you for any help or suggestions.