3

I am working on designing an entity-relationship diagram (ERD) for a football system, I stopped in the relationship between the Player and Team entity types, as we know a player plays for only one team and a team have many players, so the relationship will be:

  • Team 1…* Player

But, how can I represent this relation when a player can play in more than one team? In real life, a player has a contract with a team, when that contract ends, the player may continue with the same team or with other team, so the relation will be

  • Team *…* Player, or

  • Team 1…* Contract *…1 Player

Questions

  • Is my understanding is well?
  • Do you have any suggestions about the two scenarios?
  • Yes, the second approach is reasonable, if you want to store that info. – ypercubeᵀᴹ May 18 '15 at 10:50
1

If you want a history of the all the players that have passed in that team the approach: Team 1:N Contracts N:1 Players is fine. Otherwise if you just want to know the players that are currently in the team and contract is not a needed information for you, the approach: Team 1:N Player will also work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.