Ows MG Tan
Ows MG Tan

Reputation: 59

Number of columns is not fixed

In my project, I'm creating a enrollment system using c#.net. The problem I am facing now is I have a feature that add subjects to certain students. I have really no idea how to store to database(mysql) the dynamic number of columns and how to retrieve the save data in database. Hope you can help me. I'm really having a hard time here. Thank you

Upvotes: 2

Views: 40

Answers (1)

Ashkan Mobayen Khiabani
Ashkan Mobayen Khiabani

Reputation: 34160

You can have a Subjects table something like:

Subjects (Id, StudentId, SubjectName, SubjectValue)

Now you can add as many subjects as you want for a student.

Upvotes: 2

Related Questions