Jump to content

Group into Teams


JimboUK

Recommended Posts

Hi guys, really enjoying SQL here on my course using Java, servlets and JSP. I have a table 'students' with the following:

 

'studentID', 'forename', 'surname', 'courseCode', 'dob'.

 

I need to be able to group these students into teams. Could you help me out with the logic behind it?

 

Do I have to create a new table named 'teams', create a new column in both students AND teams called 'teamID', linking as FOREIGN KEY, and then join them together?

 

I need to be able to create a new team using html form / jsp / servlet (no problem), but then how would I add students from the 'students' table, or remove them. What am I looking at doing?

Link to comment
https://forums.phpfreaks.com/topic/219387-group-into-teams/
Share on other sites

Adding a student to and from a team, via a html form, then listing teams. These students also need to  be able to be removed from the team they are in, so that upon next viewing the list of teams with the students in them, the recently removed student is no longer in that team.

Link to comment
https://forums.phpfreaks.com/topic/219387-group-into-teams/#findComment-1137629
Share on other sites

Adding a student to and from a team, via a html form, then listing teams. These students also need to  be able to be removed from the team they are in, so that upon next viewing the list of teams with the students in them, the recently removed student is no longer in that team.

That's as easy and adding/remove the appropriate rows from the lookup table.

 

Also, I need to only allow a maximum of 4 people on the team at once.

That's easier to handle if your application.

Link to comment
https://forums.phpfreaks.com/topic/219387-group-into-teams/#findComment-1137664
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.