Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.