How to Prevent a Many to Many When Number of Rows Shared Is Unknown I have two tables that look like the following:

Subjects
id|subject_name|..some other columns
1 |maths       |
2 |english     |
3 |science     |

Users
id|username|...some other columns
1 |Frank1  |
2 |Bob2    |
3 |Mike    |


A user should be able to have many subjects however the number of subjects they will have is unknown, is there some way to create a table that would prevent a many to many and if not what would be the best way of storing the subjects in the Users table?
The better solution is creating the intermediate table subject_user:

table name: User_Subject
Fields: idUser, idSubject
PK: idUser, idSubject


Make both ids primary key, so one user cannot have two or more times the same subject. In other words, a subject cannot have the same student two or more times.