Database Design – Best Way to Represent Team and Player Relationship in ERD

database-designerd

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?

Best Answer

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