Jump to content

Need help with my schema- how to deal with lists?


Apophenia Overload

Recommended Posts

Okay, so have a form to input information about a football player, with a field that a person would enter in all of the teams that the player has been on.  The idea is that records of these players will be used to generate an index of teams, and team pages.  The team pages would then display records of all players who have once been on the team at some point.

 

That's how it works in abstract.  I'm not exactly sure how to handle the field; I'm thinking of having the teams be comma separated when the user inputs them.  However, I'm more concerned about how to handle the backend, in the database itself.

 

If each player has multiple teams associated with them, how should I store the teams value in the table for players?  At the moment, since the form is about a single player, the main table I'm working with is the players table.  However, I think I may need an additional table for teams.  Each row on this team table wouldn't consist of much, just an id, and then a list of players.  However, how would I then handle that list of players?

 

Any suggestions as to how to deal with this situation?  Is there a better solution?

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.