atish_dbms
atish_dbms
Objective:To understand a given case study, notations used for ER Diagram and design the ER
Diagram using a tool of following scenarios.
Case Study 6:
Suppose you are given the following requirements for a simple database for the National Hockey
League (NHL):
• the NHL has many teams,
• each team has a name, a city, a coach, a captain, and a set of players,
• each player belongs to only one team,
• each player has a name, a position (such as left wing or goalie), a skill level, and a set
of injury records,
•a team captain is also a player,
•a game is played between two teams (referred to as host_team and guest_team) and
has a date (such as May 11th, 1999) and a score (such as 4 to 2).
Construct a clean and concise ER diagram. List your assumptions and clearly indicate the
cardinality mappings as well as any role indicators in your ER diagram.
Entities:
1. Team
2. Player
3. Captain (since a captain is also a player, we will treat this as a role for the player, rather than a
separate entity)
4. InjuryRecord
5. Game
Relationships:
• Captain-Team Relationship: A captain is a special player (1:1 relationship, a player acts as the
captain).
• Game-Team Relationship: Each game is played between two teams, represented as a host and
a guest team (M
).
).
Assumptions:
1. Every team has one captain, and a captain is a player on the team.
3. A game has two teams, one acting as the host and the other as the guest.
ER Diagram Overview:
1. Team
o Has a self-relationship with Player (captain role): 1 to 1 (One player is the captain)
2. Player
o Connected to InjuryRecord: 1 to N (A player can have many injury records)
3. Game
o Connected to Team (Host Team and Guest Team): M to N (One game is played between
two teams)
Cardinality Mapping:
• Team to Player: 1 to N (One team has many players, but each player belongs to only one team)
• Team to Captain (Player): 1 to 1 (One team has one captain, a captain is a player)
• Game to Team: M to N (One game involves two teams as host and guest)
ER Diagram Elements: