- #1
shivajikobardan
- 674
- 54
- Homework Statement
- My main confusion is can I use "ISA" in captain and player? Can I use generalization there?
- Relevant Equations
- None
Suppose you are given the following requirements for a simple database for the National Hockey League (NHL):
1) the NHL has many teams,
2) each team has a name, a city, a coach, a captain, and a set of players.
3) each player belongs to only one team,
4) each player has a name, a position (such as left wing or goalie), a skill level, and a set of injury records,
5) a team captain is also a player,
6) 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).
Here's my solution. Is it correct?
My main confusion is can I use "ISA" in captain and player? Can I use generalization there?Here's the solution to this problem.
https://www2.cs.sfu.ca/CourseCentral/354/louie/Chap2_practice_key.pdf
1) the NHL has many teams,
2) each team has a name, a city, a coach, a captain, and a set of players.
3) each player belongs to only one team,
4) each player has a name, a position (such as left wing or goalie), a skill level, and a set of injury records,
5) a team captain is also a player,
6) 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).
Here's my solution. Is it correct?
My main confusion is can I use "ISA" in captain and player? Can I use generalization there?Here's the solution to this problem.
https://www2.cs.sfu.ca/CourseCentral/354/louie/Chap2_practice_key.pdf